diff Actor.cpp @ 303:3dcc9d945eeb

DamageMonsterFromParty
author Nomad
date Tue, 19 Feb 2013 15:39:50 +0200
parents 0ea5fbd16edb
children cc8e4dc397ec 72faa54ff319
line wrap: on
line diff
--- a/Actor.cpp	Tue Feb 19 13:31:50 2013 +0200
+++ b/Actor.cpp	Tue Feb 19 15:39:50 2013 +0200
@@ -297,16 +297,16 @@
 }
 
 //----- (004089C7) --------------------------------------------------------
-bool Actor::IsAlive()
+bool Actor::IsNotAlive()
 {
   signed int v1; // esi@1
-  unsigned __int16 v2; // ax@3
+  //unsigned __int16 v2; // ax@3
 
   v1 = 0;
-  if ( (signed __int64)this->pActorBuffs[5].uExpireTime > 0 )
+  if (pActorBuffs[5].uExpireTime)
     v1 = 1;
-  v2 = this->uAIState;
-  return (v1 | (v2 == Dying) | (v2 == Dead) | (v2 == Removed) | (v2 == Summoned) | (v2 == Disabled)) != 0;
+  //v2 = this->uAIState;
+  return (v1 | (uAIState == Dying) | (uAIState == Dead) | (uAIState == Removed) | (uAIState == Summoned) | (uAIState == Disabled)) != 0;
 }
 
 //----- (004086E9) --------------------------------------------------------
@@ -589,7 +589,7 @@
               a1.uSectorID = pIndoor->GetSector(v13, v14, v15);
               v18 = 8 * LODWORD(v120);
               LOBYTE(v18) = 8 * LOBYTE(v120) | AI_OBJECT_ACTOR;
-              a1.field_58 = v18;
+              a1.field_58_pid = v18;
               a1.uSpriteFrameID = 0;
               a1.field_5C = 0;
               a1.field_60_distance_related_prolly_lod = 3;
@@ -672,9 +672,9 @@
             a1.uSectorID = v88;
             LODWORD(v119) = v89;
             v90 = 8 * LODWORD(v120);
-            LOBYTE(v90) = 8 * LOBYTE(v120) | 3;
+            LOBYTE(v90) = 8 * LOBYTE(v120) | OBJECT_Actor;
             a1.uSpriteFrameID = 0;
-            a1.field_58 = v90;
+            a1.field_58_pid = v90;
             a1.field_5C = 0;
             a1.field_60_distance_related_prolly_lod = 3;
             if ( (double)v89 >= 307.2 )
@@ -809,7 +809,7 @@
               a1.uAttributes = 0;
               a1.uSectorID = 0;
               a1.uSpriteFrameID = 0;
-              a1.field_58 = v116;
+              a1.field_58_pid = v116;
               a1.field_5C = 0;
               a1.field_60_distance_related_prolly_lod = stru_50C198._427546(v30 + 2500);
               a1.uFacing = v32;
@@ -1361,8 +1361,8 @@
   a1.uAttributes = 0;
   a1.uSectorID = pIndoor->GetSector(v73, v74, v75);
   v78 = 8 * LODWORD(v120);
-  LOBYTE(v78) = 8 * LOBYTE(v120) | 3;
-  a1.field_58 = v78;
+  LOBYTE(v78) = 8 * LOBYTE(v120) | OBJECT_Actor;
+  a1.field_58_pid = v78;
   a1.uSpriteFrameID = 0;
   a1.field_5C = 0;
   a1.field_60_distance_related_prolly_lod = 3;
@@ -1579,7 +1579,7 @@
   v12 = 8 * v15;
   LOBYTE(v12) = 8 * v15 | AI_OBJECT_ACTOR;
   a1.uSpriteFrameID = 0;
-  a1.field_58 = v12;
+  a1.field_58_pid = v12;
   a1.field_5C = 0;
   if ( (double)v11 >= 307.2 )
   {
@@ -1683,9 +1683,9 @@
   a1.uAttributes = 0;
   a1.uSectorID = pIndoor->GetSector(v5, a1.vPosition.y, v6);
   v7 = 8 * v10;
-  LOBYTE(v7) = 8 * v10 | 3;
+  LOBYTE(v7) = 8 * v10 | OBJECT_Actor;
   a1.uSpriteFrameID = 0;
-  a1.field_58 = v7;
+  a1.field_58_pid = v7;
   a1.field_5C = 0;
   a1.field_60_distance_related_prolly_lod = 3;
   a1.field_61 = 4;
@@ -3868,7 +3868,7 @@
 			continue;
 		  }
 		}
-		else if ( v7->IsAlive() == 1 )
+		else if (v7->IsNotAlive())
 		{
 		  v24 = v4;
 		  v3->uLastCharacterIDToHit = v4;