changeset 77:7ad8eaa172c5

Rotate fixed
author Ritor1
date Mon, 28 Jan 2013 23:46:41 +0600
parents 5b9ef61560cf
children d56c13146285
files Game.cpp Outdoor.cpp Render.cpp
diffstat 3 files changed, 9 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/Game.cpp	Mon Jan 28 14:52:18 2013 +0600
+++ b/Game.cpp	Mon Jan 28 23:46:41 2013 +0600
@@ -74,11 +74,11 @@
   }
   else
   {
-    if ( pParty->vPosition.x != pParty->vPrevPosition.x | pParty->sRotationY != pParty->sPrevRotationY | pParty->vPosition.y != pParty->vPrevPosition.y 
-		| pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.z != pParty->vPrevPosition.z | pParty->sEyelevel != pParty->sPrevEyelevel )
+    if ( pParty->vPosition.x != pParty->vPrevPosition.x | pParty->sRotationY != pParty->sPrevRotationY | pParty->vPosition.y != pParty->vPrevPosition.z 
+		| pParty->sRotationX != pParty->sPrevRotationX | pParty->vPosition.z != pParty->vPrevPosition.y | pParty->sEyelevel != pParty->sPrevEyelevel )
       pParty->uFlags |= 2u;
-    pParty->vPrevPosition = pParty->vPosition;
-    pParty->vPrevPosition.y = pParty->vPosition.y;
+    pParty->vPrevPosition.x = pParty->vPosition.x;
+    pParty->vPrevPosition.y = pParty->vPosition.z;
     //v0 = &pRenderer;
     pParty->sPrevRotationY = pParty->sRotationY;
     pParty->vPrevPosition.z = pParty->vPosition.y;
--- a/Outdoor.cpp	Mon Jan 28 14:52:18 2013 +0600
+++ b/Outdoor.cpp	Mon Jan 28 23:46:41 2013 +0600
@@ -63,7 +63,7 @@
                                           * (signed __int64)pParty->field_18) >> 16);
   v3 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi);
   pIndoorCamera->field_4C = v1;
-  pIndoorCamera->pos.y = pParty->vPosition.y - pParty->field_18 * (stru_5C6E00->SinCos(pIndoorCamera->sRotationY) / 2048.0);
+  pIndoorCamera->pos.y = pParty->vPosition.y - ((unsigned __int64)(v3 * (signed __int64)pParty->field_18) >> 16);
   pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel;
   if ( v2 || pRenderer->pRenderD3D )
   {
--- a/Render.cpp	Mon Jan 28 14:52:18 2013 +0600
+++ b/Render.cpp	Mon Jan 28 23:46:41 2013 +0600
@@ -1003,7 +1003,7 @@
   __int16 v103; // [sp+10h] [bp-64h]@190
   __int16 v104; // [sp+12h] [bp-62h]@190
   } v102;
-  int pHeight; // [sp+1Ch] [bp-58h]@1
+  int v105; // [sp+1Ch] [bp-58h]@1
   int v106; // [sp+20h] [bp-54h]@3
   int v107; // [sp+24h] [bp-50h]@3
   int v108; // [sp+28h] [bp-4Ch]@9
@@ -1026,7 +1026,7 @@
   int v125; // [sp+6Ch] [bp-8h]@9
   int v126; // [sp+70h] [bp-4h]@9
 
-  pHeight = pIndoorCamera->sRotationY / ((signed int)stru_5C6E00->uIntegerHalfPi / 2);
+  v105 = pIndoorCamera->sRotationY / ((signed int)stru_5C6E00->uIntegerHalfPi / 2);
   v0 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerDoublePi - pIndoorCamera->sRotationY);
   v1 = stru_5C6E00->uDoublePiMask & (stru_5C6E00->uIntegerPi + v0);
   v124 = ((pIndoorCamera->uMapGridCellX << 16) + 3 * stru_5C6E00->SinCos(
@@ -1151,7 +1151,7 @@
   v126 = 0;
   v17 = v117 - 1;
   v18 = v116 - 1;
-  switch ( pHeight )
+  switch ( v105 )
   {
     case 0:
     case 7:
@@ -1568,7 +1568,7 @@
   ptr_801A08 = pVerticesSR_806210;
   ptr_801A04 = pVerticesSR_801A10;
   v126 = v69;
-  if ( pHeight && pHeight != 7 && pHeight != 3 && pHeight != 4 )
+  if ( v105 && v105 != 7 && v105 != 3 && v105 != 4 )
   {
     for ( i = v69; i >= 1; --i )
     {