RustyMods / Seasonality

Valheim plugin to manipulate prefab material textures and colors in order to achieve a seasonal experience.
10 stars 3 forks source link

Bug: ModifyFallDamage overwrites changes done by other StatusEffects by using the baseDamage instead of the damage argument #21

Open bid-soft opened 5 months ago

bid-soft commented 5 months ago

SeasonStatusEffect.ModifyFallDamage: public override void ModifyFallDamage(float baseDamage, ref float damage) { if (m_character.m_seman.m_statusEffects.Exists(x => x.m_name == "$se_slowfall_name")) return; damage = baseDamage * data.Modifiers[Modifier.FallDamage]; if (damage >= 0.0) return; damage = 0.0f; }

Instead of baseDamage, damage should be the start of calculations, otherwise it overwrites changes of other status effects

RustyMods commented 5 months ago

next update ill switch it to your idea. looks like it should be good