mirror of
https://github.com/1dot13/source.git
synced 2026-08-05 14:00:23 +02:00
New: if REDUCED_INSTANT_DEATH is TRUE, damage from guns/knives that would normally instantly kill non-comatose player-controlled mercs is lowered so that they instead fall into a coma (and can be saved by other mercs) (by sevenfm)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8485 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -6046,7 +6046,18 @@ void SOLDIERTYPE::EVENT_SoldierGotHit( UINT16 usWeaponIndex, INT16 sDamage, INT1
|
||||
return;
|
||||
}
|
||||
|
||||
// DEDUCT LIFE
|
||||
// sevenfm: player mercs should not die instantly
|
||||
if (gGameExternalOptions.fReducedInstantDeath &&
|
||||
this->flags.uiStatusFlags & SOLDIER_PC &&
|
||||
this->stats.bLife >= OKLIFE &&
|
||||
ubSpecial != FIRE_WEAPON_HEAD_EXPLODE_SPECIAL &&
|
||||
ubSpecial != FIRE_WEAPON_CHEST_EXPLODE_SPECIAL &&
|
||||
Item[usWeaponIndex].usItemClass & (IC_GUN | IC_THROWING_KNIFE | IC_BLADE))
|
||||
{
|
||||
sDamage = __min(sDamage, this->stats.bLife - OKLIFE + 1 + sDamage / 10);
|
||||
}
|
||||
|
||||
// DEDUCT LIFE
|
||||
ubCombinedLoss = this->SoldierTakeDamage( ANIM_CROUCH, sDamage, sBreathLoss, ubReason, this->ubAttackerID, NOWHERE, FALSE, TRUE );
|
||||
|
||||
// ATE: OK, Let's check our ASSIGNMENT state,
|
||||
|
||||
Reference in New Issue
Block a user