diff Player.cpp @ 42:2bcc7b24c831

stats screen fixes, and boundary fixes
author zipi
date Sun, 20 Jan 2013 21:58:23 +0000
parents 352b15291822
children e753d08b78ec
line wrap: on
line diff
--- a/Player.cpp	Sun Jan 20 20:52:13 2013 +0000
+++ b/Player.cpp	Sun Jan 20 21:58:23 2013 +0000
@@ -6959,7 +6959,7 @@
   unsigned int thisa; // [sp+28h] [bp-4h]@22
 
   thisb = this;
-  v3 = (Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552];
+  v3 = &pParty->pPlayers[a2-1];//(Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552];
   v73 = 1;
   if ( pParty->bTurnBasedModeOn == 1 && (pTurnEngine->field_4 == 1 || pTurnEngine->field_4 == 3) )
     return;
@@ -6987,7 +6987,7 @@
         }
         v69 = 2;
 LABEL_111:
-        ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->Heal(v69);
+        pParty->pPlayers[a2-1].Heal(v69);//((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->Heal(v69);
       }
 LABEL_112:
       v3->PlaySound(36, 0);
@@ -7160,7 +7160,7 @@
         v33 = HIDWORD(v3->pConditions[15]);
         v34 = LODWORD(v3->pConditions[16]);
         v35 = HIDWORD(v3->pConditions[16]);
-        memset(&stru_AA1058[3].pSounds[6972 * a2 + 40552], 0, 0xA0u);
+        memset(&pParty->pPlayers[a2-1],0,0xA0u);//memset(&stru_AA1058[3].pSounds[6972 * a2 + 40552], 0, 0xA0u);
         HIDWORD(v3->pConditions[14]) = v31;
         LODWORD(v3->pConditions[15]) = v32;
         HIDWORD(v3->pConditions[15]) = v33;
@@ -7531,7 +7531,7 @@
         pMouse->RemoveHoldingItem();
         return;
       }
-      if ( ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
+      if ( pParty->pPlayers[a2-1].CanAct() )//if ( ((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
       {
         sub_467F48(pParty->pPickedItem.uItemID);
         v65 = 0;
@@ -7575,7 +7575,7 @@
       pAudioPlayer->PlaySound(v37, v39, v41, v43, v45, v48, v52, v61);
       return;
     }
-    if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
+    if ( !pParty->pPlayers[a2-1].CanAct() )//if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
     {
       v66 = aCharacterConditionNames[v3->GetMajorConditionIdx()];
       v57 = pGlobalTXT_LocalizationStrings[382];
@@ -7687,7 +7687,7 @@
   }
   if ( pCurrentScreen == 23 )
     return;
-  if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
+  if ( !pParty->pPlayers[a2-1].CanAct() )//if ( !((Player *)&stru_AA1058[3].pSounds[6972 * a2 + 40552])->CanAct() )
     goto LABEL_89;
   if ( bUnderwater == 1 )
   {