diff mm7_4.cpp @ 609:42d5777c2f47

Слияние
author Ritor1
date Wed, 06 Mar 2013 18:22:25 +0600
parents f451efdb7c8b
children 628694cd5744 346dc5fc2969
line wrap: on
line diff
--- a/mm7_4.cpp	Wed Mar 06 18:22:07 2013 +0600
+++ b/mm7_4.cpp	Wed Mar 06 18:22:25 2013 +0600
@@ -3210,7 +3210,7 @@
     if ( v7 == 0 )
       v7 = 1;
     if (pPlayer->expression == CHARACTER_EXPRESSION_21)
-      pFrame = pPlayerFrameTable->GetFrameBy_y(&pPlayer->field_1AA8, &pPlayer->field_1AA4, pMiscTimer->uTimeElapsed);
+      pFrame = pPlayerFrameTable->GetFrameBy_y(&pPlayer->_expression21_frameset, &pPlayer->_expression21_animtime, pMiscTimer->uTimeElapsed);
     else
       pFrame = pPlayerFrameTable->GetFrameBy_x(v7, pPlayer->uExpressionTimePassed);
     if (pPlayer->field_1AA2 != pFrame->uTextureID - 1 || v22 )
@@ -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);
@@ -4335,25 +4337,25 @@
 }
 
 //----- (00494B5E) --------------------------------------------------------
-PlayerFrame *PlayerFrameTable::GetFrameBy_y(int *a2, int *a3, int a4)
+PlayerFrame *PlayerFrameTable::GetFrameBy_y(int *pFramesetID, int *pAnimTime, int a4)
 {
   PlayerFrameTable *v4; // edi@1
   int v5; // esi@1
   int v6; // eax@2
 
   v4 = this;
-  v5 = a4 + *a3;
-  if ( v5 < 8 * this->pFrames[*a2].uAnimTime )
-  {
-    *a3 = v5;
+  v5 = a4 + *pAnimTime;
+  if ( v5 < 8 * this->pFrames[*pFramesetID].uAnimTime )
+  {
+    *pAnimTime = v5;
   }
   else
   {
     v6 = rand() % 4 + 21;
-    *a2 = v6;
-    *a3 = 8 * v5 % v4->pFrames[v6].uAnimTime;
-  }
-  return &v4->pFrames[*a2];
+    *pFramesetID = v6;
+    *pAnimTime = 8 * v5 % v4->pFrames[v6].uAnimTime;
+  }
+  return &v4->pFrames[*pFramesetID];
 }
 
 //----- (00494BC3) --------------------------------------------------------
@@ -4806,33 +4808,16 @@
 //----- (00495430) --------------------------------------------------------
 char *__fastcall GetReputationString(signed int a1)
 {
-  char *result; // eax@2
-
-  if ( a1 < 25 )
-  {
-    if ( a1 < 6 )
-    {
-      if ( a1 < -5 )
-      {
-        result = pGlobalTXT_LocalizationStrings[402];
-        if ( a1 < -24 )
-          result = pGlobalTXT_LocalizationStrings[434];
-      }
-      else
-      {
-        result = pGlobalTXT_LocalizationStrings[399];
-      }
-    }
-    else
-    {
-      result = pGlobalTXT_LocalizationStrings[392];
-    }
-  }
+  if (a1 >= 25)
+    return pGlobalTXT_LocalizationStrings[379]; // Hated
+  else if (a1 >= 6)
+    return pGlobalTXT_LocalizationStrings[392]; // Unfriendly
+  else if (a1 >= -5)
+    return pGlobalTXT_LocalizationStrings[399]; // Neutral;
+  else if (a1 >= -24)
+    return pGlobalTXT_LocalizationStrings[402]; // Friendly
   else
-  {
-    result = pGlobalTXT_LocalizationStrings[379];
-  }
-  return result;
+    return pGlobalTXT_LocalizationStrings[434]; // Respected;
 }
 
 //----- (00495461) --------------------------------------------------------