Merge branch 'master' into ExtraMercs

This commit is contained in:
Asdow
2023-07-26 13:17:49 +03:00
754 changed files with 9435 additions and 74371 deletions
+9 -51
View File
@@ -1,6 +1,3 @@
#ifdef PRECOMPILEDHEADERS
#include "Tactical All.h"
#else
#include <stdio.h>
#include <string.h>
#include "stdlib.h"
@@ -66,7 +63,7 @@
#include "MilitiaIndividual.h" // added by Flugente
#include "Town Militia.h" // added by Flugente
#include "PreBattle Interface.h" // added by Flugente
#endif
#include "Rebel Command.h"
// anv: for enemy taunts
#include "Civ Quotes.h"
@@ -3209,14 +3206,14 @@ BOOLEAN AdjustToNextAnimationFrame( SOLDIERTYPE *pSoldier )
case 762:
{
// CODE: Set off Trigger
INT8 bPanicTrigger;
bPanicTrigger = ClosestPanicTrigger( pSoldier );
SetOffPanicBombs( pSoldier->ubID, bPanicTrigger );
INT8 bPanicTrigger = ClosestPanicTrigger( pSoldier );
if (bPanicTrigger != -1)
{
SetOffPanicBombs( pSoldier->ubID, bPanicTrigger );
}
// any AI guy has been specially given keys for this, now take them
// away
pSoldier->flags.bHasKeys = pSoldier->flags.bHasKeys >> 1;
}
break;
@@ -4197,6 +4194,9 @@ BOOLEAN HandleSoldierDeath( SOLDIERTYPE *pSoldier , BOOLEAN *pfMadeCorpse )
}
}
// rftr: soldier bounty payout
RebelCommand::ApplySoldierBounty(pSoldier);
// Flugente: campaign stats
gCurrentIncident.AddStat( pSoldier, CAMPAIGNHISTORY_TYPE_KILL );
@@ -4856,48 +4856,6 @@ BOOLEAN HandleUnjamAnimation( SOLDIERTYPE *pSoldier )
#if 0
//OK, if here, if our health is still good, but we took a lot of damage, try to fall down!
if ( pSoldier->stats.bLife >= OKLIFE )
{
// Randomly fall back or forward, if we are in the standing hit animation
if ( pSoldier->usAnimState == GENERIC_HIT_STAND || pSoldier->usAnimState == RIFLE_STAND_HIT )
{
INT8 bTestDirection = pSoldier->ubDirection;
BOOLEAN fForceDirection = FALSE;
BOOLEAN fDoFallback = FALSE;
// As the damage pretty brutal?
// TRY FALLING BACKWARDS, ( ONLY IF WE ARE A MERC! )
if ( Random( 1000 ) > 40 && IS_MERC_BODY_TYPE( pSoldier ) )
{
// CHECK IF WE HAVE AN ATTACKER, TAKE OPPOSITE DIRECTION!
if ( pSoldier->ubAttackerID != NOBODY )
{
// Find direction!
bTestDirection = (INT8)GetDirectionFromGridNo( MercPtrs[ pSoldier->ubAttackerID ]->sGridNo, pSoldier );
fForceDirection = TRUE;
}
sNewGridNo = NewGridNo( pSoldier->sGridNo, (UINT16)(-1 * DirectionInc( bTestDirection ) ) );
if ( NewOKDestination( pSoldier, sNewGridNo, TRUE, pSoldier->pathing.bLevel ) && OKHeightDest( pSoldier, sNewGridNo ) )
{
// ALL'S OK HERE..... IF WE FORCED DIRECTION, SET!
if ( fForceDirection )
{
pSoldier->EVENT_SetSoldierDirection( bTestDirection );
pSoldier->EVENT_SetSoldierDesiredDirection( bTestDirection );
}
pSoldier->ChangeSoldierState( FALLBACK_HIT_STAND, 0, FALSE );
return;
}
}
}
}
#endif
BOOLEAN OKFallDirection( SOLDIERTYPE *pSoldier, INT32 sGridNo, INT8 bLevel, UINT8 ubTestDirection, UINT16 usAnimState )
{