Replace flat damage bonus to burning zeds with scorchmark mechanic
This commit is contained in:
parent
6eb879f0d1
commit
b4b3111440
@ -127,6 +127,7 @@ var float heatDissipationRate;
|
||||
var float heatTicksPerSecond;
|
||||
// Tracks last time heat tick occured
|
||||
var float lastHeatTick;
|
||||
var float scorchmarkDamage;
|
||||
var float MIN_HEAT, MAX_HEAT;
|
||||
|
||||
//==============================================================================
|
||||
@ -499,6 +500,11 @@ simulated function FakeHeatTick(float deltaTime){
|
||||
local float oFrame;
|
||||
local float oRate;
|
||||
local NiceMonsterController niceZedController;
|
||||
if (bOnFire) {
|
||||
// 100 of the scorchmark damage should restore every 1/10 of a second
|
||||
scorchmarkDamage += deltaTime * 10 * 100;
|
||||
scorchmarkDamage = FMin(scorchmarkDamage, 100);
|
||||
}
|
||||
if(lastHeatTick + (1 / HeatTicksPerSecond) < Level.TimeSeconds){
|
||||
if(bOnFire && !bBurningBehavior)
|
||||
SetBurningBehavior();
|
||||
@ -1024,7 +1030,8 @@ function DealHeadDamage( int damage,
|
||||
if(HeadHealth <= 0) return;
|
||||
// Additional weakpoint damage to burning zeds from non-flame weapons
|
||||
if (bOnFire) {
|
||||
damage += 100 * (1 - damageType.default.heatPart);
|
||||
damage += scorchmarkDamage * (1 - damageType.default.heatPart);
|
||||
scorchmarkDamage *= damageType.default.heatPart;
|
||||
}
|
||||
HeadHealth -= damage;
|
||||
if(nicePlayer != none && IsFinisher(damage, damageType, nicePlayer, true))
|
||||
|
Loading…
Reference in New Issue
Block a user