Skip to content
This repository has been archived by the owner on Dec 24, 2022. It is now read-only.

Commit

Permalink
feat: friendly lock configurable through appsettings.json
Browse files Browse the repository at this point in the history
  • Loading branch information
lightbazinga committed Oct 25, 2022
1 parent 3be2fe7 commit cf49709
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 13 deletions.
4 changes: 4 additions & 0 deletions src/Tanya.Game.Apex.Feature.Aim/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ public Config(IConfiguration config)
[JsonPropertyName("yawSpeed")]
public float YawSpeed => _config.GetProperty<float>();


[JsonPropertyName("friendlyLock")]
public bool FriendlyLock => _config.GetProperty<bool>();

#endregion
}
}
2 changes: 1 addition & 1 deletion src/Tanya.Game.Apex.Feature.Aim/Feature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void Tick(DateTime frameTime, State state)
}
else if (_target == null || _targetPreviousOrigin == null)
{
var target = Find(state, localPlayer, targetType == TargetType.All);
var target = Find(state, localPlayer, targetType == TargetType.All && _config.FriendlyLock);
if (target == null) return;
_target = target;
_targetLockTicks = frameTime.Ticks;
Expand Down
25 changes: 13 additions & 12 deletions src/Tanya/appsettings.json
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
{
"Tanya.Game.Apex": {
"framesPerSecond": 30,
"framesPerSecond": 144,
"offsetsCheck": 5000,
"offsetsRefresh": 3600000,
"offsetsUrl": "https://pastebin.com/raw/S0emQR6Q",
"offsetsUrl": "https://pastebin.com/raw/QYEKfpkJ",
"processRefresh": 15000
},
"Tanya.Game.Apex.Feature.Aim": {
"distance": 200,
"lockTime": 300,
"pitchAngle": 10,
"pitchDeadzone": 15,
"pitchSpeed": 0.3,
"recoil": 0.95,
"releaseTime": 300,
"yawAngle": 30,
"yawDeadzone": 5,
"yawSpeed": 0.85
"lockTime": 150,
"recoil": 0.85,
"releaseTime": 250,
"friendlyLock": false,
"pitchAngle": 12,
"pitchDeadzone": 4,
"pitchSpeed": 0.18,
"yawAngle": 14,
"yawDeadzone": 4,
"yawSpeed": 0.21
},
"Tanya.Game.Apex.Feature.Sense": {
"distance": 200
"distance": 250
}
}

0 comments on commit cf49709

Please sign in to comment.