diff mm7_4.cpp @ 2255:4c9fef516e0a

immolation cleaned up a bit
author Grumpy7
date Thu, 27 Feb 2014 00:27:58 +0100
parents aff7a7b072b7
children 27f2a2c2fd8f
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Feb 26 23:35:46 2014 +0100
+++ b/mm7_4.cpp	Thu Feb 27 00:27:58 2014 +0100
@@ -264,10 +264,10 @@
   signed int v10; // eax@15
   __int16 *v11; // edx@16
   int v12; // eax@20
-  int v13; // ebx@20
-  unsigned int *v14; // esi@21
-  unsigned int v15; // ecx@21
-  unsigned int v16; // eax@21
+  int numberOfActorsAffected; // ebx@20
+  unsigned int v14; // esi@21
+  //unsigned int v15; // ecx@21
+  //unsigned int v16; // eax@21
   int v18; // eax@21
   signed int v19; // eax@21
   bool recovery_HP; // ebx@25
@@ -277,7 +277,7 @@
   int v27; // eax@36
   int v28; // eax@37
   signed int v31; // ecx@53
-  int v41[100]; // [sp+4h] [bp-22Ch]@20
+  int actorsAffectedByImmolation[100]; // [sp+4h] [bp-22Ch]@20
   SpriteObject a1; // [sp+194h] [bp-9Ch]@15
   Vec3_int_ a3; // [sp+204h] [bp-2Ch]@15
   bool has_dragon_flag; // [sp+210h] [bp-20h]@22
@@ -363,28 +363,22 @@
       }
       a1.uObjectDescID = v10;
       a1.field_60_distance_related_prolly_lod = 0;
-      v12 = 8 * pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION].uCaster;
-      LOBYTE(v12) = v12 | OBJECT_Player;
       a1.uAttributes = 0;
       a1.uSectorID = 0;
       a1.uSpriteFrameID = 0;
-      a1.spell_caster_pid = v12;
+      a1.spell_caster_pid = PID(OBJECT_Player, pParty->pPartyBuffs[PARTY_BUFF_IMMOLATION].uCaster);
       a1.uFacing = 0;
       a1.uSoundID = 0;
-      v13 = _46A89E_immolation_effect((int)v41, 100, 307);
-      for ( v9 = 0; v9 < v13; ++v9 )
+      numberOfActorsAffected = _46A89E_immolation_effect(actorsAffectedByImmolation, 100, 307);
+      for ( v9 = 0; v9 < numberOfActorsAffected; ++v9 )
       {
-        v14 = (unsigned int *)&v41[v9];
-        v15 = *v14;
-        v16 = *v14;
-        a1.vPosition.x = pActors[v16].vPosition.x;
-        a1.vPosition.y = pActors[v16].vPosition.y;
-        a1.vPosition.z = pActors[v16].vPosition.z;
-        v18 = 8 * v15;
-        LOBYTE(v18) = PID(OBJECT_Actor,v15);
-        a1.spell_target_pid = v18;
+        v14 = actorsAffectedByImmolation[v9];
+        a1.vPosition.x = pActors[v14].vPosition.x;
+        a1.vPosition.y = pActors[v14].vPosition.y;
+        a1.vPosition.z = pActors[v14].vPosition.z;
+        a1.spell_target_pid = PID(OBJECT_Actor,v14);
         v19 = a1.Create(0, 0, 0, 0);
-        DamageMonsterFromParty(PID(OBJECT_Item,v19), *v14, &a3);
+        DamageMonsterFromParty(PID(OBJECT_Item,v19), v14, &a3);
       }
     }