mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +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:
@@ -509,7 +509,11 @@ BOOLEAN AddToUndoListCmd( INT32 iMapIndex, INT32 iCmdCount )
|
||||
{
|
||||
// this loop won't execute for single-tile structures; for multi-tile structures, we have to
|
||||
// add to the undo list all the other tiles covered by the structure
|
||||
#if 0//dnl ch83 080114
|
||||
iCoveredMapIndex = pStructure->sBaseGridNo + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
iCoveredMapIndex = AddPosRelToBase(pStructure->sBaseGridNo, pStructure->pDBStructureRef->ppTile[ubLoop]);
|
||||
#endif
|
||||
AddToUndoList( iCoveredMapIndex );
|
||||
}
|
||||
pStructure = pStructure->pNext;
|
||||
@@ -537,11 +541,19 @@ void CheckMapIndexForMultiTileStructures( UINT32 usMapIndex )
|
||||
// for multi-tile structures we have to add, to the undo list, all the other tiles covered by the structure
|
||||
if (pStructure->fFlags & STRUCTURE_BASE_TILE)
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
iCoveredMapIndex = usMapIndex + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
iCoveredMapIndex = AddPosRelToBase(usMapIndex, pStructure->pDBStructureRef->ppTile[ubLoop]);
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0//dnl ch83 080114
|
||||
iCoveredMapIndex = pStructure->sBaseGridNo + pStructure->pDBStructureRef->ppTile[ubLoop]->sPosRelToBase;
|
||||
#else
|
||||
iCoveredMapIndex = AddPosRelToBase(pStructure->sBaseGridNo, pStructure->pDBStructureRef->ppTile[ubLoop]);
|
||||
#endif
|
||||
}
|
||||
AddToUndoList( iCoveredMapIndex );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user