Advertisement
Guest User

Untitled

a guest
Aug 28th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.78 KB | None | 0 0
  1. // Save map, players and auth stuff
  2.         {
  3.                 float &counter = m_savemap_timer;
  4.                 counter += dtime;
  5.                 static const float save_interval =
  6.                         g_settings->getFloat("server_map_save_interval");
  7.                 if (counter >= save_interval) {
  8.                         counter = 0.0;
  9.                         MutexAutoLock lock(m_env_mutex);
  10.  
  11.                         ScopeProfiler sp(g_profiler, "Server: saving stuff");
  12.  
  13.                         // Save ban file
  14.                         if (m_banmanager->isModified()) {
  15.                                 m_banmanager->save();
  16.                         }
  17.  
  18.                         // Save changed parts of map
  19.                         m_env->getMap().save(MOD_STATE_WRITE_NEEDED);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement