Force respawn after death.

(prevents some forms of invisibility)
This commit is contained in:
Deathmax 2011-08-20 20:45:19 +08:00
parent 8b59e1c525
commit 85f1ba6643
3 changed files with 9 additions and 0 deletions

View file

@ -385,6 +385,11 @@ namespace TShockAPI
}
if (CheckPlayerCollision(player.TileX, player.TileY))
player.SendMessage("You are currently nocliping!", Color.Red);
if (player.LastDeath != null && player.ForceSpawn && (DateTime.Now - player.LastDeath).Seconds >= 3)
{
player.Spawn();
player.ForceSpawn = false;
}
}
}
}