changeset 2177:e1199b655710

pParty->vPrevPosition.y = 1816; and pParty->vPrevPosition.z = 0;
author Ritor1
date Tue, 21 Jan 2014 18:45:00 +0600
parents 2f9689a85c31
children 43175acce099
files LOD.cpp SaveLoad.cpp
diffstat 2 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/LOD.cpp	Tue Jan 21 18:32:43 2014 +0600
+++ b/LOD.cpp	Tue Jan 21 18:45:00 2014 +0600
@@ -1563,9 +1563,9 @@
   if ( !tmp_file )
     return 5;
   if (!bRewrite_data)
-    size_correction=0;
+    size_correction = 0;
   else
-    size_correction=pSubIndices[insert_index].uDataSize;
+    size_correction = pSubIndices[insert_index].uDataSize;
 
   //create chapter index
   LOD::Directory Lindx;
@@ -1587,7 +1587,7 @@
   if ( !bRewrite_data && (insert_index < uNumSubDirs) )
   {
     for( int i = uNumSubDirs; i > insert_index; --i )
-            memcpy(&pSubIndices[i], &pSubIndices[i-1], sizeof(LOD::Directory));
+            memcpy(&pSubIndices[i], &pSubIndices[i - 1], sizeof(LOD::Directory));
   }
   //insert
   memcpy(&pSubIndices[insert_index], pDir, sizeof(LOD::Directory));
--- a/SaveLoad.cpp	Tue Jan 21 18:32:43 2014 +0600
+++ b/SaveLoad.cpp	Tue Jan 21 18:45:00 2014 +0600
@@ -616,17 +616,23 @@
     pNew_LOD->AppendDirectory(&save_game_dir, &pSavegameHeader[0]);
 
     pNew_LOD->FixDirectoryOffsets();
-    pParty->vPrevPosition.y = 0;
+
     pParty->vPrevPosition.x = 12552;
+    pParty->vPrevPosition.y = 1816;
+    pParty->vPrevPosition.z = 0;
+
     pParty->vPosition.x = 12552;
+    pParty->vPosition.y = 1816;
     pParty->vPosition.z = 0;
+
     pParty->uFallStartY = 0;
+
     pParty->sPrevRotationX = 0;
+    pParty->sPrevRotationY = 512;
+
     pParty->sRotationX = 0;
-    pParty->vPrevPosition.z = 1816;
-    pParty->vPosition.y = 1816;
-    pParty->sPrevRotationY = 512;
     pParty->sRotationY = 512;
+
     SaveGame(1, 1);
   }
   free(pSave);