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:
parent
d7bc346981
commit
2c19d51409
23 changed files with 996 additions and 91 deletions
16
src/client.h
16
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; }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue