diff options
author | jackpoz <giacomopoz@gmail.com> | 2015-01-31 22:57:08 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2015-01-31 22:57:08 +0100 |
commit | a7ca78b2fe12c68e561782416bf5726410a3c01b (patch) | |
tree | 68bf35fe5db0f843f568d4f84399a912170b6fb5 /src/server/collision/Models/GameObjectModel.cpp | |
parent | dcd4f749c6f4925145122eebc7399ef3aee1f8e6 (diff) |
Core/VMaps: Fix debug assert caused by invalid vmaps
Fix debug assert thrown by G3D caused by models with empty bounding box being exported by vmap4assembler and imported by worldserver. This change will skip those models, proper investigation on the issue of why the bounding box is empty is still required.
Diffstat (limited to 'src/server/collision/Models/GameObjectModel.cpp')
-rw-r--r-- | src/server/collision/Models/GameObjectModel.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index da8fe054748..6140c266b18 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -78,6 +78,12 @@ void LoadGameObjectModelList() 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()); + continue; + } + model_list.insert ( ModelList::value_type( displayId, GameobjectModelData(std::string(buff, name_length), AABox(v1, v2)) ) |