aboutsummaryrefslogtreecommitdiff
path: root/src/client/client.h
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
committerElias Fleckenstein <eliasfleckenstein@web.de>2022-05-17 22:12:00 +0200
commit21df26984da91143c15587f5a03c98d68c3adc4e (patch)
treeaaa707a628ad331f67890023dffe1b4f60dd01d3 /src/client/client.h
parentb09fc5de5cdb021f43ad32b7e3f50dc75c0bc622 (diff)
parenteabf05758e3ba5f6f4bb1b8d1d1f02179b84e410 (diff)
downloaddragonfireclient-21df26984da91143c15587f5a03c98d68c3adc4e.tar.xz
Merge branch 'master' of https://github.com/minetest/minetest
Diffstat (limited to 'src/client/client.h')
-rw-r--r--src/client/client.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/client/client.h b/src/client/client.h
index 1493d3ce3..d49f2f9ad 100644
--- a/src/client/client.h
+++ b/src/client/client.h
@@ -226,6 +226,7 @@ public:
void handleCommand_PlayerSpeed(NetworkPacket *pkt);
void handleCommand_MediaPush(NetworkPacket *pkt);
void handleCommand_MinimapModes(NetworkPacket *pkt);
+ void handleCommand_SetLighting(NetworkPacket *pkt);
void ProcessData(NetworkPacket *pkt);
@@ -335,13 +336,13 @@ public:
// disconnect client when CSM failed.
const std::string &accessDeniedReason() const { return m_access_denied_reason; }
- const bool itemdefReceived() const
+ bool itemdefReceived() const
{ return m_itemdef_received; }
- const bool nodedefReceived() const
+ bool nodedefReceived() const
{ return m_nodedef_received; }
- const bool mediaReceived() const
+ bool mediaReceived() const
{ return !m_media_downloader; }
- const bool activeObjectsReceived() const
+ bool activeObjectsReceived() const
{ return m_activeobjects_received; }
u16 getProtoVersion()
@@ -382,11 +383,14 @@ public:
bool checkLocalPrivilege(const std::string &priv){ return checkPrivilege(priv); }
virtual scene::IAnimatedMesh* getMesh(const std::string &filename, bool cache = false);
const std::string* getModFile(std::string filename);
+ ModMetadataDatabase *getModStorageDatabase() override { return m_mod_storage_database; }
- std::string getModStoragePath() const override;
bool registerModStorage(ModMetadata *meta) override;
void unregisterModStorage(const std::string &name) override;
+ // Migrates away old files-based mod storage if necessary
+ void migrateModStorage();
+
// The following set of functions is used by ClientMediaDownloader
// Insert a media file appropriately into the appropriate manager
bool loadMedia(const std::string &data, const std::string &filename,
@@ -405,7 +409,7 @@ public:
}
ClientScripting *getScript() { return m_script; }
- const bool modsLoaded() const { return m_mods_loaded; }
+ bool modsLoaded() const { return m_mods_loaded; }
void pushToEventQueue(ClientEvent *event);
@@ -554,7 +558,7 @@ private:
// Set of media filenames pushed by server at runtime
std::unordered_set<std::string> m_media_pushed_files;
// Pending downloads of dynamic media (key: token)
- std::vector<std::pair<u32, std::unique_ptr<SingleMediaDownloader>>> m_pending_media_downloads;
+ std::vector<std::pair<u32, std::shared_ptr<SingleMediaDownloader>>> m_pending_media_downloads;
// time_of_day speed approximation for old protocol
bool m_time_of_day_set = false;
@@ -596,6 +600,7 @@ private:
// Client modding
ClientScripting *m_script = nullptr;
std::unordered_map<std::string, ModMetadata *> m_mod_storages;
+ ModMetadataDatabase *m_mod_storage_database = nullptr;
float m_mod_storage_save_timer = 10.0f;
std::vector<ModSpec> m_mods;
StringMap m_mod_vfs;