From: Perttu Ahola Date: Sun, 1 Apr 2012 10:37:07 +0000 (+0300) Subject: Fix disabling of player movement cheat detection in singleplayer X-Git-Tag: 0.4.dev-20120408~47 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=5bd32eca0f4c8afa8d933f7d7d1946cabaa8dc43;p=oweals%2Fminetest.git Fix disabling of player movement cheat detection in singleplayer --- diff --git a/src/content_sao.cpp b/src/content_sao.cpp index 810bd5a7c..2b3f7c022 100644 --- a/src/content_sao.cpp +++ b/src/content_sao.cpp @@ -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