Add DamageTypes to Demolition

This commit is contained in:
Mustafa Alperen Seki
2020-10-13 19:00:05 +03:00
committed by abcdefg30
parent 54c4a05062
commit 8aeec24c9b
11 changed files with 35 additions and 21 deletions

View File

@@ -368,7 +368,7 @@ namespace OpenRA.Mods.Common.Traits
return damage;
}
public void Demolish(Actor saboteur, int direction)
public void Demolish(Actor saboteur, int direction, BitSet<DamageType> damageTypes)
{
var initialDamage = health.DamageState;
self.World.AddFrameEndTask(w =>
@@ -376,7 +376,7 @@ namespace OpenRA.Mods.Common.Traits
// Use .FromPos since this actor is killed. Cannot use Target.FromActor
info.DemolishWeaponInfo.Impact(Target.FromPos(self.CenterPosition), saboteur);
self.Kill(saboteur);
self.Kill(saboteur, damageTypes);
});
// Destroy adjacent spans between (including) huts
@@ -386,7 +386,7 @@ namespace OpenRA.Mods.Common.Traits
0 : info.RepairPropagationDelay;
self.World.AddFrameEndTask(w => w.Add(new DelayedAction(delay, () =>
neighbours[direction].Demolish(saboteur, direction))));
neighbours[direction].Demolish(saboteur, direction, damageTypes))));
}
}
}