From 5f6afccf78e36aff960d4831908996dd26079b3a Mon Sep 17 00:00:00 2001 From: lalien Date: Thu, 20 Apr 2006 21:42:19 +0000 Subject: [PATCH] Bugfix: CTD when climbing on roof. (Lighting.cpp LightRevealWall and LightHideWall additional check added) git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@34 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- TileEngine/lighting.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/TileEngine/lighting.cpp b/TileEngine/lighting.cpp index 5fac760f..2384fd11 100644 --- a/TileEngine/lighting.cpp +++ b/TileEngine/lighting.cpp @@ -2316,7 +2316,9 @@ BOOLEAN LightRevealWall(INT16 sX, INT16 sY, INT16 sSrcX, INT16 sSrcY) } pStruct=gpWorldLevelData[uiTile].pStructHead; - while(pStruct!=NULL) + + //while(pStruct!=NULL) + while(pStruct!=NULL && pStruct->usIndexusIndex]); switch(TileElem->usWallOrientation) @@ -2337,7 +2339,9 @@ BOOLEAN LightRevealWall(INT16 sX, INT16 sY, INT16 sSrcX, INT16 sSrcY) } pStruct=gpWorldLevelData[uiTile].pStructHead; - while(pStruct!=NULL) + + //while(pStruct!=NULL) + while(pStruct!=NULL && pStruct->usIndexusIndex]); switch(TileElem->usWallOrientation) @@ -2392,7 +2396,9 @@ TILE_ELEMENT *TileElem; fDoLeftWalls=FALSE; pStruct=gpWorldLevelData[uiTile].pStructHead; - while(pStruct!=NULL) + + //while(pStruct!=NULL) + while(pStruct!=NULL && pStruct->usIndexusIndex]); switch(TileElem->usWallOrientation) @@ -2413,7 +2419,9 @@ TILE_ELEMENT *TileElem; } pStruct=gpWorldLevelData[uiTile].pStructHead; - while(pStruct!=NULL) + + //while(pStruct!=NULL) + while(pStruct!=NULL && pStruct->usIndexusIndex]); switch(TileElem->usWallOrientation)