diff mm7_4.cpp @ 2030:47ab41698f9d

sudden drop in flight fix
author Ritor1
date Mon, 18 Nov 2013 13:17:12 +0600
parents beb97b20c3ed
children 7a9477135943
line wrap: on
line diff
--- a/mm7_4.cpp	Mon Nov 18 10:07:24 2013 +0600
+++ b/mm7_4.cpp	Mon Nov 18 13:17:12 2013 +0600
@@ -547,7 +547,7 @@
   int result; // eax@1
   int v4; // eax@2
   int v5; // edi@5
-  int *v6; // ecx@5
+  bool cursed_flag; // ecx@5
   char v7; // sf@5
   int *v8; // ecx@10
   int v9; // edi@15
@@ -607,17 +607,15 @@
       if ( pParty->bFlying )
       {
         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 - 1].pConditions[0];//&stru_AA1058[4].pSounds[6972 * pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster + 2000];
-          v7 = *v6 < v5;
-          *v6 -= v5;
-          if ( v7 )
+          cursed_flag = pParty->pPlayers[pParty->pPartyBuffs[PARTY_BUFF_FLY].uCaster - 1].pConditions[0];//cursed
+          v7 = cursed_flag < v5;
+          //cursed_flag -= v5;
+          if ( !v7 )
           {
-            *v6 = 0;
             pParty->uFlags &= 0xFFFFFFBFu;
-            pParty->bFlying = 0;
+            pParty->bFlying = false;
             v51 = 1;
           }
         }
@@ -732,9 +730,16 @@
         if ( v24 > 134 )
         {
           if ( v24 == 529 )
-            goto LABEL_43;
+          {
+            v20 = 1;
+            v50 = 1;
+            goto LABEL_51;
+          }
           if ( v24 == 535 )
-            goto LABEL_44;
+          {
+            v20 = 1;
+            goto LABEL_51;
+          }
           if ( v24 == 515 )
           {
             v47 = 1;
@@ -742,7 +747,10 @@
           else
           {
             if ( v24 == 532 )
-              goto LABEL_50;
+            {
+              v50 = 1;
+              goto LABEL_51;
+            }
           }
         }
         else
@@ -757,31 +765,40 @@
               {
                 v27 = v26 - 1;
                 if ( !v27 )
-                  goto LABEL_50;
+                {
+                  v50 = 1;
+                  goto LABEL_51;
+                }
                 v28 = v27 - 6;
                 if ( v28 )
                 {
                   if ( v28 != 3 )
                     goto LABEL_51;
-LABEL_50:
+//LABEL_50:
                   v50 = 1;
                   goto LABEL_51;
                 }
               }
             }
-LABEL_44:
+//LABEL_44:
             v20 = 1;
             goto LABEL_51;
           }
           v29 = v25 - 54;
           if ( !v29 )
-            goto LABEL_44;
+          {
+            v20 = 1;
+            goto LABEL_51;
+          }
           v30 = v29 - 1;
           if ( !v30 )
-            goto LABEL_50;
+          {
+            v50 = 1;
+            goto LABEL_51;
+          }
           if ( v30 == 11 )
           {
-LABEL_43:
+//LABEL_43:
             v20 = 1;
             v50 = 1;
             goto LABEL_51;