Adapted to DEBUG macro removal in GameKit.
This commit is contained in:
parent
15218e2214
commit
423237f484
@ -54,8 +54,7 @@ float Config::aoStrength = 1.0f;
|
|||||||
// Input
|
// Input
|
||||||
u8 Config::mouseSensitivity = 8;
|
u8 Config::mouseSensitivity = 8;
|
||||||
|
|
||||||
#include <iostream>
|
#include <gk/core/Debug.hpp>
|
||||||
|
|
||||||
#include <gk/core/Filesystem.hpp>
|
#include <gk/core/Filesystem.hpp>
|
||||||
|
|
||||||
#include <sol.hpp>
|
#include <sol.hpp>
|
||||||
@ -91,10 +90,10 @@ void Config::loadConfigFromFile(const char *file) {
|
|||||||
|
|
||||||
mouseSensitivity = lua["mouseSensitivity"].get_or(mouseSensitivity);
|
mouseSensitivity = lua["mouseSensitivity"].get_or(mouseSensitivity);
|
||||||
|
|
||||||
std::cout << "Config file loaded successfully" << std::endl;
|
gkInfo() << "Config file loaded successfully";
|
||||||
}
|
}
|
||||||
catch (sol::error &e) {
|
catch (sol::error &e) {
|
||||||
std::cerr << e.what() << std::endl;
|
gkError() << e.what();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,7 +39,7 @@ void TextureAtlas::addFile(const std::string &path, const std::string &filename)
|
|||||||
|
|
||||||
SurfacePtr surface{IMG_Load((path + filename).c_str()), &SDL_FreeSurface};
|
SurfacePtr surface{IMG_Load((path + filename).c_str()), &SDL_FreeSurface};
|
||||||
if(!surface) {
|
if(!surface) {
|
||||||
DEBUG("WARNING: Failed to load texture:", path + filename);
|
gkWarning() << "Failed to load texture:" << path + filename;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,14 +112,14 @@ void Client::update() {
|
|||||||
Network::Command command;
|
Network::Command command;
|
||||||
packet >> command;
|
packet >> command;
|
||||||
|
|
||||||
// std::cout << "UDP Message of type '" << Network::commandToString(command) << "' received from: " << senderAddress << ":" << senderPort << std::endl;
|
// gkDebug() << "UDP Message of type" << Network::commandToString(command) << "received from:" << senderAddress << ":" << senderPort;
|
||||||
}
|
}
|
||||||
|
|
||||||
while (m_tcpSocket->receive(packet) == sf::Socket::Done) {
|
while (m_tcpSocket->receive(packet) == sf::Socket::Done) {
|
||||||
Network::Command command;
|
Network::Command command;
|
||||||
packet >> command;
|
packet >> command;
|
||||||
|
|
||||||
// DEBUG("TCP message received:", Network::commandToString(command));
|
// gkDebug() << "TCP message received:" << Network::commandToString(command);
|
||||||
|
|
||||||
auto it = m_commands.find(command);
|
auto it = m_commands.find(command);
|
||||||
if (it != m_commands.end())
|
if (it != m_commands.end())
|
||||||
|
@ -98,7 +98,7 @@ void LuaGUIState::onEvent(const SDL_Event &event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!dest) {
|
if (!dest) {
|
||||||
DEBUG("WARNING: Destination not found: '" + shiftDestination + "'");
|
gkWarning() << "Destination not found:" << shiftDestination;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -242,7 +242,7 @@ void LuaGUIState::loadInventoryWidget(const std::string &name, s32 x, s32 y, sf:
|
|||||||
|
|
||||||
BlockData *data = m_world.getBlockData(block.x, block.y, block.z);
|
BlockData *data = m_world.getBlockData(block.x, block.y, block.z);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
DEBUG("ERROR: No inventory found at", block.x, block.y, block.z);
|
gkError() << "No inventory found at" << block.x << block.y << block.z;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -259,7 +259,7 @@ void LuaGUIState::loadInventoryWidget(const std::string &name, s32 x, s32 y, sf:
|
|||||||
else {
|
else {
|
||||||
auto it = m_inventories.find(inventoryName);
|
auto it = m_inventories.find(inventoryName);
|
||||||
if (it == m_inventories.end())
|
if (it == m_inventories.end())
|
||||||
DEBUG("ERROR: Unable to find inventory '" + inventoryName + "' for widget '" + name + "'");
|
gkError() << "Unable to find inventory" << inventoryName << "for widget" << name;
|
||||||
|
|
||||||
widgetInventory = &it->second;
|
widgetInventory = &it->second;
|
||||||
}
|
}
|
||||||
@ -275,7 +275,7 @@ void LuaGUIState::loadInventoryWidget(const std::string &name, s32 x, s32 y, sf:
|
|||||||
inventoryWidget.setFilter(filter);
|
inventoryWidget.setFilter(filter);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEBUG("ERROR: Inventory widget '" + name + "' is invalid");
|
gkError() << "Inventory widget" << name << " is invalid";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,7 +292,7 @@ void LuaGUIState::loadCraftingWidget(const std::string &name, s32 x, s32 y, sf::
|
|||||||
|
|
||||||
BlockData *data = m_world.getBlockData(block.x, block.y, block.z);
|
BlockData *data = m_world.getBlockData(block.x, block.y, block.z);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
DEBUG("ERROR: No inventory found at", block.x, block.y, block.z);
|
gkError() << "No inventory found at" << block.x << block.y << block.z;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
craftingInventory = &data->inventory;
|
craftingInventory = &data->inventory;
|
||||||
@ -315,7 +315,7 @@ void LuaGUIState::loadCraftingWidget(const std::string &name, s32 x, s32 y, sf::
|
|||||||
craftingWidget.craftingResultInventoryWidget().setPosition(resultX, resultY);
|
craftingWidget.craftingResultInventoryWidget().setPosition(resultX, resultY);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEBUG("ERROR: Crafting inventory is invalid");
|
gkError() << "Crafting inventory is invalid";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -331,7 +331,7 @@ void LuaGUIState::loadProgressBarWidget(const std::string &, s32 x, s32 y, sf::P
|
|||||||
|
|
||||||
BlockData *data = m_world.getBlockData(block.x, block.y, block.z);
|
BlockData *data = m_world.getBlockData(block.x, block.y, block.z);
|
||||||
if (!data) {
|
if (!data) {
|
||||||
DEBUG("ERROR: No inventory found at", block.x, block.y, block.z);
|
gkError() << "No inventory found at" << block.x << block.y << block.z;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ void ClientWorld::createChunkNeighbours(ClientChunk *chunk) {
|
|||||||
|
|
||||||
void ClientWorld::draw(gk::RenderTarget &target, gk::RenderStates states) const {
|
void ClientWorld::draw(gk::RenderTarget &target, gk::RenderStates states) const {
|
||||||
if (!target.getView() || !m_camera) {
|
if (!target.getView() || !m_camera) {
|
||||||
DEBUG("ERROR: Trying to draw world without a camera");
|
gkError() << "Trying to draw world without a camera";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -76,7 +76,7 @@ void ServerApplication::init() {
|
|||||||
|
|
||||||
m_scriptEngine.luaCore().setRegistry(&m_registry);
|
m_scriptEngine.luaCore().setRegistry(&m_registry);
|
||||||
|
|
||||||
std::cout << "Server is running on localhost:" << m_server.port() << std::endl;
|
gkInfo() << ("Server is running on localhost:" + std::to_string(m_server.port())).c_str();
|
||||||
|
|
||||||
if (m_eventHandler)
|
if (m_eventHandler)
|
||||||
m_eventHandler->emplaceEvent<ServerOnlineEvent>(true, m_server.port());
|
m_eventHandler->emplaceEvent<ServerOnlineEvent>(true, m_server.port());
|
||||||
|
@ -67,7 +67,7 @@ void CraftingWidgetDef::loadInventory(const sol::table &table) {
|
|||||||
m_blockPosition.z = blockTable.value()["z"];
|
m_blockPosition.z = blockTable.value()["z"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For '" + m_name + "': Block position must be defined")
|
gkError() << "For" << m_name << ": Block position must be defined";
|
||||||
|
|
||||||
m_offset = inventoryTable["offset"].get_or<u16>(0);
|
m_offset = inventoryTable["offset"].get_or<u16>(0);
|
||||||
m_size = inventoryTable["size"].get_or<u16>(3);
|
m_size = inventoryTable["size"].get_or<u16>(3);
|
||||||
@ -76,10 +76,10 @@ void CraftingWidgetDef::loadInventory(const sol::table &table) {
|
|||||||
m_size = inventoryTable["size"].get_or<u16>(3);
|
m_size = inventoryTable["size"].get_or<u16>(3);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEBUG("ERROR: For '" + m_name + "': Inventory source '" + m_inventory + "' is not valid");
|
gkError() << "For" << m_name << ": Inventory source" << m_inventory + "is not valid";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For '" + m_name + "': 'inventory' field must be a table");
|
gkError() << "For" << m_name << ": 'inventory' field must be a table";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,7 +57,7 @@ void InventoryWidgetDef::loadFromLuaTable(const sol::table &table) {
|
|||||||
m_height = size.value()["y"];
|
m_height = size.value()["y"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For '" + m_name + "': Inventory size must be defined");
|
gkError() << "For" << m_name << ": Inventory size must be defined";
|
||||||
}
|
}
|
||||||
|
|
||||||
void InventoryWidgetDef::loadInventory(const sol::table &table) {
|
void InventoryWidgetDef::loadInventory(const sol::table &table) {
|
||||||
@ -84,13 +84,12 @@ void InventoryWidgetDef::loadInventory(const sol::table &table) {
|
|||||||
m_blockPosition.z = blockTable.value()["z"];
|
m_blockPosition.z = blockTable.value()["z"];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For '" + m_name + "': Block position must be defined");
|
gkError() << "For" << m_name << ": Block position must be defined";
|
||||||
}
|
|
||||||
else {
|
|
||||||
DEBUG("ERROR: For '" + m_name + "': Inventory source '" + m_inventory + "' is not valid");
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
gkError() << "For" << m_name << ": Inventory source" << m_inventory << "is not valid";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For '" + m_name + "': 'inventory' field must be a table");
|
gkError() << "For" << m_name << ": 'inventory' field must be a table";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ void ProgressBarWidgetDef::loadFromLuaTable(const sol::table &table) {
|
|||||||
m_blockPosition.z = blockTable.value()["z"];
|
m_blockPosition.z = blockTable.value()["z"];
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
DEBUG("ERROR: Attribute 'block' not defined for bar '" + m_name + "'");
|
gkError() << "Attribute 'block' not defined for bar" << m_name;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -82,10 +82,10 @@ inline void ProgressBarWidgetDef::loadType(const sol::table &table) {
|
|||||||
if (it != types.end())
|
if (it != types.end())
|
||||||
m_type = u8(it->second);
|
m_type = u8(it->second);
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: In '" + m_name + "' definition: Type invalid");
|
gkError() << "In" << m_name << "definition: Type invalid";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: In '" + m_name + "' definition: Type must be a string");
|
gkError() << "In" << m_name << "definition: Type must be a string";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,20 +55,20 @@ void ServerModLoader::loadMods() {
|
|||||||
|
|
||||||
fs::current_path(basePath);
|
fs::current_path(basePath);
|
||||||
|
|
||||||
std::cout << "Mod '" + entry.path().filename().string() + "' loaded" << std::endl;
|
gkInfo() << "Mod" << entry.path().filename().string() << "loaded";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("WARNING: The mod '" + entry.path().filename().string() + "' doesn't contain an 'init.lua' file.");
|
gkWarning() << "The mod" << entry.path().filename().string() << "doesn't contain an 'init.lua' file.";
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto &it : m_mods) {
|
for (auto &it : m_mods) {
|
||||||
// DEBUG("Applying mod '" + it.second.id() + "'...");
|
// gkDebug() << "Applying mod" << it.second.id() << "...";
|
||||||
it.second.commit();
|
it.second.commit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LuaMod &ServerModLoader::registerMod(const std::string &name) {
|
LuaMod &ServerModLoader::registerMod(const std::string &name) {
|
||||||
// DEBUG("Registering mod '" + mod.id() + "'...");
|
// gkDebug("Registering mod" << mod.id() << "...";
|
||||||
|
|
||||||
if (!gk::regexMatch(name, "^[A-Za-z0-9_]+$") || name == "group")
|
if (!gk::regexMatch(name, "^[A-Za-z0-9_]+$") || name == "group")
|
||||||
throw std::runtime_error("Mod name '" + name + "' is invalid.");
|
throw std::runtime_error("Mod name '" + name + "' is invalid.");
|
||||||
|
@ -43,7 +43,7 @@ void LuaBiomeLoader::loadTree(const sol::table &table) const {
|
|||||||
tree.setTrunkHeight(trunkHeight["min"], trunkHeight["max"]);
|
tree.setTrunkHeight(trunkHeight["min"], trunkHeight["max"]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For tree '" + stringID + "': trunk_height must be a table");
|
gkError() << "For tree" << stringID << ": 'trunk_height' must be a table";
|
||||||
}
|
}
|
||||||
|
|
||||||
sol::object hasLeavesObject = table["has_leaves"];
|
sol::object hasLeavesObject = table["has_leaves"];
|
||||||
@ -52,7 +52,7 @@ void LuaBiomeLoader::loadTree(const sol::table &table) const {
|
|||||||
tree.setHasLeaves(hasLeavesObject.as<bool>());
|
tree.setHasLeaves(hasLeavesObject.as<bool>());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For tree '" + stringID + "': has_leaves must be a boolean");
|
gkError() << "For tree" << stringID << ": 'has_leaves' must be a boolean";
|
||||||
}
|
}
|
||||||
|
|
||||||
sol::object leavesBlockObject = table["leaves_block"];
|
sol::object leavesBlockObject = table["leaves_block"];
|
||||||
@ -62,10 +62,10 @@ void LuaBiomeLoader::loadTree(const sol::table &table) const {
|
|||||||
tree.setLeavesBlockID(Registry::getInstance().getBlockFromStringID(leavesBlock).id());
|
tree.setLeavesBlockID(Registry::getInstance().getBlockFromStringID(leavesBlock).id());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For tree '" + stringID + "': leaves_block must be a string");
|
gkError() << "For tree" << stringID << ": 'leaves_block must be a string";
|
||||||
}
|
}
|
||||||
else if (tree.hasLeaves())
|
else if (tree.hasLeaves())
|
||||||
DEBUG("ERROR: For tree '" + stringID + "': leaves_block must be defined if has_leaves == true");
|
gkError() << "For tree" << stringID << ": 'leaves_block' must be defined if has_leaves == true";
|
||||||
}
|
}
|
||||||
|
|
||||||
void LuaBiomeLoader::loadBiome(const sol::table &table) const {
|
void LuaBiomeLoader::loadBiome(const sol::table &table) const {
|
||||||
@ -103,7 +103,7 @@ inline void LuaBiomeLoader::loadBiomeBlocks(Biome &biome, const sol::table &tabl
|
|||||||
biome.setPortalFrameBlockID(Registry::getInstance().getBlockFromStringID(table["portal_frame"]).id());
|
biome.setPortalFrameBlockID(Registry::getInstance().getBlockFromStringID(table["portal_frame"]).id());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For '" + biome.stringID() + "': 'blocks' field must be a table");
|
gkError() << "For" << biome.stringID() << ": 'blocks' field must be a table";
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void LuaBiomeLoader::loadTreePlacementEntries(Biome &biome, const sol::table &table) const {
|
inline void LuaBiomeLoader::loadTreePlacementEntries(Biome &biome, const sol::table &table) const {
|
||||||
|
@ -104,10 +104,10 @@ inline void LuaBlockLoader::loadDrawType(ServerBlock &block, const sol::table &t
|
|||||||
if (it != drawTypes.end())
|
if (it != drawTypes.end())
|
||||||
block.setDrawType(it->second);
|
block.setDrawType(it->second);
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: In '" + block.stringID() + "' definition: Block draw type invalid");
|
gkError() << "In" << block.stringID() << " definition: Block draw type invalid";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: In '" + block.stringID() + "' definition: Block draw type must be a string");
|
gkError() << "In" << block.stringID() << " definition: Block draw type must be a string";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ inline void LuaBlockLoader::loadGroups(ServerBlock &block, Item &item, const sol
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For block '" + block.stringID() + "': 'groups' should be a table");
|
gkError() << "For block" << block.stringID() << ": 'groups' should be a table";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,10 +44,10 @@ void LuaDimensionLoader::loadDimension(const sol::table &table) const {
|
|||||||
if (it.second.get_type() == sol::type::string)
|
if (it.second.get_type() == sol::type::string)
|
||||||
dimension.addBiome(it.second.as<std::string>());
|
dimension.addBiome(it.second.as<std::string>());
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For dimension '" + id + "': Invalid biome string");
|
gkError() << "For dimension" << id << ": Invalid biome string";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For dimension '" + id + "': Invalid biome table");
|
gkError() << "For dimension" << id << ": Invalid biome table";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ void LuaItemLoader::loadItem(const sol::table &table) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
DEBUG("ERROR: For item '" + stringID + "': 'groups' should be a table");
|
gkError() << "For item" << stringID << ": 'groups' should be a table";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ void Server::handleKeyState() {
|
|||||||
u16 clientId;
|
u16 clientId;
|
||||||
packet >> command >> timestamp >> clientId;
|
packet >> command >> timestamp >> clientId;
|
||||||
|
|
||||||
// std::cout << "UDP Message of type '" << Network::commandToString(command) << "' received from: " << senderAddress << ":" << senderPort << std::endl;
|
// gkDebug() << "UDP Message of type" << Network::commandToString(command) << "received from:" << senderAddress << ":" << senderPort;
|
||||||
|
|
||||||
if (command == Network::Command::KeyState) {
|
if (command == Network::Command::KeyState) {
|
||||||
ClientInfo *client = m_info.getClient(clientId);
|
ClientInfo *client = m_info.getClient(clientId);
|
||||||
@ -65,7 +65,7 @@ void Server::handleKeyState() {
|
|||||||
packet >> key >> isPressed;
|
packet >> key >> isPressed;
|
||||||
|
|
||||||
if (client->inputHandler.keysPressed().at(key) != isPressed)
|
if (client->inputHandler.keysPressed().at(key) != isPressed)
|
||||||
DEBUG((int)key, "changed state to", isPressed ? "true" : "false");
|
gkDebug() << (int)key << "changed state to" << (isPressed ? "true" : "false");
|
||||||
|
|
||||||
client->inputHandler.setKeyPressed(key, isPressed);
|
client->inputHandler.setKeyPressed(key, isPressed);
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ void Server::handleClientMessages() {
|
|||||||
Network::Command command;
|
Network::Command command;
|
||||||
packet >> command;
|
packet >> command;
|
||||||
|
|
||||||
// DEBUG("TCP message received:", Network::commandToString(command));
|
// gkDebug() << "TCP message received:" << Network::commandToString(command);
|
||||||
|
|
||||||
if (m_isRunning) {
|
if (m_isRunning) {
|
||||||
for (auto &it : m_commands) {
|
for (auto &it : m_commands) {
|
||||||
|
@ -193,7 +193,7 @@ void ServerCommandHandler::setupCallbacks() {
|
|||||||
func(client, screenWidth, screenHeight, guiScale);
|
func(client, screenWidth, screenHeight, guiScale);
|
||||||
}
|
}
|
||||||
catch (const sol::error &error) {
|
catch (const sol::error &error) {
|
||||||
DEBUG("Failed to send inventory GUI\n", error.what());
|
gkError() << "Failed to send inventory GUI: " << error.what();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ void ServerCommandHandler::setupCallbacks() {
|
|||||||
func(client, screenWidth, screenHeight, guiScale);
|
func(client, screenWidth, screenHeight, guiScale);
|
||||||
}
|
}
|
||||||
catch (const sol::error &error) {
|
catch (const sol::error &error) {
|
||||||
DEBUG("Failed to send creative window GUI\n", error.what());
|
gkError() << "Failed to send creative window GUI: " << error.what();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -236,7 +236,7 @@ void ServerCommandHandler::setupCallbacks() {
|
|||||||
if (data)
|
if (data)
|
||||||
packet >> data->inventory;
|
packet >> data->inventory;
|
||||||
else
|
else
|
||||||
DEBUG("BlockInvUpdate: No block data found at", pos.x, pos.y, pos.z);
|
gkError() << "BlockInvUpdate: No block data found at" << pos.x << pos.y << pos.z;
|
||||||
});
|
});
|
||||||
|
|
||||||
m_server.setCommandCallback(Network::Command::BlockDataUpdate, [this](ClientInfo &client, sf::Packet &packet) {
|
m_server.setCommandCallback(Network::Command::BlockDataUpdate, [this](ClientInfo &client, sf::Packet &packet) {
|
||||||
|
@ -47,7 +47,7 @@ void ServerWorld::update() {
|
|||||||
for (auto &client : m_server->server().info().clients())
|
for (auto &client : m_server->server().info().clients())
|
||||||
sendChunkData(client, *it.second.get());
|
sendChunkData(client, *it.second.get());
|
||||||
|
|
||||||
// DEBUG("Chunk updated at", it.second->x(), it.second->y(), it.second->z());
|
// gkDebug() << "Chunk updated at" << it.second->x() << it.second->y() << it.second->z();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user