changeset 1983:5cd26f2c6904

small fix
author Ritor1
date Fri, 01 Nov 2013 17:29:49 +0600
parents 2647e2f820a6
children b00f5bb7d930
files Indoor.cpp Render.cpp UI/UiGame.cpp
diffstat 3 files changed, 9 insertions(+), 16 deletions(-) [+]
line wrap: on
line diff
--- a/Indoor.cpp	Fri Nov 01 14:44:06 2013 +0600
+++ b/Indoor.cpp	Fri Nov 01 17:29:49 2013 +0600
@@ -219,13 +219,13 @@
   this->uPartySectorID = v7;
   if ( !v7 )
   {
-    __debugbreak(); // shouldnt happen, please provide savegame
+    //__debugbreak(); // shouldnt happen, please provide savegame
     /*v8 = this->vPartyPos.z;
     this->vPartyPos.x = pParty->vPosition.x;
     v9 = pParty->vPosition.y;
     v10 = this->vPartyPos.x;
     this->vPartyPos.y = pParty->vPosition.y;*/
-    this->uPartySectorID = pIndoor->GetSector(v10, v9, v8);
+    this->uPartySectorID = pIndoor->GetSector(pParty->vPosition.x, pParty->vPosition.y, pParty->vPosition.z);
   }
   if ( pRenderer->pRenderD3D )
   {
--- a/Render.cpp	Fri Nov 01 14:44:06 2013 +0600
+++ b/Render.cpp	Fri Nov 01 17:29:49 2013 +0600
@@ -5368,8 +5368,7 @@
     v51 = (double)SLODWORD(v80);
     v75 = array_507D30;
     v52 = array_50AC10;
-    v80 = v73;
-    do
+    for ( v80 = v73; v80; --v80 )
     {
       if ( v51 <= v52->vWorldViewProjY )
       {
@@ -5379,17 +5378,11 @@
         memcpy(v53, v52, 0x30u);
       }
       ++v52;
-      --LODWORD(v80);
-    }
-    while ( v80 != 0.0 );
-  }
-  pSkyPolygon.uNumVertices = v74;
-  v61 = pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID];
-  v60 = &pSkyPolygon;
-  v59 = v74;
-  //v27 = pRenderer;
-//LABEL_18:
-  pRenderer->DrawIndoorSkyPolygon(v59, v60, v61);
+      //--LODWORD(v80);
+    }
+    //while ( v80 != 0.0 );
+  }
+  pRenderer->DrawIndoorSkyPolygon(v74, &pSkyPolygon, pBitmaps_LOD->pHardwareTextures[(signed __int16)pSkyPolygon.uTileBitmapID]);
 }
 
 
--- a/UI/UiGame.cpp	Fri Nov 01 14:44:06 2013 +0600
+++ b/UI/UiGame.cpp	Fri Nov 01 17:29:49 2013 +0600
@@ -376,7 +376,7 @@
     assert(pNPC->uProfession < sizeof(aNPCProfessionNames) / sizeof(*aNPCProfessionNames.data())); // sometimes buffer overflows; errors emerge both here and in dialogue text
     sprintfex(pTmpBuf.data(), pGlobalTXT_LocalizationStrings[429], pNPC->pName, aNPCProfessionNames[pNPC->uProfession]);//^Pi[%s] %s
   }
-  else
+  else if (pNPC->pName)
     strcpy(pTmpBuf.data(), pNPC->pName);
 
   window.DrawTitleText(pFontArrus, 483, 112, ui_game_dialogue_npc_name_color, pTmpBuf.data(), 3);