Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Фикс бага с длинными руками #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions Content.Shared/CombatMode/CombatModeComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,19 +48,5 @@ public sealed partial class CombatModeComponent : Component
/// </summary>
[DataField, AutoNetworkedField]
public bool ToggleMouseRotator = true;

// Corvax-Next-NoScope-Start
/// <summary>
/// If true, sets <see cref="MouseRotatorComponent.AngleTolerance"/> to 1 degree and <see cref="MouseRotatorComponent.Simple4DirMode"/>
/// to false when the owner enters combatmode. This is currently being tested as of 06.12.24,
/// so a simple bool switch should suffice.
/// Leaving AutoNetworking just in case shitmins need to disable it for someone. Will only take effect when re-enabling combat mode.
/// </summary>
/// <remarks>
/// No effect if <see cref="ToggleMouseRotator"/> is false.
/// </remarks>
[DataField, AutoNetworkedField]
public bool SmoothRotation = true;
// Corvax-Next-NoScope-End
}
}
9 changes: 1 addition & 8 deletions Content.Shared/CombatMode/SharedCombatModeSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,7 @@ private void SetMouseRotatorComponents(EntityUid uid, bool value)
{
if (value)
{
// Corvax-Next-NoScope-Start
var rot = EnsureComp<MouseRotatorComponent>(uid);
if (TryComp<CombatModeComponent>(uid, out var comp) && comp.SmoothRotation) // no idea under which (intended) circumstances this can fail (if any), so i'll avoid Comp<>().
{
rot.AngleTolerance = Angle.FromDegrees(1); // arbitrary
rot.Simple4DirMode = false;
}
// Corvax-Next-NoScope-End
EnsureComp<MouseRotatorComponent>(uid);
EnsureComp<NoRotateOnMoveComponent>(uid);
}
else
Expand Down
Loading