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:
silversurfer
2013-09-02 15:33:55 +00:00
parent 858707a937
commit 8ff9125b37
2 changed files with 17 additions and 1 deletions
+5 -1
View File
@@ -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;