From 056e5e31c501427ea7fade8be673ba92a7bf7f07 Mon Sep 17 00:00:00 2001 From: Kriplo Date: Sun, 19 Jan 2014 18:17:58 +0000 Subject: [PATCH] Thanks to Flugente, he perform quick fix for overhead map crash after sector is cleared from enemy, but actual problem was created by me in r6744, I overwrite one condition by mistake, so this will fix the real source of problem. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6788 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/overhead map.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TileEngine/overhead map.cpp b/TileEngine/overhead map.cpp index a5f797a2..3ef3da1e 100644 --- a/TileEngine/overhead map.cpp +++ b/TileEngine/overhead map.cpp @@ -1064,7 +1064,7 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart pTile = &( gSmTileDB[ pNode->usIndex ] ); // Flugente: uninformed hack - if ( pTile && pTile->vo ) + //if ( pTile && pTile->vo ) { sX = sTempPosX_S; sY = sTempPosY_S; @@ -1098,7 +1098,7 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart pTile = &( gSmTileDB[ pNode->usIndex ] ); // Flugente: uninformed hack - if ( pTile && pTile->vo ) + //if ( pTile && pTile->vo ) { sX = sTempPosX_S; sY = sTempPosY_S - sHeight; @@ -1123,7 +1123,7 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart pNode = gpWorldLevelData[ usTileIndex ].pStructHead; while( pNode != NULL ) { - if(usTileIndex >= 0 && usTileIndex < GRIDSIZE)//dnl ch82 081213 + if ( pNode->usIndex < giNumberOfTiles )//if(usTileIndex >= 0 && usTileIndex < GRIDSIZE)//dnl ch82 081213 190113 fix incorrect condition { // Don't render itempools! if ( !( pNode->uiFlags & LEVELNODE_ITEM ) ) @@ -1131,7 +1131,7 @@ void RenderOverheadMap( INT16 sStartPointX_M, INT16 sStartPointY_M, INT16 sStart pTile = &( gSmTileDB[ pNode->usIndex ] ); // Flugente: uninformed hack - if ( pTile && pTile->vo ) + //if ( pTile && pTile->vo ) { sX = sTempPosX_S; sY = sTempPosY_S - (gTileDatabase[ pNode->usIndex ].sOffsetHeight/5);