mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
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:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user