Skip to content

Commit

Permalink
проверка от дауна x2
Browse files Browse the repository at this point in the history
  • Loading branch information
Rinary1 committed Oct 15, 2024
1 parent 6f55706 commit ac38b21
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Content.Shared/CombatMode/SharedCombatModeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,11 @@ private void SetMouseRotatorComponents(EntityUid uid, bool value)
{
if(TryComp<MechPilotComponent>(uid, out var mechPilot))
{
EnsureComp<MouseRotatorComponent>(mechPilot.Mech);
EnsureComp<NoRotateOnMoveComponent>(mechPilot.Mech);
if(!HasComp<MouseRotatorComponent>(mechPilot.Mech))
{
EnsureComp<MouseRotatorComponent>(mechPilot.Mech);
EnsureComp<NoRotateOnMoveComponent>(mechPilot.Mech);
}
}
EnsureComp<MouseRotatorComponent>(uid);
EnsureComp<NoRotateOnMoveComponent>(uid);
Expand Down

0 comments on commit ac38b21

Please sign in to comment.