From 413a2b91e3cfd9600cdca0272696ae316c720f41 Mon Sep 17 00:00:00 2001 From: SGKoishi Date: Tue, 18 Mar 2025 17:17:45 +0900 Subject: [PATCH] Fix Pryaxis/TShock#3073 --- TShockAPI/Bouncer.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index bfcd1836..89ccf7bc 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -1199,18 +1199,18 @@ namespace TShockAPI int index = args.Index; float[] ai = args.Ai; + // Clients do send NaN values so we can't just kick them + // See https://github.com/Pryaxis/TShock/issues/3076 if (!float.IsFinite(pos.X) || !float.IsFinite(pos.Y)) { - TShock.Log.ConsoleInfo(GetString("Bouncer / OnNewProjectile force kicked (attempted to set position to infinity or NaN) from {0}", args.Player.Name)); - args.Player.Kick(GetString("Detected DOOM set to ON position."), true, true); + TShock.Log.ConsoleInfo(GetString("Bouncer / OnNewProjectile rejected set position to infinity or NaN from {0}", args.Player.Name)); args.Handled = true; return; } if (!float.IsFinite(vel.X) || !float.IsFinite(vel.Y)) { - TShock.Log.ConsoleInfo(GetString("Bouncer / OnNewProjectile force kicked (attempted to set velocity to infinity or NaN) from {0}", args.Player.Name)); - args.Player.Kick(GetString("Detected DOOM set to ON position."), true, true); + TShock.Log.ConsoleInfo(GetString("Bouncer / OnNewProjectile rejected set velocity to infinity or NaN from {0}", args.Player.Name)); args.Handled = true; return; }