aboutsummaryrefslogtreecommitdiff
path: root/src/server/collision/Models/GameObjectModel.cpp
diff options
context:
space:
mode:
authorShocker <shocker@freakz.ro>2013-02-10 20:21:18 +0200
committerShocker <shocker@freakz.ro>2013-02-10 20:21:18 +0200
commita0cb102538dae7fa2d173b4d1990a4aef8e5d55c (patch)
tree65d0903a31cae86467f7551653ef6f1c743cde9e /src/server/collision/Models/GameObjectModel.cpp
parent82f7b337b2dafd16506033cdbfecc979bc6f7119 (diff)
parent984e1feadfae97c7616c54f9ac731cc6db4f2e15 (diff)
Merge branch '4.3.4' of https://github.com/TrinityCore/TrinityCore into 4.3.4
Diffstat (limited to 'src/server/collision/Models/GameObjectModel.cpp')
-rw-r--r--src/server/collision/Models/GameObjectModel.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp
index 0ecf02648f9..e166a860cd2 100644
--- a/src/server/collision/Models/GameObjectModel.cpp
+++ b/src/server/collision/Models/GameObjectModel.cpp
@@ -34,8 +34,6 @@ using G3D::Vector3;
using G3D::Ray;
using G3D::AABox;
-#ifndef NO_CORE_FUNCS
-
struct GameobjectModelData
{
GameobjectModelData(const std::string& name_, const AABox& box) :
@@ -50,11 +48,14 @@ ModelList model_list;
void LoadGameObjectModelList()
{
+#ifndef NO_CORE_FUNCS
uint32 oldMSTime = getMSTime();
+#endif
+
FILE* model_list_file = fopen((sWorld->GetDataPath() + "vmaps/" + VMAP::GAMEOBJECT_MODELS).c_str(), "rb");
if (!model_list_file)
{
- sLog->outError(LOG_FILTER_GENERAL, "Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS);
+ VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "Unable to open '%s' file.", VMAP::GAMEOBJECT_MODELS);
return;
}
@@ -73,7 +74,7 @@ void LoadGameObjectModelList()
|| fread(&v1, sizeof(Vector3), 1, model_list_file) != 1
|| fread(&v2, sizeof(Vector3), 1, model_list_file) != 1)
{
- sLog->outError(LOG_FILTER_GENERAL, "File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS);
+ VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "File '%s' seems to be corrupted!", VMAP::GAMEOBJECT_MODELS);
break;
}
@@ -84,8 +85,7 @@ void LoadGameObjectModelList()
}
fclose(model_list_file);
- sLog->outInfo(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
-
+ VMAP_INFO_LOG(LOG_FILTER_SERVER_LOADING, ">> Loaded %u GameObject models in %u ms", uint32(model_list.size()), GetMSTimeDiffToNow(oldMSTime));
}
GameObjectModel::~GameObjectModel()
@@ -104,7 +104,7 @@ bool GameObjectModel::initialize(const GameObject& go, const GameObjectDisplayIn
// ignore models with no bounds
if (mdl_box == G3D::AABox::zero())
{
- sLog->outError(LOG_FILTER_GENERAL, "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
+ VMAP_ERROR_LOG(LOG_FILTER_GENERAL, "GameObject model %s has zero bounds, loading skipped", it->second.name.c_str());
return false;
}
@@ -184,5 +184,3 @@ bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool Sto
}
return hit;
}
-
-#endif