diff mm7_1.cpp @ 58:41cbaabde2cb

BLV render
author Nomad
date Thu, 25 Oct 2012 02:05:16 +0200
parents 0f4ed4f0f472
children 5159d2e6f559
line wrap: on
line diff
--- a/mm7_1.cpp	Wed Oct 24 17:33:46 2012 +0200
+++ b/mm7_1.cpp	Thu Oct 25 02:05:16 2012 +0200
@@ -3811,8 +3811,8 @@
   if ( uCurrentlyLoadedLevelType == LEVEL_Outdoor)
     uRestUI_FoodRequiredToRest = pOutdoor->GetNumFoodRequiredToRestInCurrentPos(
                                    pParty->vPosition.x,
-                                   pParty->vPosition.z,
-                                   pParty->vPosition.y);
+                                   pParty->vPosition.y,
+                                   pParty->vPosition.z);
   if ( sub_476387() )
   {
     v0 = (char *)&pParty->pPlayers[0].uClass;
@@ -4542,9 +4542,9 @@
     }
     v18 = (double)pParty->vPosition.x - (double)v14;
     *(float *)&a4 = v18;
-    v19 = (double)pParty->vPosition.z - (double)v38;
+    v19 = (double)pParty->vPosition.y - (double)v38;
     v33 = v19;
-    v41 = (double)pParty->sEyelevel + (double)pParty->vPosition.y - (double)v15;
+    v41 = (double)pParty->sEyelevel + (double)pParty->vPosition.z - (double)v15;
     *(float *)&sRotY = v19 * v19;
     *(float *)&sRotX = v18 * v18;
     v20 = sqrt(v41 * v41 + *(float *)&sRotX + *(float *)&sRotY);
@@ -5566,16 +5566,16 @@
     }
     a1.field_58 = 4;
     a1.uObjectDescID = v6;
-    a1.vPosition.y = pParty->vPosition.z;
+    a1.vPosition.y = pParty->vPosition.y;
     a1.vPosition.x = pParty->vPosition.x;
-    a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.y;
+    a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
     a1.uSoundID = 0;
     a1.uFacing = 0;
     a1.uAttributes = 8;
     v8 = pIndoor->GetSector(
            pParty->vPosition.x,
-           pParty->vPosition.z,
-           pParty->sEyelevel + pParty->vPosition.y);
+           pParty->vPosition.y,
+           pParty->sEyelevel + pParty->vPosition.z);
     a1.uSpriteFrameID = 0;
     a1.uSectorID = v8;
     memcpy(&a1.stru_24, &pParty->pPickedItem, sizeof(a1.stru_24));
@@ -5918,17 +5918,17 @@
               }
             }
             a1.uObjectDescID = v6;
-            a1.vPosition.y = pParty->vPosition.z;
+            a1.vPosition.y = pParty->vPosition.y;
             a1.field_58 = 4;
             a1.vPosition.x = pParty->vPosition.x;
-            a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.y;
+            a1.vPosition.z = pParty->sEyelevel + pParty->vPosition.z;
             a1.uSoundID = 0;
             a1.uFacing = 0;
             a1.uAttributes = 8;
             a1.uSectorID = pIndoor->GetSector(
                              pParty->vPosition.x,
-                             pParty->vPosition.z,
-                             pParty->sEyelevel + pParty->vPosition.y);
+                             pParty->vPosition.y,
+                             pParty->sEyelevel + pParty->vPosition.z);
             a1.uSpriteFrameID = 0;
             memcpy(&a1.stru_24, &pParty->pPickedItem, 0x24u);
             v8 = (int *)pMouse->GetCursorPos(&v25);
@@ -6481,13 +6481,13 @@
 
   v1 = &pIndoor->pFaces[uFaceID];
   //this = pGame->pIndoorCameraD3D;
-  v2 = &pIndoor->pVertices[*v1->pVertexIDs];
+  v2 = &pIndoor->pVertices[v1->pVertexIDs[0]];
   //v3 = *(_DWORD *)&v2->x;
   v4 = v2->z;
   //v5 = 0;
   if ( v1->pFacePlane_old.vNormal.x * (v2->x - pBLVRenderParams->vPartyPos.x)
      + v1->pFacePlane_old.vNormal.y * (v2->y - pBLVRenderParams->vPartyPos.y)
-     + v1->pFacePlane_old.vNormal.z * (v4 - pBLVRenderParams->vPartyPos.z) < 0 )
+     + v1->pFacePlane_old.vNormal.z * (v2->z - pBLVRenderParams->vPartyPos.z) < 0 )
   {
     dword_50B700 = 1;
   }