# HG changeset patch # User Ritor1 # Date 1383305389 -21600 # Node ID 5cd26f2c69048a33bb5c0afb4241763e08a1b241 # Parent 2647e2f820a6249228228868b08e5cf3cec1ea44 small fix diff -r 2647e2f820a6 -r 5cd26f2c6904 Indoor.cpp --- 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 ) { diff -r 2647e2f820a6 -r 5cd26f2c6904 Render.cpp --- 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]); } diff -r 2647e2f820a6 -r 5cd26f2c6904 UI/UiGame.cpp --- 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);