Clear on exit

master
D4VID 7 months ago
parent 5b542dbcc8
commit 585b2116c1

@ -34,7 +34,7 @@ namespace CriticalPathAnalyzer.Client {
public override void OnExit() { public override void OnExit() {
CriticalPathAnalyzerClient.LoggerInstance.Info("CPA exit"); CriticalPathAnalyzerClient.LoggerInstance.Info("CPA exit");
PathHighLighter.RemoveHighLighting(); CriticalPathAnalyzerTool.Clear();
} }
} }
} }

@ -19,6 +19,12 @@ namespace CriticalPathAnalyzer.Client.Tool {
_logger = logger; _logger = logger;
} }
public static void Clear() {
_startPegAddress = null;
_endPegAddress = null;
PathHighLighter.RemoveHighLighting();
}
private static PegAddress? RayCastPeg() { private static PegAddress? RayCastPeg() {
// Ray-cast into the world to find what the player is looking at // Ray-cast into the world to find what the player is looking at
HitInfo hitInfo = PlayerCaster.CameraCast(Masks.Environment | Masks.Structure | Masks.Peg | Masks.Wire); HitInfo hitInfo = PlayerCaster.CameraCast(Masks.Environment | Masks.Structure | Masks.Peg | Masks.Wire);

Loading…
Cancel
Save