This commit is contained in:
Cai 2026-01-28 20:19:44 +08:00
parent 785e41bd0f
commit 4f456346bf
No known key found for this signature in database
GPG key ID: 7D738D40768F4D11

View file

@ -2729,8 +2729,6 @@ namespace TShockAPI
}
byte player = args.Data.ReadInt8();
short spawnX = args.Data.ReadInt16();
short spawnY = args.Data.ReadInt16();
@ -2753,6 +2751,7 @@ namespace TShockAPI
if (Main.ServerSideCharacter)
{
// As long as the player has not changed his spawnpoint since initial connection,
// we should not use the client's spawnpoint value. This is because the spawnpoint
// value is not saved on the client when SSC is enabled. Hence, we have to assert
@ -2792,7 +2791,7 @@ namespace TShockAPI
args.Player.spawnSynced = true;
return false;
}
args.TPlayer.Spawn(context);
// spawn the player before teleporting
NetMessage.SendData((int)PacketTypes.PlayerSpawn, -1, args.Player.Index, null, args.Player.Index, (int)PlayerSpawnContext.ReviveFromDeath);