diff Actor.cpp @ 1110:cf6cd674c398

bitwise operator ambiguity reduced
author Grumpy7
date Mon, 27 May 2013 23:05:32 +0200
parents cde32f9b5f33
children d110108dab74
line wrap: on
line diff
--- a/Actor.cpp	Mon May 27 22:25:27 2013 +0200
+++ b/Actor.cpp	Mon May 27 23:05:32 2013 +0200
@@ -230,16 +230,14 @@
 //----- (0040894B) --------------------------------------------------------
 bool Actor::CanAct()
 {
-  signed int v1; // esi@1
+  bool v1; // esi@1
   bool v2; // edi@2
   unsigned __int16 v3; // ax@6
 
-  v1 = 0;
   v2 = (signed __int64)this->pActorBuffs[5].uExpireTime > 0;// stoned
-  if ( (signed __int64)this->pActorBuffs[6].uExpireTime > 0 )// paralyzed
-    v1 = 1;
+  v1 = (signed __int64)this->pActorBuffs[6].uExpireTime > 0;// paralyzed
   v3 = this->uAIState;
-  return (v2 | v1 | v3 == Dying | v3 == Dead | v3 == Removed | v3 == Summoned | v3 == Disabled) == 0;
+  return (v2 || v1 || v3 == Dying || v3 == Dead || v3 == Removed || v3 == Summoned || v3 == Disabled);
 }
 
 //----- (004089C7) --------------------------------------------------------