# HG changeset patch # User Grumpy7 # Date 1369694983 -7200 # Node ID d110108dab747ab2a5adaf8006983ad44efed93f # Parent 39eaa6b0014187102b2a4ba5e35bb833531c8f04 fixing bad bitwise operator fix diff -r 39eaa6b00141 -r d110108dab74 Actor.cpp --- a/Actor.cpp Tue May 28 00:19:45 2013 +0200 +++ b/Actor.cpp Tue May 28 00:49:43 2013 +0200 @@ -230,27 +230,25 @@ //----- (0040894B) -------------------------------------------------------- bool Actor::CanAct() { - bool v1; // esi@1 - bool v2; // edi@2 + bool isparalyzed; // esi@1 + bool isstoned; // edi@2 unsigned __int16 v3; // ax@6 - v2 = (signed __int64)this->pActorBuffs[5].uExpireTime > 0;// stoned - v1 = (signed __int64)this->pActorBuffs[6].uExpireTime > 0;// paralyzed + isstoned = (signed __int64)this->pActorBuffs[5].uExpireTime > 0;// stoned + isparalyzed = (signed __int64)this->pActorBuffs[6].uExpireTime > 0;// paralyzed v3 = this->uAIState; - return (v2 || v1 || v3 == Dying || v3 == Dead || v3 == Removed || v3 == Summoned || v3 == Disabled); + return !(isstoned || isparalyzed || v3 == Dying || v3 == Dead || v3 == Removed || v3 == Summoned || v3 == Disabled); } //----- (004089C7) -------------------------------------------------------- bool Actor::IsNotAlive() { - signed int v1; // esi@1 + bool isparalyzed; // esi@1 //unsigned __int16 v2; // ax@3 - v1 = 0; - if (pActorBuffs[5].uExpireTime) - v1 = 1; + isparalyzed = (signed __int64)this->pActorBuffs[6].uExpireTime > 0;// paralyzed //v2 = this->uAIState; - return (v1 | (uAIState == Dying) | (uAIState == Dead) | (uAIState == Removed) | (uAIState == Summoned) | (uAIState == Disabled)) != 0; + return (isparalyzed || (uAIState == Dying) || (uAIState == Dead) || (uAIState == Removed) || (uAIState == Summoned) || (uAIState == Disabled)); } //----- (004086E9) --------------------------------------------------------