Add station anchors (#18697)
This commit is contained in:
@@ -44,9 +44,6 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
|
||||
|
||||
public const float TileMassMultiplier = 0.5f;
|
||||
|
||||
public const float ShuttleLinearDamping = 0.05f;
|
||||
public const float ShuttleAngularDamping = 0.05f;
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
@@ -125,7 +122,7 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
|
||||
|
||||
if (component.Enabled)
|
||||
{
|
||||
Enable(uid, physicsComponent);
|
||||
Enable(uid, physicsComponent, component);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -138,7 +135,7 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
|
||||
|
||||
if (component.Enabled)
|
||||
{
|
||||
Enable(uid, physicsComponent);
|
||||
Enable(uid, physicsComponent, component);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -146,15 +143,15 @@ public sealed partial class ShuttleSystem : SharedShuttleSystem
|
||||
}
|
||||
}
|
||||
|
||||
private void Enable(EntityUid uid, PhysicsComponent component)
|
||||
private void Enable(EntityUid uid, PhysicsComponent component, ShuttleComponent shuttle)
|
||||
{
|
||||
FixturesComponent? manager = null;
|
||||
|
||||
_physics.SetBodyType(uid, BodyType.Dynamic, manager: manager, body: component);
|
||||
_physics.SetBodyStatus(component, BodyStatus.InAir);
|
||||
_physics.SetFixedRotation(uid, false, manager: manager, body: component);
|
||||
_physics.SetLinearDamping(component, ShuttleLinearDamping);
|
||||
_physics.SetAngularDamping(component, ShuttleAngularDamping);
|
||||
_physics.SetLinearDamping(component, shuttle.LinearDamping);
|
||||
_physics.SetAngularDamping(component, shuttle.AngularDamping);
|
||||
}
|
||||
|
||||
private void Disable(EntityUid uid, PhysicsComponent component)
|
||||
|
||||
Reference in New Issue
Block a user