Skip to content

Commit 23cb1ae

Browse files
committed
moved pull requests over
1 parent 8be2287 commit 23cb1ae

File tree

2 files changed

+15
-12
lines changed

2 files changed

+15
-12
lines changed

blackshades_revenge/Source/GameLoop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ void Game::EventLoop( void )
517517

518518
}
519519

520-
if ( IsKeyDown( theKeyMap, MAC_ESCAPE_KEY )){
520+
if ( !mainmenu && IsKeyDown( theKeyMap, MAC_ESCAPE_KEY )){
521521

522522
float gLoc[3] = {0.0f, 0.0f, 0.0f};
523523
alListenerfv(AL_POSITION, gLoc);

blackshades_revenge/Source/GameTick.cpp

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -851,7 +851,7 @@ void Game::Tick(){
851851

852852

853853

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

856856
camera.visrotation=camera.rotation;
857857

@@ -1699,21 +1699,26 @@ void Game::Tick(){
16991699

17001700
mousesensitivity=.05*usermousesensitivity;
17011701

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

17041704
zoom=0;
1705+
camera.rotation2+=14;
1706+
camera.rotation+=9;
17051707

17061708
}
17071709

1708-
if(visions==1)zoom=0;
1709-
17101710
}
17111711

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

17141714
zoom=1;
17151715

1716-
if(zoom&&!oldzoom)camera.rotation2-=6;
1716+
if(!oldzoom){
1717+
1718+
camera.rotation2-=14;
1719+
camera.rotation-=9;
1720+
1721+
}
17171722

17181723
}
17191724

@@ -3250,10 +3255,8 @@ void Game::Tick(){
32503255

32513256
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);
32523257

3253-
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);
3254-
3255-
if(person[j].whichgun==shotgun)aim=DoRotation(aim,0,person[j].playerrotation-1+(float)(Random()%1000)/500,0);
3256-
3258+
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);
3259+
32573260
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);
32583261

32593262
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);
@@ -4137,7 +4140,7 @@ void Game::Tick(){
41374140

41384141

41394142

4140-
if(lasersight&&person[0].whichgun!=grenade){
4143+
if(lasersight&&visions==0&&person[0].whichgun!=grenade){
41414144

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

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

41654168
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);
41664169

4167-
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);
4170+
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);
41684171

41694172
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);
41704173

0 commit comments

Comments
 (0)