bug fixes from Overhaul:

- CTD when someone fell off the west side of a building 
- Assertion failure when Skyrider leaves a sector where a merc cannot be woken up 
- Boxing fixes: Opponent no longer "seeks cover", ie jumps back out of the ring; no longer will pick up a gun from the ground while boxing
- Disappearing corpses (and possibly items) when cursor hovers over a square on the rooftop; also fixes a "write to freed memory" heap check

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@867 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
lalien
2007-05-08 14:42:28 +00:00
parent 91016c3d6c
commit 30cc546c09
7 changed files with 40 additions and 9 deletions
+14 -1
View File
@@ -982,6 +982,8 @@ UINT8 GetLandLevelDepth( UINT32 iMapIndex )
BOOLEAN GetSubIndexFromTileIndex( UINT16 usTileIndex, UINT16 *pusSubIndex )
{
UINT32 uiType=0;
*pusSubIndex = 0xffff;
if( GetTileType( usTileIndex, &uiType ) )
{
*pusSubIndex = usTileIndex - gTileTypeStartIndex[ uiType ] + 1;
@@ -995,6 +997,8 @@ BOOLEAN GetTypeSubIndexFromTileIndex( UINT32 uiCheckType, UINT16 usIndex, UINT16
// Tile database is zero-based, Type indecies are 1-based!
*pusSubIndex = 0xffff;
CHECKF ( uiCheckType < NUMBEROFTILETYPES );
*pusSubIndex = usIndex - gTileTypeStartIndex[ uiCheckType ] + 1;
@@ -1004,6 +1008,7 @@ BOOLEAN GetTypeSubIndexFromTileIndex( UINT32 uiCheckType, UINT16 usIndex, UINT16
BOOLEAN GetTypeSubIndexFromTileIndexChar( UINT32 uiCheckType, UINT16 usIndex, UINT8 *pubSubIndex )
{
*pubSubIndex = 0xff;
// Tile database is zero-based, Type indecies are 1-based!
@@ -1018,6 +1023,8 @@ BOOLEAN GetTileIndexFromTypeSubIndex( UINT32 uiCheckType, UINT16 usSubIndex, UIN
{
// Tile database is zero-based, Type indecies are 1-based!
*pusTileIndex = 0xffff;
CHECKF ( uiCheckType < NUMBEROFTILETYPES );
*pusTileIndex = usSubIndex + gTileTypeStartIndex[ uiCheckType ] - 1;
@@ -1045,6 +1052,8 @@ BOOLEAN GetTileType( UINT16 usIndex, UINT32 *puiType )
{
TILE_ELEMENT TileElem;
*puiType = 0xffffffff;
CHECKF( usIndex != NO_TILE );
CHECKF( usIndex < NUMBEROFTILES ); //lal bugfix
@@ -1060,6 +1069,8 @@ BOOLEAN GetTileFlags( UINT16 usIndex, UINT32 *puiFlags )
{
TILE_ELEMENT TileElem;
*puiFlags = 0;
CHECKF( usIndex != NO_TILE );
CHECKF( usIndex < NUMBEROFTILES );
@@ -1195,8 +1206,10 @@ BOOLEAN AnyLowerLand( UINT32 iMapIndex, UINT32 uiSrcType, UINT8 *pubLastLevel )
BOOLEAN GetWallOrientation( UINT16 usIndex, UINT16 *pusWallOrientation )
{
TILE_ELEMENT TileElem;
TILE_ELEMENT TileElem;
*pusWallOrientation = 0xffff;
CHECKF( usIndex != NO_TILE );
CHECKF( usIndex < NUMBEROFTILES ); //lal bugfix