Merge branch 'general-devel' of https://github.com/NyxStudios/TShock into general-devel

This commit is contained in:
MarioE 2013-10-03 18:33:19 -04:00
commit ff1f1059c0
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 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> /// <summary>
/// Reads a configuration file from a given path /// Reads a configuration file from a given path
/// </summary> /// </summary>

View file

@ -715,7 +715,7 @@ namespace TShockAPI
{ {
player.ProjectileThreshold = 0; 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(); player.Spawn();
} }