Customize the time in between death and respawn.

This commit is contained in:
Zack Piispanen 2013-10-03 17:30:29 -04:00
parent 01388a5948
commit 25ca94a77e
2 changed files with 3 additions and 1 deletions

View file

@ -277,6 +277,8 @@ namespace TShockAPI
[Description("The number of reserved slots past your max server slot that can be joined by reserved players")] public bool LogRest = false;
[Description("The number of seconds a player must wait before being respawned.")] public int RespawnSeconds = 3;
/// <summary>
/// Reads a configuration file from a given path
/// </summary>

View file

@ -715,7 +715,7 @@ namespace TShockAPI
{
player.ProjectileThreshold = 0;
}
if (player.Dead && (DateTime.Now - player.LastDeath).Seconds >= 3 && player.Difficulty != 2)
if (player.Dead && (DateTime.Now - player.LastDeath).Seconds >= Config.RespawnSeconds && player.Difficulty != 2)
{
player.Spawn();
}