]> git.jsancho.org Git - lugaru.git/commitdiff
Fixed error spotted by cppcheck
authorCôme Chilliet <come@chilliet.eu>
Wed, 23 Nov 2016 14:53:38 +0000 (22:53 +0800)
committerCôme Chilliet <come@chilliet.eu>
Wed, 23 Nov 2016 14:53:38 +0000 (22:53 +0800)
Source/GameTick.cpp

index 685b4730ab952c17cf72bd8016d159777e558c1d..c693e1c3fdf9afa040a5d088461f3ed41d823dd9 100644 (file)
@@ -5487,7 +5487,7 @@ void doAI(unsigned i)
                     if (Person::players[0]->animTarget != rabbitkickanim && Person::players[0]->weaponactive != -1) {
                         if (weapons[Person::players[0]->weaponids[0]].getType() == knife) {
                             if (Person::players[i]->isIdle() || Person::players[i]->isCrouch() || Person::players[i]->isRun() || Person::players[i]->isFlip()) {
-                                if (abs(Random() % 2 == 0))
+                                if (abs(Random() % 2) == 0)
                                     Person::players[i]->setAnimation(backhandspringanim);
                                 else
                                     Person::players[i]->setAnimation(rollanim);