1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

[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
This commit is contained in:
Loïc Blot 2017-01-22 11:17:41 +01:00
parent d7bc346981
commit 2c19d51409
23 changed files with 996 additions and 91 deletions

View file

@ -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; }