mirror of
https://github.com/1dot13/source.git
synced 2026-07-29 13:52:17 +02:00
- disease infection chances (percentage) is now read as float, valid numbers between 0.01 an 100.0
- lowered infection chances for swamp/tropical sectors and contact with humans/corpses - infections on gunshot wounds only happen on severe wounds (damage taken > 20) - lifeloss by bloodloss no longer leads to traumatic infections Requires GameDir >= r2219 due to changed xml entries. git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7770 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
@@ -10073,22 +10073,22 @@ UINT8 SOLDIERTYPE::SoldierTakeDamage( INT8 bHeight, INT16 sLifeDeduct, INT16 sPo
|
||||
this->usSoldierFlagMask |= SOLDIER_FRESHWOUND;
|
||||
|
||||
// Flugente we might get a disease from this...
|
||||
if ( gGameExternalOptions.fDisease )
|
||||
if ( gGameExternalOptions.fDisease && sLifeDeduct > 0 )
|
||||
{
|
||||
if ( ubAttacker != NOBODY && MercPtrs[ubAttacker] && CREATURE_OR_BLOODCAT( MercPtrs[ubAttacker] ) )
|
||||
HandlePossibleInfection( this, MercPtrs[ubAttacker], INFECTION_TYPE_WOUND_ANIMAL );
|
||||
|
||||
if ( sLifeDeduct > 0 && ubReason == TAKE_DAMAGE_GUNFIRE )
|
||||
if ( ubReason == TAKE_DAMAGE_GUNFIRE && sLifeDeduct > 20 )
|
||||
HandlePossibleInfection( this, NULL, INFECTION_TYPE_WOUND_GUNSHOT );
|
||||
else if ( sLifeDeduct > 0 && (ubReason == TAKE_DAMAGE_BLADE || ubReason == TAKE_DAMAGE_HANDTOHAND
|
||||
|| ubReason == TAKE_DAMAGE_EXPLOSION || ubReason == TAKE_DAMAGE_STRUCTURE_EXPLOSION || ubReason == TAKE_DAMAGE_TENTACLES) )
|
||||
else if ( ubReason == TAKE_DAMAGE_BLADE || ubReason == TAKE_DAMAGE_HANDTOHAND
|
||||
|| ubReason == TAKE_DAMAGE_EXPLOSION || ubReason == TAKE_DAMAGE_STRUCTURE_EXPLOSION || ubReason == TAKE_DAMAGE_TENTACLES )
|
||||
{
|
||||
FLOAT modifier = 0.5f + sLifeDeduct / 100;
|
||||
HandlePossibleInfection( this, NULL, INFECTION_TYPE_WOUND_OPEN, modifier );
|
||||
}
|
||||
|
||||
// possibly get traumatized if we're hit really bad
|
||||
if ( this->stats.bLife < OKLIFE )
|
||||
// possibly get traumatized if damage gets close to killing us (not if we're slowly bleeding)
|
||||
if ( this->stats.bLife < OKLIFE && ubReason != TAKE_DAMAGE_BLOODLOSS )
|
||||
HandlePossibleInfection( this, NULL, INFECTION_TYPE_TRAUMATIC );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user