mirror of
https://github.com/1dot13/source.git
synced 2026-09-16 14:47:17 +02:00
Fixed dead enemies after autoresolve sometimes being placed on non-walkable grids which, if they dropped any items, made such items inaccessible as well.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9305 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -1277,7 +1277,15 @@ INT16 MapY( INT32 sGridNo )
|
|||||||
return( sYPos );
|
return( sYPos );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GridNoOnWalkableWorldTile(INT32 sGridNo)
|
||||||
|
{
|
||||||
|
MAP_ELEMENT *pMapElement = &(gpWorldLevelData[sGridNo]);
|
||||||
|
//Shadooow: as far as I know, Drassen Mine (tileset id 23) is the only map where the base land height isn't 0
|
||||||
|
//if there are more, add them into this hardcoded check
|
||||||
|
UINT8 sDefaultTilesetLandHeight = giCurrentTilesetID == 23 ? 80 : 0;
|
||||||
|
//ScreenMsg(FONT_MCOLOR_LTYELLOW, MSG_INTERFACE, L"GridNoOnWalkableWorldTile, tileset id: %i, gridno height level: %i", giCurrentTilesetID, pMapElement->sHeight);
|
||||||
|
return pMapElement->sHeight == sDefaultTilesetLandHeight;
|
||||||
|
}
|
||||||
|
|
||||||
BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo )
|
BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo )
|
||||||
{
|
{
|
||||||
@@ -1296,7 +1304,7 @@ BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo )
|
|||||||
if ( sWorldX >= 30 && sWorldX <= (gsTRX - gsTLX - 30) && sWorldY >= 20 && sWorldY <= (gsBLY - gsTLY - 10) )
|
if ( sWorldX >= 30 && sWorldX <= (gsTRX - gsTLX - 30) && sWorldY >= 20 && sWorldY <= (gsBLY - gsTLY - 10) )
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
return( TRUE );
|
return GridNoOnWalkableWorldTile(sGridNo);
|
||||||
}
|
}
|
||||||
|
|
||||||
return( FALSE );
|
return( FALSE );
|
||||||
|
|||||||
Reference in New Issue
Block a user