diff options
Diffstat (limited to 'src/common/Collision/Models')
-rw-r--r-- | src/common/Collision/Models/GameObjectModel.cpp | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp index 599a8025f60..23735f2d8e5 100644 --- a/src/common/Collision/Models/GameObjectModel.cpp +++ b/src/common/Collision/Models/GameObjectModel.cpp @@ -43,14 +43,12 @@ ModelList model_list; void LoadGameObjectModelList(std::string const& dataPath) { -#ifndef NO_CORE_FUNCS uint32 oldMSTime = getMSTime(); -#endif FILE* model_list_file = fopen((dataPath + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb"); if (!model_list_file) { - VMAP_ERROR_LOG("misc", "Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS); + TC_LOG_ERROR("misc", "Unable to open '{}' file.", VMAP::GAMEOBJECT_MODELS); return; } @@ -58,7 +56,7 @@ void LoadGameObjectModelList(std::string const& dataPath) if (fread(magic, 1, 8, model_list_file) != 8 || memcmp(magic, VMAP::VMAP_MAGIC, 8) != 0) { - TC_LOG_ERROR("misc", "File '%s' has wrong header, expected %s.", VMAP::GAMEOBJECT_MODELS, VMAP::VMAP_MAGIC); + TC_LOG_ERROR("misc", "File '{}' has wrong header, expected {}.", VMAP::GAMEOBJECT_MODELS, VMAP::VMAP_MAGIC); fclose(model_list_file); return; } @@ -80,13 +78,13 @@ void LoadGameObjectModelList(std::string const& dataPath) || fread(&v1, sizeof(Vector3), 1, model_list_file) != 1 || fread(&v2, sizeof(Vector3), 1, model_list_file) != 1) { - VMAP_ERROR_LOG("misc", "File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS); + TC_LOG_ERROR("misc", "File '{}' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS); break; } if (v1.isNaN() || v2.isNaN()) { - VMAP_ERROR_LOG("misc", "File '%s' Model '%s' has invalid v1%s v2%s values!", VMAP::GAMEOBJECT_MODELS, std::string(buff, name_length).c_str(), v1.toString().c_str(), v2.toString().c_str()); + TC_LOG_ERROR("misc", "File '{}' Model '{}' has invalid v1{} v2{} values!", VMAP::GAMEOBJECT_MODELS, std::string(buff, name_length), v1.toString(), v2.toString()); continue; } @@ -94,7 +92,7 @@ void LoadGameObjectModelList(std::string const& dataPath) } fclose(model_list_file); - VMAP_INFO_LOG("server.loading", ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime)); + TC_LOG_INFO("server.loading", ">> Loaded {} GameObject models in {} ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime)); } GameObjectModel::~GameObjectModel() @@ -113,7 +111,7 @@ bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> model // ignore models with no bounds if (mdl_box == G3D::AABox::zero()) { - VMAP_ERROR_LOG("misc", "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str()); + TC_LOG_ERROR("misc", "GameObject model {} has zero bounds, loading skipped", it->second.name); return false; } @@ -261,7 +259,7 @@ bool GameObjectModel::UpdatePosition() // ignore models with no bounds if (mdl_box == G3D::AABox::zero()) { - VMAP_ERROR_LOG("misc", "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str()); + TC_LOG_ERROR("misc", "GameObject model {} has zero bounds, loading skipped", it->second.name); return false; } |