Atmos device performance improvements (#26493)
* Atmos device performance improvements * AtmosDirection perf improvements * Fix errors * Add GasTileOverlayComponent arguments * Make excite no longer invalidate a tile
This commit is contained in:
@@ -404,14 +404,17 @@ public sealed partial class MechSystem : SharedMechSystem
|
||||
if (args.Handled)
|
||||
return;
|
||||
|
||||
if (!TryComp<MechComponent>(component.Mech, out var mech) ||
|
||||
!TryComp<MechAirComponent>(component.Mech, out var mechAir))
|
||||
if (!TryComp(component.Mech, out MechComponent? mech))
|
||||
return;
|
||||
|
||||
if (mech.Airtight && TryComp(component.Mech, out MechAirComponent? air))
|
||||
{
|
||||
args.Handled = true;
|
||||
args.Gas = air.Air;
|
||||
return;
|
||||
}
|
||||
|
||||
args.Gas = mech.Airtight ? mechAir.Air : _atmosphere.GetContainingMixture(component.Mech);
|
||||
|
||||
args.Gas = _atmosphere.GetContainingMixture(component.Mech, excite: args.Excite);
|
||||
args.Handled = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user