From: Côme Chilliet Date: Fri, 25 Nov 2016 13:40:44 +0000 (+0800) Subject: Fixed duplicated expressions in ifs X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=fa9b4636af8985a9e1574d6e08ac77e47eb72fe2;p=lugaru.git Fixed duplicated expressions in ifs --- diff --git a/Source/Person.cpp b/Source/Person.cpp index 8bcf81e..62796aa 100644 --- a/Source/Person.cpp +++ b/Source/Person.cpp @@ -5275,7 +5275,7 @@ void Person::DoStuff() if (hasvictim) { if ((victim != this->shared_from_this()) && !victim->dead && (victim->aitype != passivetype) && (victim->aitype != searchtype) && (aitype != passivetype) && - (aitype != searchtype) && (victim->id < Person::players.size()) && (aitype != passivetype)) { + (aitype != searchtype) && (victim->id < Person::players.size())) { behind = (normaldotproduct(facing, coords - victim->coords) > 0); } } @@ -6379,7 +6379,7 @@ int Person::DrawSkeleton() calcrot = 0; if (skeleton.free) calcrot = 1; - if (animation[animTarget].attack || isRun() || animTarget == staggerbackhardanim || isFlip() || animTarget == climbanim || animTarget == sneakanim || animTarget == rollanim || animTarget == walkanim || animTarget == backhandspringanim || isFlip() || isWallJump()) + if (animation[animTarget].attack || isRun() || animTarget == staggerbackhardanim || isFlip() || animTarget == climbanim || animTarget == sneakanim || animTarget == rollanim || animTarget == walkanim || animTarget == backhandspringanim || isWallJump()) calcrot = 1; if (animCurrent != animTarget) calcrot = 1;