Remove passing the warheads from DamageWarhead to AttackInfo.
Added a Damage class to pass damage value and damage(types) instead. This removes a great amount of overhead and longterm opens possibilities to have damagetypes without warheads.
This commit is contained in:
@@ -65,7 +65,7 @@ namespace OpenRA.Mods.Common.Traits
|
||||
if (!self.Info.HasTraitInfo<BuildingInfo>())
|
||||
return;
|
||||
|
||||
if (e.Attacker.Owner.IsAlliedWith(self.Owner) && e.Damage <= 0)
|
||||
if (e.Attacker.Owner.IsAlliedWith(self.Owner) && e.Damage.Value <= 0)
|
||||
return;
|
||||
|
||||
if (self.World.WorldTick - lastAttackTime > info.NotifyInterval * 25)
|
||||
@@ -85,4 +85,4 @@ namespace OpenRA.Mods.Common.Traits
|
||||
lastAttackTime = self.World.WorldTick;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user