Change heat and fire damage calculations
This commit is contained in:
parent
da810d50f1
commit
3d0315b28b
@ -1785,35 +1785,33 @@ simulated function ZombieCrispUp(){
|
|||||||
Skins[3]=Combiner'PatchTex.Common.BurnSkinEmbers_cmb';
|
Skins[3]=Combiner'PatchTex.Common.BurnSkinEmbers_cmb';
|
||||||
}
|
}
|
||||||
simulated function HeatTick(){
|
simulated function HeatTick(){
|
||||||
local float iceDamage, heatDamage;
|
local float iceDamage;
|
||||||
|
local float heatRelativeLevel, heatMultiplier;
|
||||||
|
|
||||||
|
heatRelativeLevel = FMin(heat, flameFuel) / initFlameFuel;
|
||||||
|
if (heatRelativeLevel < 0.05) {
|
||||||
|
heatMultiplier = 1.5;
|
||||||
|
} else {
|
||||||
|
heatMultiplier = 1.1;
|
||||||
|
}
|
||||||
// Update heat value
|
// Update heat value
|
||||||
if(!bOnFire || flameFuel <= 0)
|
if(!bOnFire || flameFuel <= 0)
|
||||||
heat *= heatDissipationRate;
|
heat *= heatDissipationRate;
|
||||||
else {
|
else {
|
||||||
if(flameFuel < heat) {
|
if(flameFuel < heat) {
|
||||||
heat = flameFuel * 1.1 + (heat - flameFuel) * heatDissipationRate;
|
heat = flameFuel * heatMultiplier + (heat - flameFuel) * heatDissipationRate;
|
||||||
} else {
|
} else {
|
||||||
heat = heat * 1.1;
|
heat = heat * heatMultiplier;
|
||||||
}
|
|
||||||
if (flameFuel >= 0) {
|
|
||||||
// Burning always deals at least 5% damage (of the total fuel),
|
|
||||||
// up to additional 5%, depending on the heat levels.
|
|
||||||
heatDamage = 5 + 5 * FMin(heat, flameFuel) / initFlameFuel; // calc %
|
|
||||||
heatDamage = FMin(flameFuel, healthMax * heatDamage / 100.0);
|
|
||||||
flameFuel -= heatDamage;
|
|
||||||
} else {
|
|
||||||
// 5 damage for burning without fuel
|
|
||||||
heatDamage = 5.0;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
flameFuel = FMax(0, flameFuel - heat);
|
||||||
CapHeat();
|
CapHeat();
|
||||||
if(Abs(heat) < 1)
|
if(Abs(heat) < 1)
|
||||||
heat = 0.0;
|
heat = 0.0;
|
||||||
// Update on-fire status
|
// Update on-fire status
|
||||||
if(bOnFire){
|
if(bOnFire){
|
||||||
if(heat > 0) {
|
if(heat > 0) {
|
||||||
TakeFireDamage(heatDamage, burnInstigator);
|
TakeFireDamage(heat, burnInstigator);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
bBurnified = false;
|
bBurnified = false;
|
||||||
@ -2341,7 +2339,7 @@ defaultproperties
|
|||||||
maxStoppingEffect=0.25
|
maxStoppingEffect=0.25
|
||||||
minStoppingThreshold=0.0
|
minStoppingThreshold=0.0
|
||||||
MIN_HEAT = -150.0
|
MIN_HEAT = -150.0
|
||||||
MAX_HEAT = 135.0
|
MAX_HEAT = 200.0
|
||||||
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
|
Begin Object Class=KarmaParamsSkel Name=KarmaParamsSkelN
|
||||||
KConvulseSpacing=(Max=2.200000)
|
KConvulseSpacing=(Max=2.200000)
|
||||||
KLinearDamping=0.150000
|
KLinearDamping=0.150000
|
||||||
|
Loading…
Reference in New Issue
Block a user