diff options
author | Perttu Ahola <celeron55@gmail.com> | 2012-07-21 14:38:49 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2012-07-21 14:38:49 +0300 |
commit | 2795f44f0316c83728bc8059a020869058498f78 (patch) | |
tree | 38f46d49d49033cc454da660b829c1e950a491b8 /src/content_sao.h | |
parent | b0ba05c9ac021032801952ff1220ed4ab1b1bd45 (diff) | |
download | minetest-2795f44f0316c83728bc8059a020869058498f78.tar.gz minetest-2795f44f0316c83728bc8059a020869058498f78.tar.bz2 minetest-2795f44f0316c83728bc8059a020869058498f78.zip |
Server-side checking of digging; disable_anticheat setting
Diffstat (limited to 'src/content_sao.h')
-rw-r--r-- | src/content_sao.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/content_sao.h b/src/content_sao.h index 6efb9e3ec..fac16ca99 100644 --- a/src/content_sao.h +++ b/src/content_sao.h @@ -173,6 +173,9 @@ public: { return m_peer_id; } + + // Cheat prevention + v3f getLastGoodPosition() const { return m_last_good_position; @@ -183,6 +186,26 @@ public: m_time_from_last_punch = 0.0; return r; } + void noCheatDigStart(v3s16 p) + { + m_nocheat_dig_pos = p; + m_nocheat_dig_time = 0; + } + v3s16 getNoCheatDigPos() + { + return m_nocheat_dig_pos; + } + float getNoCheatDigTime() + { + return m_nocheat_dig_time; + } + void noCheatDigEnd() + { + m_nocheat_dig_pos = v3s16(32767, 32767, 32767); + } + + // Other + void updatePrivileges(const std::set<std::string> &privs, bool is_singleplayer) { @@ -196,9 +219,14 @@ private: Player *m_player; u16 m_peer_id; Inventory *m_inventory; + + // Cheat prevention v3f m_last_good_position; float m_last_good_position_age; float m_time_from_last_punch; + v3s16 m_nocheat_dig_pos; + float m_nocheat_dig_time; + int m_wield_index; bool m_position_not_sent; ItemGroupList m_armor_groups; |