DamageableSystem cleanup & performance improvements (#20820)
This commit is contained in:
@@ -85,7 +85,7 @@ public sealed partial class GunSystem
|
||||
{
|
||||
var p = (ProjectileComponent) projectile.Component;
|
||||
|
||||
if (p.Damage.Total > FixedPoint2.Zero)
|
||||
if (!p.Damage.Empty)
|
||||
{
|
||||
return p.Damage;
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ public sealed partial class GunSystem
|
||||
{
|
||||
var p = (ProjectileComponent) projectile.Component;
|
||||
|
||||
if (p.Damage.Total > FixedPoint2.Zero)
|
||||
if (!p.Damage.Empty)
|
||||
{
|
||||
return p.Damage;
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ public sealed partial class GunSystem : SharedGunSystem
|
||||
{
|
||||
if (!Deleted(hitEntity))
|
||||
{
|
||||
if (dmg.Total > FixedPoint2.Zero)
|
||||
if (dmg.Any())
|
||||
{
|
||||
_color.RaiseEffect(Color.Red, new List<EntityUid>() { hitEntity }, Filter.Pvs(hitEntity, entityManager: EntityManager));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user