mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
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
This commit is contained in:
+12
-4
@@ -2316,7 +2316,9 @@ BOOLEAN LightRevealWall(INT16 sX, INT16 sY, INT16 sSrcX, INT16 sSrcY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
||||||
while(pStruct!=NULL)
|
|
||||||
|
//while(pStruct!=NULL)
|
||||||
|
while(pStruct!=NULL && pStruct->usIndex<NUMBEROFTILES) //lal bugfix
|
||||||
{
|
{
|
||||||
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
||||||
switch(TileElem->usWallOrientation)
|
switch(TileElem->usWallOrientation)
|
||||||
@@ -2337,7 +2339,9 @@ BOOLEAN LightRevealWall(INT16 sX, INT16 sY, INT16 sSrcX, INT16 sSrcY)
|
|||||||
}
|
}
|
||||||
|
|
||||||
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
||||||
while(pStruct!=NULL)
|
|
||||||
|
//while(pStruct!=NULL)
|
||||||
|
while(pStruct!=NULL && pStruct->usIndex<NUMBEROFTILES) //lal bugfix
|
||||||
{
|
{
|
||||||
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
||||||
switch(TileElem->usWallOrientation)
|
switch(TileElem->usWallOrientation)
|
||||||
@@ -2392,7 +2396,9 @@ TILE_ELEMENT *TileElem;
|
|||||||
fDoLeftWalls=FALSE;
|
fDoLeftWalls=FALSE;
|
||||||
|
|
||||||
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
||||||
while(pStruct!=NULL)
|
|
||||||
|
//while(pStruct!=NULL)
|
||||||
|
while(pStruct!=NULL && pStruct->usIndex<NUMBEROFTILES) // lal bugfix
|
||||||
{
|
{
|
||||||
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
||||||
switch(TileElem->usWallOrientation)
|
switch(TileElem->usWallOrientation)
|
||||||
@@ -2413,7 +2419,9 @@ TILE_ELEMENT *TileElem;
|
|||||||
}
|
}
|
||||||
|
|
||||||
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
pStruct=gpWorldLevelData[uiTile].pStructHead;
|
||||||
while(pStruct!=NULL)
|
|
||||||
|
//while(pStruct!=NULL)
|
||||||
|
while(pStruct!=NULL && pStruct->usIndex<NUMBEROFTILES) //lal bugfix
|
||||||
{
|
{
|
||||||
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
TileElem = &(gTileDatabase[pStruct->usIndex]);
|
||||||
switch(TileElem->usWallOrientation)
|
switch(TileElem->usWallOrientation)
|
||||||
|
|||||||
Reference in New Issue
Block a user