void handleCommand_ActiveObjectRemoveAdd(NetworkPacket* pkt);
void handleCommand_ActiveObjectMessages(NetworkPacket* pkt);
void handleCommand_Movement(NetworkPacket* pkt);
+ void handleCommand_Fov(NetworkPacket *pkt);
void handleCommand_HP(NetworkPacket* pkt);
void handleCommand_Breath(NetworkPacket* pkt);
void handleCommand_MovePlayer(NetworkPacket* pkt);
// Causes urgent mesh updates (unlike Map::add/removeNodeWithEvent)
void removeNode(v3s16 p);
- /**
- * Helper function for Client Side Modding
- * CSM restrictions are applied there, this should not be used for core engine
- * @param p
- * @param is_valid_position
- * @return
- */
- MapNode getNode(v3s16 p, bool *is_valid_position);
+ // helpers to enforce CSM restrictions
+ MapNode CSMGetNode(v3s16 p, bool *is_valid_position);
+ int CSMClampRadius(v3s16 pos, int radius);
+
void addNode(v3s16 p, MapNode n, bool remove_metadata = true);
void setPlayerControl(PlayerControl &control);
// disconnect client when CSM failed.
const std::string &accessDeniedReason() const { return m_access_denied_reason; }
- bool itemdefReceived()
+ const bool itemdefReceived() const
{ return m_itemdef_received; }
- bool nodedefReceived()
+ const bool nodedefReceived() const
{ return m_nodedef_received; }
- bool mediaReceived()
+ const bool mediaReceived() const
{ return !m_media_downloader; }
const bool activeObjectsReceived() const
{ return m_activeobjects_received; }
bool checkLocalPrivilege(const std::string &priv)
{ return checkPrivilege(priv); }
virtual scene::IAnimatedMesh* getMesh(const std::string &filename, bool cache = false);
- const std::string* getModFile(const std::string &filename);
+ const std::string* getModFile(std::string filename);
std::string getModStoragePath() const override;
bool registerModStorage(ModMetadata *meta) override;
// Storage for mesh data for creating multiple instances of the same mesh
StringMap m_mesh_data;
- StringMap m_mod_files;
-
// own state
LocalClientState m_state;
IntervalLimiter m_localdb_save_interval;
u16 m_cache_save_interval;
+ // Client modding
ClientScripting *m_script = nullptr;
bool m_modding_enabled;
std::unordered_map<std::string, ModMetadata *> m_mod_storages;
float m_mod_storage_save_timer = 10.0f;
std::vector<ModSpec> m_mods;
+ StringMap m_mod_vfs;
bool m_shutdown = false;