Fix planet docking (#20104)

This commit is contained in:
metalgearsloth
2023-09-13 22:06:15 +10:00
committed by GitHub
parent 427a48d67d
commit 7dc3347181
4 changed files with 85 additions and 5 deletions

View File

@@ -32,9 +32,13 @@ namespace Content.Server.Shuttles.Systems
private const string DockingJoint = "docking";
private const float DockingRadius = 0.20f;
private EntityQuery<PhysicsComponent> _physicsQuery;
public override void Initialize()
{
base.Initialize();
_physicsQuery = GetEntityQuery<PhysicsComponent>();
SubscribeLocalEvent<DockingComponent, ComponentStartup>(OnStartup);
SubscribeLocalEvent<DockingComponent, ComponentShutdown>(OnShutdown);
SubscribeLocalEvent<DockingComponent, AnchorStateChangedEvent>(OnAnchorChange);