aboutsummaryrefslogtreecommitdiff
path: root/src/client.h
diff options
context:
space:
mode:
authorLoïc Blot <nerzhul@users.noreply.github.com>2017-01-22 11:17:41 +0100
committerLoïc Blot <nerzhul@users.noreply.github.com>2017-03-13 23:56:05 +0100
commit2c19d51409ca903021e0b508e5bc15299c4e51dc (patch)
tree8df932580abc289160aadbc40487099fd033c7d8 /src/client.h
parentd7bc346981e189851e490f2417ed015a38bca79b (diff)
downloadminetest-2c19d51409ca903021e0b508e5bc15299c4e51dc.tar.gz
minetest-2c19d51409ca903021e0b508e5bc15299c4e51dc.tar.bz2
minetest-2c19d51409ca903021e0b508e5bc15299c4e51dc.zip
[CSM] sound_play & sound_stop support + client_lua_api doc (#5096)
* squashed: CSM: Implement register_globalstep * Re-use fatal error mechanism from server to disconnect client on CSM error * Little client functions cleanups * squashed: CSM: add core.after function * core.after is shared code between client & server * ModApiUtil get_us_time feature enabled for client
Diffstat (limited to 'src/client.h')
-rw-r--r--src/client.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/client.h b/src/client.h
index 21aeb0575..ff8aea591 100644
--- a/src/client.h
+++ b/src/client.h
@@ -488,13 +488,19 @@ public:
// Get event from queue. CE_NONE is returned if queue is empty.
ClientEvent getClientEvent();
- bool accessDenied()
- { return m_access_denied; }
+ bool accessDenied() const { return m_access_denied; }
- bool reconnectRequested() { return m_access_denied_reconnect; }
+ bool reconnectRequested() const { return m_access_denied_reconnect; }
- std::string accessDeniedReason()
- { return m_access_denied_reason; }
+ void setFatalError(const std::string &reason)
+ {
+ m_access_denied = true;
+ m_access_denied_reason = reason;
+ }
+
+ // Renaming accessDeniedReason to better name could be good as it's used to
+ // disconnect client when CSM failed.
+ const std::string &accessDeniedReason() const { return m_access_denied_reason; }
bool itemdefReceived()
{ return m_itemdef_received; }