Fix disabling of player movement cheat detection in singleplayer
authorPerttu Ahola <celeron55@gmail.com>
Sun, 1 Apr 2012 10:37:07 +0000 (13:37 +0300)
committerPerttu Ahola <celeron55@gmail.com>
Sun, 1 Apr 2012 10:37:07 +0000 (13:37 +0300)
src/content_sao.cpp

index 810bd5a7c7e7ba83b9a8127a962c0f1c843e96c9..2b3f7c022854e7c3bf7e4380e7488ebad9b2867c 100644 (file)
@@ -867,7 +867,12 @@ void PlayerSAO::step(float dtime, bool send_recommended)
 
        m_time_from_last_punch += dtime;
        
-       if(!m_is_singleplayer)
+       if(m_is_singleplayer)
+       {
+               m_last_good_position = m_player->getPosition();
+               m_last_good_position_age = 0;
+       }
+       else
        {
                /*
                        Check player movements