Implement suggestion for fixing forceupdate flag

This commit is contained in:
Chris 2021-03-23 11:44:24 +10:30
parent 36b5d4e9f7
commit b4789607f6
2 changed files with 8 additions and 0 deletions

View file

@ -890,6 +890,13 @@ namespace TShockAPI
/// <param name="args">args - EventArgs args</param>
private void OnUpdate(EventArgs args)
{
// This forces Terraria to actually continue to update
// even if there are no clients connected
if (ServerApi.ForceUpdate)
{
Netplay.HasClients = true;
}
if (Backups.IsBackupTime)
Backups.Backup();
//call these every second, not every update