These names are reserved for the compiler/library implementations.
m_camera_mode(CAMERA_MODE_FIRST)
{
- //dstream<<__FUNCTION_NAME<<std::endl;
+ //dstream<<FUNCTION_NAME<<std::endl;
// note: making the camera node a child of the player node
// would lead to unexpected behaviour, so we don't do that.
return;
m_frametime_counter = 0.2; // Same as ClientMap::updateDrawList interval
- /*dstream<<__FUNCTION_NAME
+ /*dstream<<FUNCTION_NAME
<<": Collected "<<m_added_frames<<" frames, total of "
<<m_added_busytime<<"s."<<std::endl;
*/
void MeshUpdateQueue::addBlock(v3s16 p, MeshMakeData *data, bool ack_block_to_server, bool urgent)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
assert(data); // pre-condition
const std::string &address_name,
bool is_local_server)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
initLocalMapSaving(address, address_name, is_local_server);
void Client::step(float dtime)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Limit a bit
if(dtime > 2.0)
void Client::ReceiveAll()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
u32 start_ms = porting::getTimeMs();
for(;;)
{
void Client::Receive()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt;
m_con.Receive(&pkt);
ProcessData(&pkt);
*/
void Client::ProcessData(NetworkPacket *pkt)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
ToClientCommand command = (ToClientCommand) pkt->getCommand();
u32 sender_peer_id = pkt->getPeerId();
void Client::sendDamage(u8 damage)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOSERVER_DAMAGE, sizeof(u8));
pkt << damage;
void Client::sendBreath(u16 breath)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOSERVER_BREATH, sizeof(u16));
pkt << breath;
void Client::sendRespawn()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOSERVER_RESPAWN, 0);
Send(&pkt);
void Client::sendReady()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOSERVER_CLIENT_READY,
1 + 1 + 1 + 1 + 2 + sizeof(char) * strlen(g_version_hash));
float dtime,
std::vector<PrioritySortedBlockTransfer> &dest)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Increment timers
MapSector * ClientMap::emergeSector(v2s16 p2d)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Check that it doesn't exist already
try{
return getSectorNoGenerate(p2d);
void ClientMap::renderMap(video::IVideoDriver* driver, s32 pass)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
bool is_transparent_pass = pass == scene::ESNRP_TRANSPARENT;
}
catch(SerializationError &e)
{
- warningstream<<__FUNCTION_NAME
+ warningstream<<FUNCTION_NAME
<<": error deSerializing itemstring \""
<<m_itemstring<<std::endl;
}
if(version > 1)
{
- infostream<<__FUNCTION_NAME<<": version "<<version<<" not supported"
+ infostream<<FUNCTION_NAME<<": version "<<version<<" not supported"
<<std::endl;
- throw SerializationError(__FUNCTION_NAME);
+ throw SerializationError(FUNCTION_NAME);
}
u16 count = readU16(is);
if(meta->get(p) != NULL)
{
- warningstream<<__FUNCTION_NAME<<": "
+ warningstream<<FUNCTION_NAME<<": "
<<"already set data at position"
<<"("<<p.X<<","<<p.Y<<","<<p.Z<<"): Ignoring."
<<std::endl;
std::string LuaEntitySAO::getStaticData()
{
- verbosestream<<__FUNCTION_NAME<<std::endl;
+ verbosestream<<FUNCTION_NAME<<std::endl;
std::ostringstream os(std::ios::binary);
// version
writeU8(os, 1);
#ifdef _MSC_VER
#include <eh.h>
#endif
- #define __NORETURN __declspec(noreturn)
- #define __FUNCTION_NAME __FUNCTION__
#define NORETURN __declspec(noreturn)
#define FUNCTION_NAME __FUNCTION__
#else
- #define __NORETURN __attribute__ ((__noreturn__))
- #define __FUNCTION_NAME __PRETTY_FUNCTION__
#define NORETURN __attribute__ ((__noreturn__))
#define FUNCTION_NAME __PRETTY_FUNCTION__
#endif
/* Abort program execution immediately
*/
-__NORETURN extern void fatal_error_fn(
+NORETURN extern void fatal_error_fn(
const char *msg, const char *file,
unsigned int line, const char *function);
#define FATAL_ERROR(msg) \
- fatal_error_fn((msg), __FILE__, __LINE__, __FUNCTION_NAME)
+ fatal_error_fn((msg), __FILE__, __LINE__, FUNCTION_NAME)
#define FATAL_ERROR_IF(expr, msg) \
((expr) \
- ? fatal_error_fn((msg), __FILE__, __LINE__, __FUNCTION_NAME) \
+ ? fatal_error_fn((msg), __FILE__, __LINE__, FUNCTION_NAME) \
: (void)(0))
/*
defined)
*/
-__NORETURN extern void sanity_check_fn(
+NORETURN extern void sanity_check_fn(
const char *assertion, const char *file,
unsigned int line, const char *function);
#define SANITY_CHECK(expr) \
((expr) \
? (void)(0) \
- : sanity_check_fn(#expr, __FILE__, __LINE__, __FUNCTION_NAME))
+ : sanity_check_fn(#expr, __FILE__, __LINE__, FUNCTION_NAME))
#define sanity_check(expr) SANITY_CHECK(expr)
void *EmergeThread::run()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
BEGIN_DEBUG_EXCEPTION_HANDLER
v3s16 pos;
void Environment::addPlayer(Player *player)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
/*
Check that peer_ids are unique.
Also check that names are unique.
void ServerEnvironment::step(float dtime)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
//TimeTaker timer("ServerEnv step");
void ClientEnvironment::addPlayer(Player *player)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
/*
It is a failure if player is local and there already is a local
player
void ClientEnvironment::step(float dtime)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
/* Step time of day */
stepTimeOfDay(dtime);
void *run()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
CurlHandlePool pool;
void ItemStack::serialize(std::ostream &os) const
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
if(empty())
return;
void ItemStack::deSerialize(std::istream &is, IItemDefManager *itemdef)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
clear();
std::vector<ItemStack> &output_replacements,
bool decrementInput, IGameDef *gamedef)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
result.clear();
INodeDefManager *nodemgr = m_gamedef->ndef();
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
//TimeTaker timer("transformLiquids()");
u32 loopcount = 0;
m_emerge(emerge),
m_map_metadata_changed(true)
{
- verbosestream<<__FUNCTION_NAME<<std::endl;
+ verbosestream<<FUNCTION_NAME<<std::endl;
/*
Try to load map; if not found, create a new one.
ServerMap::~ServerMap()
{
- verbosestream<<__FUNCTION_NAME<<std::endl;
+ verbosestream<<FUNCTION_NAME<<std::endl;
try
{
ServerMapSector *ServerMap::createSector(v2s16 p2d)
{
DSTACKF("%s: p2d=(%d,%d)",
- __FUNCTION_NAME,
+ FUNCTION_NAME,
p2d.X, p2d.Y);
/*
std::map<v3s16, MapBlock*> &modified_blocks
)
{
- DSTACKF("%s: p=(%d,%d,%d)", __FUNCTION_NAME, p.X, p.Y, p.Z);
+ DSTACKF("%s: p=(%d,%d,%d)", FUNCTION_NAME, p.X, p.Y, p.Z);
/*infostream<<"generateBlock(): "
<<"("<<p.X<<","<<p.Y<<","<<p.Z<<")"
*/
if(blockpos_over_limit(p))
{
- infostream<<__FUNCTION_NAME<<": Block position over limit"<<std::endl;
+ infostream<<FUNCTION_NAME<<": Block position over limit"<<std::endl;
throw InvalidPositionException("generateBlock(): pos. over limit");
}
MapBlock * ServerMap::createBlock(v3s16 p)
{
DSTACKF("%s: p=(%d,%d,%d)",
- __FUNCTION_NAME, p.X, p.Y, p.Z);
+ FUNCTION_NAME, p.X, p.Y, p.Z);
/*
Do not create over-limit
MapBlock * ServerMap::emergeBlock(v3s16 p, bool create_blank)
{
DSTACKF("%s: p=(%d,%d,%d), create_blank=%d",
- __FUNCTION_NAME,
+ FUNCTION_NAME,
p.X, p.Y, p.Z, create_blank);
{
void ServerMap::save(ModifiedState save_level)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
if(m_map_saving_enabled == false) {
warningstream<<"Not saving map, saving disabled."<<std::endl;
return;
void ServerMap::saveMapMeta()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
createDirs(m_savedir);
void ServerMap::loadMapMeta()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
Settings conf;
std::string fullpath = m_savedir + DIR_DELIM + "map_meta.txt";
void ServerMap::saveSectorMeta(ServerMapSector *sector)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Format used for writing
u8 version = SER_FMT_VER_HIGHEST_WRITE;
// Get destination
MapSector* ServerMap::loadSectorMeta(std::string sectordir, bool save_after_load)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Get destination
v2s16 p2d = getSectorPos(sectordir);
bool ServerMap::loadSectorMeta(v2s16 p2d)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// The directory layout we're going to load from.
// 1 - original sectors/xxxxzzzz/
#if 0
bool ServerMap::loadSectorFull(v2s16 p2d)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
MapSector *sector = NULL;
void ServerMap::loadBlock(std::string sectordir, std::string blockfile,
MapSector *sector, bool save_after_load)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
std::string fullpath = sectordir + DIR_DELIM + blockfile;
try {
void ServerMap::loadBlock(std::string *blob, v3s16 p3d, MapSector *sector, bool save_after_load)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
try {
std::istringstream is(*blob, std::ios_base::binary);
MapBlock* ServerMap::loadBlock(v3s16 blockpos)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
v2s16 p2d(blockpos.X, blockpos.Z);
char tmp;
is.read(&tmp, 1);
if (is.gcount() != 1)
- throw SerializationError(std::string(__FUNCTION_NAME)
+ throw SerializationError(std::string(FUNCTION_NAME)
+ ": not enough input data");
is_underground = tmp;
is.read((char *)*databuf_nodelist, nodecount * ser_length);
if ((u32)is.gcount() != nodecount * ser_length)
- throw SerializationError(std::string(__FUNCTION_NAME)
+ throw SerializationError(std::string(FUNCTION_NAME)
+ ": not enough input data");
} else if (version <= 10) {
u8 t8;
decompress(is, os, version);
std::string s = os.str();
if (s.size() != nodecount)
- throw SerializationError(std::string(__FUNCTION_NAME)
+ throw SerializationError(std::string(FUNCTION_NAME)
+ ": not enough input data");
for (u32 i = 0; i < s.size(); i++) {
databuf_nodelist[i*ser_length] = s[i];
decompress(is, os, version);
std::string s = os.str();
if (s.size() != nodecount)
- throw SerializationError(std::string(__FUNCTION_NAME)
+ throw SerializationError(std::string(FUNCTION_NAME)
+ ": not enough input data");
for (u32 i = 0; i < s.size(); i++) {
databuf_nodelist[i*ser_length + 1] = s[i];
decompress(is, os, version);
std::string s = os.str();
if (s.size() != nodecount)
- throw SerializationError(std::string(__FUNCTION_NAME)
+ throw SerializationError(std::string(FUNCTION_NAME)
+ ": not enough input data");
for (u32 i = 0; i < s.size(); i++) {
databuf_nodelist[i*ser_length + 2] = s[i];
decompress(is, os, version);
std::string s = os.str();
if (s.size() != nodecount * 3)
- throw SerializationError(std::string(__FUNCTION_NAME)
+ throw SerializationError(std::string(FUNCTION_NAME)
+ ": decompress resulted in size other than nodecount*3");
// deserialize nodes from buffer
}
if (version != 1) {
- std::string err_str = std::string(__FUNCTION_NAME)
+ std::string err_str = std::string(FUNCTION_NAME)
+ ": version " + itos(version) + " not supported";
infostream << err_str << std::endl;
throw SerializationError(err_str);
}
catch(con::PeerNotFoundException) // unlikely
{
- dstream << __FUNCTION_NAME << ": peer was not found" << std::endl;
+ dstream << FUNCTION_NAME << ": peer was not found" << std::endl;
lua_pushnil(L); // error
return 1;
}
}
catch(con::PeerNotFoundException) // unlikely
{
- dstream << __FUNCTION_NAME << ": peer was not found" << std::endl;
+ dstream << FUNCTION_NAME << ": peer was not found" << std::endl;
lua_pushnil(L); // error
return 1;
}
#define ERET(code) \
if (!(code)) { \
- dstream << __FUNCTION_NAME << ": peer was not found" << std::endl; \
+ dstream << FUNCTION_NAME << ": peer was not found" << std::endl; \
lua_pushnil(L); /* error */ \
return 1; \
}
}
catch(con::PeerNotFoundException) // unlikely
{
- dstream << __FUNCTION_NAME << ": peer was not found" << std::endl;
+ dstream << FUNCTION_NAME << ": peer was not found" << std::endl;
lua_pushboolean(L, false); // error
return 1;
}
void *ServerThread::run()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
BEGIN_DEBUG_EXCEPTION_HANDLER
m_server->AsyncRunStep(true);
void Server::start(Address bind_addr)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
m_bind_addr = bind_addr;
void Server::stop()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
infostream<<"Server: Stopping and waiting threads"<<std::endl;
void Server::step(float dtime)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Limit a bit
if(dtime > 2.0)
dtime = 2.0;
void Server::AsyncRunStep(bool initial_step)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
g_profiler->add("Server::AsyncRunStep (num)", 1);
Player *player = m_env->getPlayer(client->peer_id);
if(player == NULL) {
// This can happen if the client timeouts somehow
- /*warningstream<<__FUNCTION_NAME<<": Client "
+ /*warningstream<<FUNCTION_NAME<<": Client "
<<client->peer_id
<<" has no associated player"<<std::endl;*/
continue;
// Get object type
u8 type = ACTIVEOBJECT_TYPE_INVALID;
if(obj == NULL)
- warningstream<<__FUNCTION_NAME
+ warningstream<<FUNCTION_NAME
<<": NULL object"<<std::endl;
else
type = obj->getSendType();
void Server::Receive()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
SharedBuffer<u8> data;
u16 peer_id;
try {
void Server::ProcessData(NetworkPacket *pkt)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Environment is locked first.
MutexAutoLock envlock(m_env_mutex);
void Server::peerAdded(con::Peer *peer)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
verbosestream<<"Server::peerAdded(): peer->id="
<<peer->id<<std::endl;
void Server::deletingPeer(con::Peer *peer, bool timeout)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
verbosestream<<"Server::deletingPeer(): peer->id="
<<peer->id<<", timeout="<<timeout<<std::endl;
void Server::SendMovement(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
std::ostringstream os(std::ios_base::binary);
NetworkPacket pkt(TOCLIENT_MOVEMENT, 12 * sizeof(float), peer_id);
void Server::SendHP(u16 peer_id, u8 hp)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_HP, 1, peer_id);
pkt << hp;
void Server::SendBreath(u16 peer_id, u16 breath)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_BREATH, 2, peer_id);
pkt << (u16) breath;
void Server::SendAccessDenied_Legacy(u16 peer_id,const std::wstring &reason)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_ACCESS_DENIED_LEGACY, 0, peer_id);
pkt << reason;
void Server::SendDeathscreen(u16 peer_id,bool set_camera_point_target,
v3f camera_point_target)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_DEATHSCREEN, 1 + sizeof(v3f), peer_id);
pkt << set_camera_point_target << camera_point_target;
void Server::SendItemDef(u16 peer_id,
IItemDefManager *itemdef, u16 protocol_version)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_ITEMDEF, 0, peer_id);
void Server::SendNodeDef(u16 peer_id,
INodeDefManager *nodedef, u16 protocol_version)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_NODEDEF, 0, peer_id);
void Server::SendInventory(PlayerSAO* playerSAO)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
UpdateCrafting(playerSAO->getPlayer());
void Server::SendChatMessage(u16 peer_id, const std::wstring &message)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_CHAT_MESSAGE, 0, peer_id);
pkt << message;
void Server::SendShowFormspecMessage(u16 peer_id, const std::string &formspec,
const std::string &formname)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_SHOW_FORMSPEC, 0 , peer_id);
float expirationtime, float size, bool collisiondetection,
bool vertical, std::string texture)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_SPAWN_PARTICLE, 0, peer_id);
v3f minvel, v3f maxvel, v3f minacc, v3f maxacc, float minexptime, float maxexptime,
float minsize, float maxsize, bool collisiondetection, bool vertical, std::string texture, u32 id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_ADD_PARTICLESPAWNER, 0, peer_id);
void Server::SendDeleteParticleSpawner(u16 peer_id, u32 id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_DELETE_PARTICLESPAWNER_LEGACY, 2, peer_id);
void Server::SendTimeOfDay(u16 peer_id, u16 time, f32 time_speed)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_TIME_OF_DAY, 0, peer_id);
pkt << time << time_speed;
void Server::SendPlayerHP(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
PlayerSAO *playersao = getPlayerSAO(peer_id);
// In some rare case, if the player is disconnected
// while Lua call l_punch, for example, this can be NULL
void Server::SendPlayerBreath(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
PlayerSAO *playersao = getPlayerSAO(peer_id);
assert(playersao);
void Server::SendMovePlayer(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
Player *player = m_env->getPlayer(peer_id);
assert(player);
void Server::SendBlockNoLock(u16 peer_id, MapBlock *block, u8 ver, u16 net_proto_version)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
v3s16 p = block->getPos();
void Server::SendBlocks(float dtime)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
MutexAutoLock envlock(m_env_mutex);
//TODO check if one big lock could be faster then multiple small ones
void Server::fillMediaCache()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
infostream<<"Server: Calculating media file checksums"<<std::endl;
void Server::sendMediaAnnouncement(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
verbosestream << "Server: Announcing files to id(" << peer_id << ")"
<< std::endl;
void Server::sendRequestedMedia(u16 peer_id,
const std::vector<std::string> &tosend)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
verbosestream<<"Server::sendRequestedMedia(): "
<<"Sending files to client"<<std::endl;
void Server::sendDetachedInventory(const std::string &name, u16 peer_id)
{
if(m_detached_inventories.count(name) == 0) {
- errorstream<<__FUNCTION_NAME<<": \""<<name<<"\" not found"<<std::endl;
+ errorstream<<FUNCTION_NAME<<": \""<<name<<"\" not found"<<std::endl;
return;
}
Inventory *inv = m_detached_inventories[name];
void Server::sendDetachedInventories(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
for(std::map<std::string, Inventory*>::iterator
i = m_detached_inventories.begin();
void Server::DiePlayer(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
PlayerSAO *playersao = getPlayerSAO(peer_id);
assert(playersao);
void Server::RespawnPlayer(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
PlayerSAO *playersao = getPlayerSAO(peer_id);
assert(playersao);
void Server::DenySudoAccess(u16 peer_id)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
NetworkPacket pkt(TOCLIENT_DENY_SUDO_MODE, 0, peer_id);
Send(&pkt);
void Server::DenyAccess(u16 peer_id, AccessDeniedCode reason, const std::string &custom_reason)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
SendAccessDenied(peer_id, reason, custom_reason);
m_clients.event(peer_id, CSE_SetDenied);
// the minimum version for MT users, maybe in 1 year
void Server::DenyAccess_Legacy(u16 peer_id, const std::wstring &reason)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
SendAccessDenied_Legacy(peer_id, reason);
m_clients.event(peer_id, CSE_SetDenied);
void Server::acceptAuth(u16 peer_id, bool forSudoMode)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
if (!forSudoMode) {
RemoteClient* client = getClient(peer_id, CS_Invalid);
void Server::DeleteClient(u16 peer_id, ClientDeletionReason reason)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
std::wstring message;
{
/*
void Server::UpdateCrafting(Player* player)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
// Get a preview for crafting
ItemStack preview;
void dedicated_server_loop(Server &server, bool &kill)
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
verbosestream<<"dedicated_server_loop()"<<std::endl;
void run_tests()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
u32 t1 = porting::getTime(PRECISION_MILLI);
TestGameDef gamedef;
void *run()
{
- DSTACK(__FUNCTION_NAME);
+ DSTACK(FUNCTION_NAME);
BEGIN_DEBUG_EXCEPTION_HANDLER
while (!stopRequested()) {