#include "rollback_interface.h" // Needed for rollbackRevertActions()
#include "util/numeric.h"
#include "util/thread.h"
+#include "environment.h"
#include <string>
#include <list>
#include <map>
u16 peer_id;
};
-struct MediaRequest
-{
- std::string name;
-
- MediaRequest(const std::string &name_=""):
- name(name_)
- {}
-};
-
struct MediaInfo
{
std::string path;
bool showFormspec(const char *name, const std::string &formspec, const std::string &formname);
Map & getMap() { return m_env->getMap(); }
+ ServerEnvironment & getEnv() { return *m_env; }
u32 hudAdd(Player *player, HudElement *element);
bool hudRemove(Player *player, u32 id);
void sendRemoveNode(v3s16 p, u16 ignore_id=0,
std::list<u16> *far_players=NULL, float far_d_nodes=100);
void sendAddNode(v3s16 p, MapNode n, u16 ignore_id=0,
- std::list<u16> *far_players=NULL, float far_d_nodes=100);
+ std::list<u16> *far_players=NULL, float far_d_nodes=100,
+ bool remove_metadata=true);
void setBlockNotSent(v3s16 p);
// Environment and Connection must be locked when called
void fillMediaCache();
void sendMediaAnnouncement(u16 peer_id);
void sendRequestedMedia(u16 peer_id,
- const std::list<MediaRequest> &tosend);
+ const std::list<std::string> &tosend);
void sendDetachedInventory(const std::string &name, u16 peer_id);
void sendDetachedInventoryToAll(const std::string &name);
JMutex m_con_mutex;
// Connected clients (behind the con mutex)
std::map<u16, RemoteClient*> m_clients;
- u16 m_clients_number; //for announcing masterserver
+ std::vector<std::string> m_clients_names; //for announcing masterserver
// Ban checking
BanManager *m_banmanager;