diff mm7_5.cpp @ 89:98cd93e14777

pointer fixes
author zipi
date Wed, 06 Feb 2013 21:19:42 +0000
parents 1faa29fd4c2d
children d61f6bc04bf2
line wrap: on
line diff
--- a/mm7_5.cpp	Mon Feb 04 17:21:02 2013 +0600
+++ b/mm7_5.cpp	Wed Feb 06 21:19:42 2013 +0000
@@ -4156,7 +4156,7 @@
           if ( pUIMessageType == UIMSG_PlayerCreationClickOK )
           {
             GUIWindow::Create(580, 431, 0, 0, (enum WindowType)90, (int)pPlayerCreationUI_BtnOK, 0);
-            if ( PlayerCreation_ComputeAttributeBonus() || !sub_4908DE() )
+            if ( PlayerCreation_ComputeAttributeBonus() || !PlayerCreation_Chose4Skills() )
               GameUI_StatusBar_TimedStringTimeLeft = GetTickCount() + 4000;
             else
               uGameState = 6;
@@ -4947,7 +4947,7 @@
   int v24; // eax@18
   Vec3_int_ v25; // ST04_12@19
   unsigned int v26; // ebx@20
-  char *v27; // edi@20
+  Player *v27; // edi@20
   char *v28; // edi@27
   int v29; // ebx@29
   int v30; // eax@29
@@ -5073,15 +5073,15 @@
           if ( sub_407A1C(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z + pParty->sEyelevel, v25) )
           {
             v26 = 0;
-            v27 = (char *)&pParty->pPlayers[0].pConditions[15];
+            v27 = pParty->pPlayers;//[0].pConditions[15];
             do
             {
-              if ( !(*((int *)v27 - 1) | *((int *)v27 - 2)) && !*(_QWORD *)v27 && !*((_QWORD *)v27 + 1) )
+				if ( !(HIDWORD(v27->pConditions[14]) | LODWORD(v27->pConditions[14])) && !v27->pConditions[15] && !v27->pConditions[16] )
                 DamagePlayerFromMonster(*((short *)v1 - 300), stru_50FE08.field_450[v43], pVelocity, v26);
-              v27 += 6972;
+              ++v27;
               ++v26;
             }
-            while ( (signed int)v27 < (signed int)&pParty->pHirelings[1].evtb );
+			while ( v27 <= &pParty->pPlayers[3] );
           }
         }
         uActorID = 0;