diff mm7_4.cpp @ 90:d61f6bc04bf2

more pointer fixes
author zipi
date Wed, 06 Feb 2013 22:32:43 +0000
parents 98cd93e14777
children b7ff791b1333 2fb33d31ca0d
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Feb 06 21:19:42 2013 +0000
+++ b/mm7_4.cpp	Wed Feb 06 22:32:43 2013 +0000
@@ -14436,7 +14436,7 @@
   AIDirection a3; // [sp+4h] [bp-68h]@21
   AIDirection v14; // [sp+20h] [bp-4Ch]@21
   AIDirection v15; // [sp+3Ch] [bp-30h]@21
-  SpellBuff *v16; // [sp+58h] [bp-14h]@2
+  Actor *v16; // [sp+58h] [bp-14h]@2
   int v17; // [sp+5Ch] [bp-10h]@6
   stru262_TurnBased *v18; // [sp+60h] [bp-Ch]@1
   int v19; // [sp+64h] [bp-8h]@8
@@ -14448,12 +14448,13 @@
   v20 = 0;
   if ( (signed int)uNumActors > 0 )
   {
-    v3 = pActors[0].pActorBuffs;
-    v16 = pActors[0].pActorBuffs;
+    //v3 = pActors;//[0].pActorBuffs;
+    v16 = pActors;//[0].pActorBuffs;
+	v3 = v16->pActorBuffs;
     do
     {
-      v4 = (Actor *)((char *)&v3[-13] - 4);
-      if ( SHIDWORD(v3[3].uExpireTime) < v2 || SHIDWORD(v3[3].uExpireTime) <= v2 && LODWORD(v3[3].uExpireTime) <= v2 )
+      v4 = v16;
+	  if ( SHIDWORD(v3[3].uExpireTime) < v2 || SHIDWORD(v3[3].uExpireTime) <= v2 && LODWORD(v3[3].uExpireTime) <= v2 )
         v17 = v2;
       else
         v17 = 1;
@@ -14516,8 +14517,8 @@
         }
       }
       ++v20;
-      v3 = (SpellBuff *)((char *)v16 + 836);
-      v16 = (SpellBuff *)((char *)v16 + 836);
+	  v3 = v16[1].pActorBuffs;
+      ++v16;
     }
     while ( (signed int)v20 < (signed int)uNumActors );
   }