Fix incorrect if statement in FlammableSystem.

Should fix the FlammableComponent resolve errors on live servers.
This commit is contained in:
Vera Aguilera Puerto
2022-03-03 11:48:27 +01:00
parent c0fd26a744
commit e292418766

View File

@@ -54,12 +54,15 @@ namespace Content.Server.Atmos.EntitySystems
private void IgniteOnCollide(EntityUid uid, IgniteOnCollideComponent component, StartCollideEvent args) private void IgniteOnCollide(EntityUid uid, IgniteOnCollideComponent component, StartCollideEvent args)
{ {
var otherfixture = args.OtherFixture.Body.Owner; var otherFixture = args.OtherFixture.Body.Owner;
if (EntityManager.TryGetComponent(otherfixture, out FlammableComponent flammable))
flammable.FireStacks += component.FireStacks;
Ignite(otherfixture, flammable);
}
if (!EntityManager.TryGetComponent(otherFixture, out FlammableComponent flammable))
return;
flammable.FireStacks += component.FireStacks;
Ignite(otherFixture, flammable);
}
private void OnInteractUsingEvent(EntityUid uid, FlammableComponent flammable, InteractUsingEvent args) private void OnInteractUsingEvent(EntityUid uid, FlammableComponent flammable, InteractUsingEvent args)
{ {
if (args.Handled) if (args.Handled)