-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from Evgencheg/master
Апстрим+фиксы
- Loading branch information
Showing
99 changed files
with
984 additions
and
559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using Content.Shared.CCVar; | ||
|
||
namespace Content.Shared.Contests; | ||
public sealed partial class ContestsSystem | ||
{ | ||
/// <summary> | ||
/// Clamp a contest to a Range of [Epsilon, 32bit integer limit]. This exists to make sure contests are always "Safe" to divide by. | ||
/// </summary> | ||
private float ContestClamp(float input) | ||
{ | ||
return Math.Clamp(input, float.Epsilon, float.MaxValue); | ||
} | ||
|
||
/// <summary> | ||
/// Shorthand for checking if clamp overrides are allowed, and the bypass is used by a contest. | ||
/// </summary> | ||
private bool ContestClampOverride(bool bypassClamp) | ||
{ | ||
return _cfg.GetCVar(CCVars.AllowClampOverride) && bypassClamp; | ||
} | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
15 changes: 15 additions & 0 deletions
15
Content.Shared/StepTrigger/Components/StepTriggerImmuneComponent.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using Robust.Shared.GameStates; | ||
|
||
namespace Content.Shared.StepTrigger.Components; | ||
|
||
/// <summary> | ||
/// This component marks an entity as being immune to all step triggers. | ||
/// For example, a Felinid or Harpy being so low density, that they don't set off landmines. | ||
/// </summary> | ||
/// <remarks> | ||
/// This is the "Earliest Possible Exit" method, and therefore isn't possible to un-cancel. | ||
/// It will prevent ALL step trigger events from firing. Therefore there may sometimes be unintended consequences to this. | ||
/// Consider using a subscription to StepTriggerAttemptEvent if you wish to be more selective. | ||
/// </remarks> | ||
[RegisterComponent, NetworkedComponent] | ||
public sealed partial class StepTriggerImmuneComponent : Component { } |
Oops, something went wrong.