(df011a643) Fixed affliction source not being copied when creating a list of merged afflictions. Prevented affliction-based causes of death from getting the "killer" field assigned correctly, which prevented some afflictions from being unlocked.

This commit is contained in:
Joonas Rikkonen
2019-04-07 13:41:34 +03:00
parent bd174a8769
commit 7ffcee3075
@@ -695,6 +695,7 @@ namespace Barotrauma
if (existingAffliction == null) if (existingAffliction == null)
{ {
var newAffliction = affliction.Prefab.Instantiate(affliction.Strength); var newAffliction = affliction.Prefab.Instantiate(affliction.Strength);
if (affliction.Source != null) { newAffliction.Source = affliction.Source; }
newAffliction.DamagePerSecond = affliction.DamagePerSecond; newAffliction.DamagePerSecond = affliction.DamagePerSecond;
newAffliction.DamagePerSecondTimer = affliction.DamagePerSecondTimer; newAffliction.DamagePerSecondTimer = affliction.DamagePerSecondTimer;
mergedAfflictions.Add(newAffliction); mergedAfflictions.Add(newAffliction);