Skip to content

Commit

Permalink
fix mechs no spinning(
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 committed Oct 15, 2024
1 parent ac38b21 commit 93ba939
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Content.Client/MouseRotator/MouseRotatorSystem.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using Content.Shared.MouseRotator;
using Content.Shared.Mech.Components;
using Robust.Client.Graphics;
using Robust.Client.Input;
using Robust.Client.Player;
Expand All @@ -24,6 +25,11 @@ public override void Update(float frameTime)
return;

var player = _player.LocalEntity;

if (TryComp<MechComponent>(player, out var mechComponent))
{
player = mechComponent.PilotSlot.ContainedEntity;
}

if (player == null || !TryComp<MouseRotatorComponent>(player, out var rotator))
return;
Expand Down

0 comments on commit 93ba939

Please sign in to comment.