Fixed regression caused by r9305 where maps in some mods like AIMNAS became unwalkable completely.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9317 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Shadooow
2022-03-06 06:49:55 +00:00
parent 6bad9f09b2
commit 0d5c1be5d4
+4 -6
View File
@@ -11,7 +11,7 @@
#include "Random.h"
#include "Pathai.h"
#endif
#include "Map Information.h"
UINT32 guiForceRefreshMousePositionCalculation = 0;
@@ -1279,12 +1279,10 @@ INT16 MapY( INT32 sGridNo )
bool GridNoOnWalkableWorldTile(INT32 sGridNo)
{
//Shadooow: this will compare sGridNo height with height of the center grid of the map, as long as the center of the map is on a walkable height it will work properly
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;
MAP_ELEMENT *pMapElementCenter = &(gpWorldLevelData[gMapInformation.sCenterGridNo]);
return pMapElement->sHeight == pMapElementCenter->sHeight;
}
BOOLEAN GridNoOnVisibleWorldTile( INT32 sGridNo )