aboutsummaryrefslogtreecommitdiff
path: root/src/content_sao.h
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2012-04-01 13:19:50 +0300
committerPerttu Ahola <celeron55@gmail.com>2012-04-01 13:19:50 +0300
commit491287c0af743d1d5c3ae6bbefd272244dbd864c (patch)
treef4cb87a1885ac1033307b8bf9eec966e0efd8941 /src/content_sao.h
parent8ecfd88d92b0c8bf695f862b76077488127ab33f (diff)
downloadminetest-491287c0af743d1d5c3ae6bbefd272244dbd864c.tar.gz
minetest-491287c0af743d1d5c3ae6bbefd272244dbd864c.tar.bz2
minetest-491287c0af743d1d5c3ae6bbefd272244dbd864c.zip
Don't apply player movement cheat detection in singleplayer
Diffstat (limited to 'src/content_sao.h')
-rw-r--r--src/content_sao.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/content_sao.h b/src/content_sao.h
index 55d0637ae..d336c5eea 100644
--- a/src/content_sao.h
+++ b/src/content_sao.h
@@ -106,7 +106,7 @@ class PlayerSAO : public ServerActiveObject
{
public:
PlayerSAO(ServerEnvironment *env_, Player *player_, u16 peer_id_,
- const std::set<std::string> &privs);
+ const std::set<std::string> &privs, bool is_singleplayer);
~PlayerSAO();
u8 getType() const
{ return ACTIVEOBJECT_TYPE_PLAYER; }
@@ -183,9 +183,11 @@ public:
m_time_from_last_punch = 0.0;
return r;
}
- void updatePrivileges(const std::set<std::string> &privs)
+ void updatePrivileges(const std::set<std::string> &privs,
+ bool is_singleplayer)
{
m_privs = privs;
+ m_is_singleplayer = is_singleplayer;
}
private:
@@ -205,6 +207,7 @@ private:
struct ObjectProperties m_prop;
// Cached privileges for enforcement
std::set<std::string> m_privs;
+ bool m_is_singleplayer;
public:
// Some flags used by Server