Don't error on missing component in ChangeHeat (#32451)
This commit is contained in:
parent
70b7747fdd
commit
d6d8c55d57
1 changed files with 2 additions and 2 deletions
|
|
@ -130,7 +130,7 @@ public sealed class TemperatureSystem : EntitySystem
|
|||
public void ChangeHeat(EntityUid uid, float heatAmount, bool ignoreHeatResistance = false,
|
||||
TemperatureComponent? temperature = null)
|
||||
{
|
||||
if (!Resolve(uid, ref temperature))
|
||||
if (!Resolve(uid, ref temperature, false))
|
||||
return;
|
||||
|
||||
if (!ignoreHeatResistance)
|
||||
|
|
@ -311,7 +311,7 @@ public sealed class TemperatureSystem : EntitySystem
|
|||
|
||||
private void ChangeTemperatureOnCollide(Entity<ChangeTemperatureOnCollideComponent> ent, ref ProjectileHitEvent args)
|
||||
{
|
||||
_temperature.ChangeHeat(args.Target, ent.Comp.Heat, ent.Comp.IgnoreHeatResistance);// adjust the temperature
|
||||
_temperature.ChangeHeat(args.Target, ent.Comp.Heat, ent.Comp.IgnoreHeatResistance);// adjust the temperature
|
||||
}
|
||||
|
||||
private void OnParentChange(EntityUid uid, TemperatureComponent component,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue