From 8fe66e2ba464d247fe4b2314b12feb7a2e81cf82 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Fri, 22 Jul 2011 03:06:23 -0600 Subject: [PATCH] VERSION TICK 3.0.2.0722 Changed lots of crap --- TShockAPI/Properties/AssemblyInfo.cs | 4 ++-- TShockAPI/TShock.cs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index feaa483c..940ebf8a 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -35,5 +35,5 @@ using System.Runtime.InteropServices; // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("3.0.1.0722")] -[assembly: AssemblyFileVersion("3.0.1.0722")] +[assembly: AssemblyVersion("3.0.2.0722")] +[assembly: AssemblyFileVersion("3.0.2.0722")] diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 9bb74fd0..0089f77e 100755 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -326,6 +326,8 @@ namespace TShockAPI Regions.ReloadAllRegions(); } + + private DateTime LastCheck = DateTime.UtcNow; private void OnUpdate(GameTime time) { UpdateManager.UpdateProcedureCheck(); @@ -333,12 +335,10 @@ namespace TShockAPI if (Backups.IsBackupTime) Backups.Backup(); - ElapsedTime += time.ElapsedGameTime.TotalMilliseconds; - //call these every second, not every update - if (ElapsedTime >= 1000) + if ((DateTime.UtcNow - LastCheck).TotalSeconds >= 1) { - ElapsedTime = 0; + LastCheck = DateTime.UtcNow; foreach (TSPlayer player in TShock.Players) { if (player != null && player.Active)