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

Commit

Permalink
chore: add a switch for sense
Browse files Browse the repository at this point in the history
  • Loading branch information
Itsusinn committed Jan 28, 2023
1 parent dabcecb commit 2dc7638
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/Tanya.Game.Apex.Feature.Sense/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public Config(IConfiguration config)
#endregion

#region Properties
[JsonPropertyName("enable")]
public bool Enable => _config.GetProperty<bool>();

[JsonPropertyName("distance")]
public int Distance => _config.GetProperty<int>();
Expand Down
3 changes: 3 additions & 0 deletions src/Tanya.Game.Apex.Feature.Sense/Feature.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ public Feature(Config config)

public void Tick(DateTime frameTime, State state)
{
if (!_config.Enable){
return;
}
if (state.Players.TryGetValue(state.LocalPlayer, out var localPlayer))
{
foreach (var (_, player) in state.Players)
Expand Down
5 changes: 3 additions & 2 deletions src/Tanya/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"processRefresh": 15000
},
"Tanya.Game.Apex.Feature.Aim": {
"distance": 200,
"distance": 150,
"lockTime": 150,
"recoil": 0.85,
"recoil": 0.80,
"releaseTime": 250,
"friendlyLock": false,
"pitchAngle": 12,
Expand All @@ -20,6 +20,7 @@
"yawSpeed": 0.21
},
"Tanya.Game.Apex.Feature.Sense": {
"enable": false,
"distance": 250
}
}

0 comments on commit 2dc7638

Please sign in to comment.