* PA Fixes

Fix exception when opening UI if it has the power limiter warning displayed.

Fix it sometimes not detecting parts due to angles not getting normalized before comparison.

* Fix swapped out sprites for PA emitter P0 states
This commit is contained in:
Pieter-Jan Briers
2023-07-18 07:57:59 +02:00
committed by GitHub
parent a356d9b1fd
commit 23966e1dff
4 changed files with 2 additions and 2 deletions

View File

@@ -131,7 +131,7 @@ public sealed partial class ParticleAcceleratorSystem
{
if (compQuery.TryGetComponent(entity, out comp)
&& TryComp<ParticleAcceleratorPartComponent>(entity, out var partState) && partState.Master == null
&& (rotation == null || MathHelper.CloseTo(Transform(entity).LocalRotation.Theta, rotation!.Value.Theta)))
&& (rotation == null || Transform(entity).LocalRotation.EqualsApprox(rotation!.Value.Theta)))
{
part = entity;
return true;