Mercurial > mm7
changeset 1114:d110108dab74
fixing bad bitwise operator fix
author | Grumpy7 |
---|---|
date | Tue, 28 May 2013 00:49:43 +0200 |
parents | 39eaa6b00141 |
children | 849b848ed871 |
files | Actor.cpp |
diffstat | 1 files changed, 8 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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) --------------------------------------------------------