void ServerEnvironment::step(float dtime)
{
DSTACK(__FUNCTION_NAME);
+
+ //TimeTaker timer("ServerEnv step");
// Get some settings
//bool free_move = g_settings.getBool("free_move");
if(m_object_management_interval.step(dtime, 0.5))
{
+ //TimeTaker timer("ServerEnv object management");
+
/*
Remove objects that satisfy (m_removed && m_known_by_count==0)
*/
assert(m_env);
const float interval = 0.2;
- if(m_move_interval.step(dtime, interval))
+ if(m_move_interval.step(dtime, interval)==false)
return;
dtime = interval;
if(m_is_active == false)
{
- if(m_inactive_interval.step(dtime, 0.5))
+ if(m_inactive_interval.step(dtime, 0.5)==false)
return;
}
{
m_accumulator += dtime;
if(m_accumulator < wanted_interval)
- {
- dtime = 0;
- return true;
- }
+ return false;
m_accumulator -= wanted_interval;
- return false;
+ return true;
}
protected:
float m_accumulator;