Make shuttle brakes use thrusters and bandaid shuttle movement (#9826)

This commit is contained in:
metalgearsloth
2022-07-17 19:36:08 +10:00
committed by GitHub
parent cd7765e7d9
commit 0378a23790
7 changed files with 188 additions and 118 deletions

View File

@@ -35,7 +35,6 @@ namespace Content.Shared.Movement.Systems
[Dependency] private readonly InventorySystem _inventory = default!;
[Dependency] private readonly SharedContainerSystem _container = default!;
[Dependency] private readonly SharedMobStateSystem _mobState = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;
[Dependency] private readonly TagSystem _tags = default!;
private const float StepSoundMoveDistanceRunning = 2;
@@ -131,7 +130,7 @@ namespace Content.Shared.Movement.Systems
touching = ev.CanMove;
if (!touching && TryComp<MobMoverComponent>(xform.Owner, out var mobMover))
touching |= IsAroundCollider(_physics, xform, mobMover, physicsComponent);
touching |= IsAroundCollider(PhysicsSystem, xform, mobMover, physicsComponent);
}
if (!touching)
@@ -227,7 +226,7 @@ namespace Content.Shared.Movement.Systems
if (!weightless || touching)
Accelerate(ref velocity, in worldTotal, accel, frameTime);
_physics.SetLinearVelocity(physicsComponent, velocity);
PhysicsSystem.SetLinearVelocity(physicsComponent, velocity);
}
private void Friction(float minimumFrictionSpeed, float frameTime, float friction, ref Vector2 velocity)