Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
MSWS committed Jan 27, 2024
1 parent 7b5b02e commit 48604f6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mod/Jailbreak.Warden/Markers/WardenMarkerBehavior.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,10 @@ public HookResult OnPing(EventPlayerPing @event, GameEventInfo info)
{
var player = @event.Userid;

player.PrintToChat("OnPing worked");
if (!_warden.IsWarden(player))
return HookResult.Handled;

player.PrintToChat("You are warden, drawing marker");
Vector vec = new Vector(@event.X, @event.Y, @event.Z);
_marker?.Move(vec);
_marker?.Update();
Expand All @@ -43,6 +44,7 @@ public HookResult OnPing(EventPlayerPing @event, GameEventInfo info)

HookResult CommandListener_PlayerPing(CCSPlayerController? player, CommandInfo info)
{
player.PrintToChat("CommandListener worked");

Check warning on line 47 in mod/Jailbreak.Warden/Markers/WardenMarkerBehavior.cs

View workflow job for this annotation

GitHub Actions / build

Dereference of a possibly null reference.
return HookResult.Handled;
}
}

0 comments on commit 48604f6

Please sign in to comment.