1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-30 19:22:14 +00:00

Add server/client annotations to settingtypes.txt and make use of them (#15756)

This commit is contained in:
grorp 2025-04-01 07:55:47 -04:00 committed by GitHub
parent 6724068659
commit c30c94dfaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 231 additions and 96 deletions

View file

@ -140,8 +140,7 @@ public:
bool isShutdown();
void connect(const Address &address, const std::string &address_name,
bool is_local_server);
void connect(const Address &address, const std::string &address_name);
/*
Stuff that references the environment is valid only as
@ -338,8 +337,17 @@ public:
u16 getProtoVersion() const
{ return m_proto_ver; }
// Whether the server is in "simple singleplayer mode".
// This implies "m_internal_server = true".
bool m_simple_singleplayer_mode;
// Whether the server is hosted by the same Luanti instance and singletons
// like g_settings are shared between client and server.
//
// This is intentionally *not* true if we're just connecting to a localhost
// server hosted by a different Luanti instance.
bool m_internal_server;
float mediaReceiveProgress();
void drawLoadScreen(const std::wstring &text, float dtime, int percent);
@ -441,9 +449,7 @@ private:
void peerAdded(con::IPeer *peer) override;
void deletingPeer(con::IPeer *peer, bool timeout) override;
void initLocalMapSaving(const Address &address,
const std::string &hostname,
bool is_local_server);
void initLocalMapSaving(const Address &address, const std::string &hostname);
void ReceiveAll();