void spawnParticle(const std::string &playername,
v3f pos, v3f velocity, v3f acceleration,
float expirationtime, float size,
- bool collisiondetection, bool collision_removal,
+ bool collisiondetection, bool collision_removal, bool object_collision,
bool vertical, const std::string &texture,
const struct TileAnimationParams &animation, u8 glow);
v3f minacc, v3f maxacc,
float minexptime, float maxexptime,
float minsize, float maxsize,
- bool collisiondetection, bool collision_removal,
+ bool collisiondetection, bool collision_removal, bool object_collision,
ServerActiveObject *attached,
bool vertical, const std::string &texture,
const std::string &playername, const struct TileAnimationParams &animation,
void deleteParticleSpawner(const std::string &playername, u32 id);
// Creates or resets inventory
- Inventory* createDetachedInventory(const std::string &name, const std::string &player="");
+ Inventory *createDetachedInventory(const std::string &name,
+ const std::string &player = "");
+ bool removeDetachedInventory(const std::string &name);
// Envlock and conlock should be locked when using scriptapi
ServerScripting *getScriptIface(){ return m_script; }
far_d_nodes are ignored and their peer_ids are added to far_players
*/
// Envlock and conlock should be locked when calling these
- void sendRemoveNode(v3s16 p, u16 ignore_id=0,
- std::vector<u16> *far_players=NULL, float far_d_nodes=100);
- void sendAddNode(v3s16 p, MapNode n, u16 ignore_id=0,
- std::vector<u16> *far_players=NULL, float far_d_nodes=100,
- bool remove_metadata=true);
+ void sendRemoveNode(v3s16 p, std::unordered_set<u16> *far_players = nullptr,
+ float far_d_nodes = 100);
+ void sendAddNode(v3s16 p, MapNode n,
+ std::unordered_set<u16> *far_players = nullptr,
+ float far_d_nodes = 100, bool remove_metadata = true);
+
+ void sendMetadataChanged(const std::list<v3s16> &meta_updates,
+ float far_d_nodes = 100);
// Environment and Connection must be locked when called
void SendBlockNoLock(session_t peer_id, MapBlock *block, u8 ver, u16 net_proto_version);
v3f minacc, v3f maxacc,
float minexptime, float maxexptime,
float minsize, float maxsize,
- bool collisiondetection, bool collision_removal,
+ bool collisiondetection, bool collision_removal, bool object_collision,
u16 attached_id,
bool vertical, const std::string &texture, u32 id,
const struct TileAnimationParams &animation, u8 glow);
void SendSpawnParticle(session_t peer_id, u16 protocol_version,
v3f pos, v3f velocity, v3f acceleration,
float expirationtime, float size,
- bool collisiondetection, bool collision_removal,
+ bool collisiondetection, bool collision_removal, bool object_collision,
bool vertical, const std::string &texture,
const struct TileAnimationParams &animation, u8 glow);
u32 SendActiveObjectRemoveAdd(session_t peer_id, const std::string &datas);
void SendActiveObjectMessages(session_t peer_id, const std::string &datas,
bool reliable = true);
- void SendCSMFlavourLimits(session_t peer_id);
+ void SendCSMRestrictionFlags(session_t peer_id);
/*
Something random
This is behind m_env_mutex
*/
std::queue<MapEditEvent*> m_unsent_map_edit_queue;
- /*
- Set to true when the server itself is modifying the map and does
- all sending of information by itself.
- This is behind m_env_mutex
- */
- bool m_ignore_map_edit_events = false;
/*
If a non-empty area, map edit events contained within are left
unsent. Done at map generation time to speed up editing of the
std::unordered_map<std::string, ModMetadata *> m_mod_storages;
float m_mod_storage_save_timer = 10.0f;
- // CSM flavour limits byteflag
- u64 m_csm_flavour_limits = CSMFlavourLimit::CSM_FL_NONE;
- u32 m_csm_noderange_limit = 8;
+ // CSM restrictions byteflag
+ u64 m_csm_restriction_flags = CSMRestrictionFlags::CSM_RF_NONE;
+ u32 m_csm_restriction_noderange = 8;
// ModChannel manager
std::unique_ptr<ModChannelMgr> m_modchannel_mgr;