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
+12
View File
@@ -554,6 +554,12 @@ INT16 FindBestNearbyCover(SOLDIERTYPE *pSoldier, INT32 morale, INT32 *piPercentB
UINT8 ubLightPercentDifference;
BOOLEAN fNight;
// There's no cover when boxing!
if (gTacticalStatus.bBoxingState == BOXING)
{
return (NOWHERE);
}
if ( gbWorldSectorZ > 0 )
{
fNight = FALSE;
@@ -1638,6 +1644,12 @@ INT8 SearchForItems( SOLDIERTYPE * pSoldier, INT8 bReason, UINT16 usItem )
iTempValue = -1;
iItemIndex = iBestItemIndex = -1;
// No fair picking up weapons while boxing!
if (gTacticalStatus.bBoxingState == BOXING)
{
return AI_ACTION_NONE;
}
if (pSoldier->bActionPoints < AP_PICKUP_ITEM)
{
return( AI_ACTION_NONE );