diff mm7_4.cpp @ 569:f451efdb7c8b

* Party buff icons drawing (right panel) * Water Walk works & draws * Fly works & draws * Invisibility sfx works * Some player buff icons draw
author Nomad
date Tue, 05 Mar 2013 16:14:22 +0200
parents fcbb3c281217
children 628694cd5744 346dc5fc2969
line wrap: on
line diff
--- a/mm7_4.cpp	Tue Mar 05 04:30:20 2013 +0200
+++ b/mm7_4.cpp	Tue Mar 05 16:14:22 2013 +0200
@@ -3424,11 +3424,11 @@
     {
       if ( pParty->bFlying )
       {
-        if ( !(pParty->pPartyBuffs[7].uFlags & 1) )
-        {
-          v5 = v4 * pParty->pPartyBuffs[7].uPower;
-          __debugbreak();
-		  v6 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[7].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[7].uCaster + 2000];
+        if ( !(pParty->pPartyBuffs[PARTY_BUFF_FLY].uFlags & 1) )
+        { // colliding with something in the air - fall down
+          v5 = v4 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uPower;
+          //__debugbreak();
+		  v6 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[7].uCaster + 2000];
           v7 = *v6 < v5;
           *v6 -= v5;
           if ( v7 )
@@ -3441,25 +3441,27 @@
         }
       }
     }
+
     if (pParty->WaterWalkActive())
     {
-      if (pParty->uFlags & 0x80 )
-      {
-        if ( !(pParty->pPartyBuffs[18].uFlags & 1) )
-        {
-          __debugbreak();
-          v8 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[18].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[18].uCaster + 2000];
+      if (pParty->uFlags & PARTY_FLAGS_1_STANDING_ON_WATER )
+      {
+        if ( !(pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uFlags & 1) )
+        { // taking on water
+          //__debugbreak();
+          v8 = (int *)&pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_WATER_WALK].uCaster].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[18].uCaster + 2000];
           v7 = *v8 < v4;
           *v8 -= v4;
           if ( v7 )
           {
             *v8 = 0;
-            LOBYTE(pParty->uFlags) &= 0x7Fu;
+            pParty->uFlags &= ~PARTY_FLAGS_1_STANDING_ON_WATER;
             v51 = 1;
           }
         }
       }
     }
+
     if (pParty->ImmolationActive())
     {
       //SpriteObject::SpriteObject(&a1);