[go: up one dir, main page]

Skip to content

Commit

Permalink
spec mode error fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tslashd committed Dec 23, 2023
1 parent 98c82b6 commit d99413a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ST-Events/TriggerEndTouch.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ internal HookResult OnTriggerEndTouch(DynamicHook handler)
CBaseTrigger trigger = handler.GetParam<CBaseTrigger>(0);
CBaseEntity entity = handler.GetParam<CBaseEntity>(1);
CCSPlayerController client = new CCSPlayerController(new CCSPlayerPawn(entity.Handle).Controller.Value!.Handle);

if (client.IsBot || !client.IsValid || client.UserId == -1 || !client.PawnIsAlive)
if (!client.IsValid || client.UserId == -1 || !client.PawnIsAlive) // `client.IsBot` throws error in server console when going to spectator?
{
return HookResult.Continue;
}
Expand Down

0 comments on commit d99413a

Please sign in to comment.