mirror of
https://github.com/1dot13/source.git
synced 2026-07-22 13:40:22 +02:00
Bugfix: soldiers killed on roof edges should now properly fall down and not be stuck in dying state anymore
Enhancement: enemy troops should no longer attack empty player vehicles git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6346 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -18466,7 +18466,11 @@ void HandleSystemNewAISituation( SOLDIERTYPE *pSoldier, BOOLEAN fResetABC )
|
||||
if ( pSoldier->aiData.bNewSituation == IS_NEW_SITUATION )
|
||||
{
|
||||
// Cancel what they were doing....
|
||||
pSoldier->usPendingAnimation = NO_PENDING_ANIMATION;
|
||||
// silversurfer: bugfix for endless dying mercs on roof edges
|
||||
// if we delete their pending animation here they will just turn into the proper direction for the fall (in TurnSoldier( void ) )
|
||||
// and stand there forever afterwards in "dying" state, so let this guy fall off the roof first!
|
||||
if ( !pSoldier->usPendingAnimation == FALLOFF && !pSoldier->usPendingAnimation == FALLFORWARD_ROOF )
|
||||
pSoldier->usPendingAnimation = NO_PENDING_ANIMATION;
|
||||
pSoldier->usPendingAnimation2 = NO_PENDING_ANIMATION;
|
||||
pSoldier->flags.bTurningFromPronePosition = FALSE;
|
||||
pSoldier->ubPendingDirection = NO_PENDING_DIRECTION;
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#include "lighting.h"
|
||||
#include "Sound Control.h"
|
||||
#include "message.h"
|
||||
#include "Vehicles.h"
|
||||
#endif
|
||||
|
||||
extern INT16 DirIncrementer[8];
|
||||
@@ -206,6 +207,9 @@ void CalcBestShot(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestShot, BOOLEAN shootUns
|
||||
continue; // next opponent
|
||||
}
|
||||
|
||||
// silversurfer: ignore empty vehicles
|
||||
if ( pOpponent->ubWhatKindOfMercAmI == MERC_TYPE__VEHICLE && GetNumberInVehicle( pOpponent->bVehicleID ) == 0 )
|
||||
continue;
|
||||
|
||||
// Special stuff for Carmen the bounty hunter
|
||||
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpponent->ubProfile != SLAY)
|
||||
@@ -791,6 +795,10 @@ void CalcBestThrow(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestThrow)
|
||||
continue; // next soldier
|
||||
}
|
||||
|
||||
// silversurfer: ignore empty vehicles
|
||||
if ( pOpponent->ubWhatKindOfMercAmI == MERC_TYPE__VEHICLE && GetNumberInVehicle( pOpponent->bVehicleID ) == 0 )
|
||||
continue;
|
||||
|
||||
// Special stuff for Carmen the bounty hunter
|
||||
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpponent->ubProfile != SLAY)
|
||||
{
|
||||
@@ -1364,6 +1372,10 @@ void CalcBestStab(SOLDIERTYPE *pSoldier, ATTACKTYPE *pBestStab, BOOLEAN fBladeAt
|
||||
if (pSoldier->pathing.bLevel != pOpponent->pathing.bLevel)
|
||||
continue; // next merc
|
||||
|
||||
// silversurfer: ignore empty vehicles
|
||||
if ( pOpponent->ubWhatKindOfMercAmI == MERC_TYPE__VEHICLE && GetNumberInVehicle( pOpponent->bVehicleID ) == 0 )
|
||||
continue;
|
||||
|
||||
// Special stuff for Carmen the bounty hunter
|
||||
if (pSoldier->aiData.bAttitude == ATTACKSLAYONLY && pOpponent->ubProfile != SLAY)
|
||||
continue; // next opponent
|
||||
|
||||
Reference in New Issue
Block a user