Merge pull request #3152 from ACaiCat/fix-single-player-dead
fix: ignore `respawnTimer` when players are spawning into the world
This commit is contained in:
commit
28836f4c2c
1 changed files with 5 additions and 2 deletions
|
|
@ -2734,8 +2734,11 @@ namespace TShockAPI
|
||||||
|
|
||||||
if (OnPlayerSpawn(args.Player, args.Data, player, spawnX, spawnY, respawnTimer, numberOfDeathsPVE, numberOfDeathsPVP, context))
|
if (OnPlayerSpawn(args.Player, args.Data, player, spawnX, spawnY, respawnTimer, numberOfDeathsPVE, numberOfDeathsPVP, context))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
args.Player.Dead = respawnTimer > 0;
|
if (!Main.ServerSideCharacter || context != PlayerSpawnContext.SpawningIntoWorld)
|
||||||
|
{
|
||||||
|
args.Player.Dead = respawnTimer > 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (Main.ServerSideCharacter)
|
if (Main.ServerSideCharacter)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue