]> git.jsancho.org Git - lugaru.git/commitdiff
remove recurring checks
authorIgor Gnatenko <i.gnatenko.brain@gmail.com>
Tue, 20 Dec 2016 14:26:35 +0000 (15:26 +0100)
committerRémi Verschelde <rverschelde@gmail.com>
Tue, 20 Dec 2016 17:39:57 +0000 (18:39 +0100)
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
Source/GameTick.cpp

index 7d66b43a1271e173a759fd603fe9d3d54e367215..514ab54a9f094b94f266a90bdb6495af12df7dec 100644 (file)
@@ -1958,7 +1958,7 @@ void doAerialAcrobatics()
                                     whichhit = Object::objects[i]->model.LineCheckPossible(&lowpoint, &lowpointtarget, &colpoint, &Object::objects[i]->position, &Object::objects[i]->yaw);
                                     if (Object::objects[i]->friction > .5)
                                         if (whichhit != -1) {
-                                            if (whichhit != -1 && Person::players[k]->animTarget != jumpupanim && Person::players[k]->animTarget != jumpdownanim)
+                                            if (Person::players[k]->animTarget != jumpupanim && Person::players[k]->animTarget != jumpdownanim)
                                                 Person::players[k]->collided = 1;
                                             if (Object::checkcollide(lowpoint7, lowpointtarget7) == -1)
                                                 if (Object::checkcollide(lowpoint6, lowpointtarget6) == -1)
@@ -4437,7 +4437,7 @@ void Game::TickOnceAfter()
         }
 
         if (changedelay <= 0 && !loading && !editorenabled && gameon && !Tutorial::active && changedelay != -999 && !won) {
-            if (Person::players[0]->dead && changedelay <= 0) {
+            if (Person::players[0]->dead) {
                 changedelay = 1;
                 targetlevel = whichlevel;
             }