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
This commit is contained in:
Cai 2026-01-17 20:41:09 +08:00
parent a867772116
commit e6f3013a76
No known key found for this signature in database
GPG key ID: 7D738D40768F4D11

View file

@ -2735,7 +2735,10 @@ namespace TShockAPI
if (OnPlayerSpawn(args.Player, args.Data, player, spawnX, spawnY, respawnTimer, numberOfDeathsPVE, numberOfDeathsPVP, context))
return true;
if (!Main.ServerSideCharacter || context != PlayerSpawnContext.SpawningIntoWorld)
{
args.Player.Dead = respawnTimer > 0;
}
if (Main.ServerSideCharacter)
{