Skip to content

Commit

Permalink
moved pull requests over
Browse files Browse the repository at this point in the history
  • Loading branch information
Bitl committed Dec 14, 2018
1 parent 8be2287 commit 23cb1ae
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
2 changes: 1 addition & 1 deletion blackshades_revenge/Source/GameLoop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ void Game::EventLoop( void )

}

if ( IsKeyDown( theKeyMap, MAC_ESCAPE_KEY )){
if ( !mainmenu && IsKeyDown( theKeyMap, MAC_ESCAPE_KEY )){

float gLoc[3] = {0.0f, 0.0f, 0.0f};
alListenerfv(AL_POSITION, gLoc);
Expand Down
25 changes: 14 additions & 11 deletions blackshades_revenge/Source/GameTick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -851,7 +851,7 @@ void Game::Tick(){



if(zoom||person[0].aimamount<=0||person[0].whichgun==nogun||visions||person[0].whichgun==grenade||person[0].whichgun==knife){
if(oldzoom||zoom||person[0].aimamount<=0||person[0].whichgun==nogun||visions||person[0].whichgun==grenade||person[0].whichgun==knife){

camera.visrotation=camera.rotation;

Expand Down Expand Up @@ -1699,21 +1699,26 @@ void Game::Tick(){

mousesensitivity=.05*usermousesensitivity;

if(person[i].targetanimation!=crouchanim||person[i].currentanimation!=crouchanim||person[i].aiming<1){
if(person[i].targetanimation!=crouchanim||person[i].currentanimation!=crouchanim||person[i].aiming<1||visions==1){

zoom=0;
camera.rotation2+=14;
camera.rotation+=9;

}

if(visions==1)zoom=0;

}

if(person[i].currentanimation==crouchanim&&person[i].targetanimation==crouchanim&&person[i].aiming>=1&&person[i].whichgun==sniperrifle){

zoom=1;

if(zoom&&!oldzoom)camera.rotation2-=6;
if(!oldzoom){

camera.rotation2-=14;
camera.rotation-=9;

}

}

Expand Down Expand Up @@ -3250,10 +3255,8 @@ void Game::Tick(){

if(person[j].whichgun==sniperrifle)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[lefthand])].position-person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position,0,person[j].playerrotation+4,0);

if(person[j].whichgun==shotgun)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[lefthand])].position-person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position,2+(float)(Random()%1000)/500,0,0);

if(person[j].whichgun==shotgun)aim=DoRotation(aim,0,person[j].playerrotation-1+(float)(Random()%1000)/500,0);

if(person[j].whichgun==shotgun)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[lefthand])].position-person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position,2+(float)(Random()%1000)/500,person[j].playerrotation-1+(float)(Random()%1000)/500,0);

if(person[j].whichgun==handgun1&&!thirdperson&&j==0)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position-(person[j].skeleton.joints[person[j].skeleton.jointlabels[head]].position*.65+person[j].skeleton.joints[person[j].skeleton.jointlabels[neck]].position*.35),0,person[j].playerrotation-.9,0);

if(person[j].whichgun==handgun1&&(thirdperson||j!=0))aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position-(person[j].skeleton.joints[person[j].skeleton.jointlabels[head]].position*.35+person[j].skeleton.joints[person[j].skeleton.jointlabels[neck]].position*.65),0,person[j].playerrotation-.9,0);
Expand Down Expand Up @@ -4137,7 +4140,7 @@ void Game::Tick(){



if(lasersight&&person[0].whichgun!=grenade){
if(lasersight&&visions==0&&person[0].whichgun!=grenade){

for(int j=0;j<numpeople;j++){

Expand All @@ -4164,7 +4167,7 @@ void Game::Tick(){

if(person[j].whichgun==sniperrifle)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[lefthand])].position-person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position,0,person[j].playerrotation+4,0);

if(person[j].whichgun==shotgun)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[lefthand])].position-person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position,0,person[j].playerrotation+4,0);
if(person[j].whichgun==shotgun)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[lefthand])].position-person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position,2,person[j].playerrotation-1,0);

if(person[j].whichgun==handgun1&&!thirdperson&&j==0)aim=DoRotation(person[j].skeleton.joints[(person[j].skeleton.jointlabels[righthand])].position-(person[j].skeleton.joints[person[j].skeleton.jointlabels[head]].position*.65+person[j].skeleton.joints[person[j].skeleton.jointlabels[neck]].position*.35),0,person[j].playerrotation-.9,0);

Expand Down

0 comments on commit 23cb1ae

Please sign in to comment.