Merge branch 'general-devel' of github.com:TShock/TShock into general-devel
This commit is contained in:
commit
2bc61c1365
2 changed files with 31 additions and 22 deletions
|
|
@ -46,7 +46,7 @@ namespace TShockAPI
|
|||
public bool RangeChecks = true;
|
||||
public bool SpamChecks = false;
|
||||
public bool DisableBuild = false;
|
||||
public int TileThreshold = 20;
|
||||
public int TileThreshold = 60;
|
||||
|
||||
public float[] AdminChatRGB = { 255, 0, 0 };
|
||||
public string AdminChatPrefix = "(Admin) ";
|
||||
|
|
|
|||
|
|
@ -69,6 +69,8 @@ namespace TShockAPI
|
|||
public static Process TShockProcess;
|
||||
public static bool OverridePort = false;
|
||||
|
||||
public static double ElapsedTime;
|
||||
|
||||
public override Version Version
|
||||
{
|
||||
get { return VersionNum; }
|
||||
|
|
@ -320,6 +322,12 @@ namespace TShockAPI
|
|||
if (Backups.IsBackupTime)
|
||||
Backups.Backup();
|
||||
|
||||
ElapsedTime += time.ElapsedGameTime.TotalMilliseconds;
|
||||
|
||||
//call these every second, not every update
|
||||
if (ElapsedTime >= 1000)
|
||||
{
|
||||
ElapsedTime = 0;
|
||||
foreach (TSPlayer player in TShock.Players)
|
||||
{
|
||||
if (player != null && player.Active)
|
||||
|
|
@ -362,6 +370,7 @@ namespace TShockAPI
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void OnJoin(int ply, HandledEventArgs handler)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue