From b4b3111440264cb8c17e7fae42797aac0d546846 Mon Sep 17 00:00:00 2001 From: Anton Tarasenko Date: Sun, 1 Sep 2024 17:59:26 +0700 Subject: [PATCH] Replace flat damage bonus to burning zeds with scorchmark mechanic --- sources/Zeds/NiceMonster.uc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sources/Zeds/NiceMonster.uc b/sources/Zeds/NiceMonster.uc index f9a0ba1..b673714 100644 --- a/sources/Zeds/NiceMonster.uc +++ b/sources/Zeds/NiceMonster.uc @@ -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))