mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Brief: //dnl ch83
- Fix BigMaps cliff-prone problem. Details: - Bug which prevent merc to go prone and crawl in big maps with cliffs was reported by Buggler who already find source of problem which lies in DB_STRUCTURE_TILE struct variable sPosRelToBase. This variable contains relative position to base tile which and cannot simply be change to INT32 as data from JSD files are loaded into it. However reason for problem is because sPosRelToBase is not updated for quite bunch of structures when map size is changed so add macro which in real time perform conversion and update sPosRelToBase value. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -838,7 +838,11 @@ BOOLEAN ExplosiveDamageStructureAtGridNo( STRUCTURE * pCurrent, STRUCTURE **ppNe
|
||||
{
|
||||
if ( !(ppTile[ ubLoop ]->fFlags & TILE_ON_ROOF ) )
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
sStructGridNo = pBase->sGridNo + ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
sStructGridNo = AddPosRelToBase(pBase->sGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
// there might be two structures in this tile, one on each level, but we just want to
|
||||
// delete one on each pass
|
||||
|
||||
@@ -1461,8 +1465,11 @@ void ExplosiveDamageGridNo( INT32 sGridNo, INT16 sWoundAmt, UINT32 uiDist, BOOLE
|
||||
|
||||
for ( ubLoop = BASE_TILE; ubLoop < ubNumberOfTiles; ubLoop++)
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
sNewGridNo = sBaseGridNo + ppTile[ubLoop]->sPosRelToBase;
|
||||
|
||||
#else
|
||||
sNewGridNo = AddPosRelToBase(sBaseGridNo, ppTile[ubLoop]);
|
||||
#endif
|
||||
// look in adjacent tiles
|
||||
for ( ubLoop2 = 0; ubLoop2 < NUM_WORLD_DIRECTIONS; ubLoop2++ )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user