Skip to content

Instantly share code, notes, and snippets.

View Siarkowy's full-sized avatar

Ace Siarkowy

View GitHub Profile
uint32 World::GetSaveInterval()
{
uint32 hardtime = sWorld.getConfig(CONFIG_UINT32_INTERVAL_SAVE);
if (!sWorld.getConfig(CONFIG_UINT32_INTERVAL_SAVE))
hardtime = ceil((float)(1.f / sWorld.getConfig(CONFIG_UINT32_INTERVAL_SAVEPERSEC) * sWorld.GetActiveSessionCount()*IN_MILLISECONDS));
if (hardtime < 2 * IN_MILLISECONDS)
hardtime = 2 * IN_MILLISECONDS;