From e6f3013a764ae19faa28cd3581aebc509e2c1bb1 Mon Sep 17 00:00:00 2001 From: Cai <13110818005@qq.com> Date: Sat, 17 Jan 2026 20:41:09 +0800 Subject: [PATCH] fix: ignore `respawnTimer` when players are spawning into the world * Players who die in single-player mode without respawning should not be marked as Dead on the SSC server. * In my tests, only the SSC server receives a non-zero `respawnTimer`. Therefore, this may be a client-side bug. closed: #3151 --- TShockAPI/GetDataHandlers.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 6ed0f8de..a21fe55f 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -2734,8 +2734,11 @@ namespace TShockAPI if (OnPlayerSpawn(args.Player, args.Data, player, spawnX, spawnY, respawnTimer, numberOfDeathsPVE, numberOfDeathsPVP, context)) return true; - - args.Player.Dead = respawnTimer > 0; + + if (!Main.ServerSideCharacter || context != PlayerSpawnContext.SpawningIntoWorld) + { + args.Player.Dead = respawnTimer > 0; + } if (Main.ServerSideCharacter) {