diff options
author | Shauren <shauren.trinity@gmail.com> | 2018-04-08 00:04:20 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2018-04-08 00:04:20 +0200 |
commit | dad56a224d318fb9fd255ef94c8d1e805c211986 (patch) | |
tree | d0adc24d847b64a3d316d5bd32839b5cdf8b0614 /src/common/Collision/Models/GameObjectModel.cpp | |
parent | d510bb576489b96f9bb7f252acab7c8b8b659f96 (diff) |
Core/GameObjects: Skip gameobjects with M2 models when searching for area info (perf optimization, they dont have any area info)
Diffstat (limited to 'src/common/Collision/Models/GameObjectModel.cpp')
-rw-r--r-- | src/common/Collision/Models/GameObjectModel.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp index 22de17e1ad0..07c1ffe548c 100644 --- a/src/common/Collision/Models/GameObjectModel.cpp +++ b/src/common/Collision/Models/GameObjectModel.cpp @@ -145,6 +145,7 @@ bool GameObjectModel::initialize(std::unique_ptr<GameObjectModelOwnerBase> model #endif owner = std::move(modelOwner); + isWmo = it->second.isWmo; return true; } @@ -187,7 +188,7 @@ bool GameObjectModel::intersectRay(G3D::Ray const& ray, float& maxDist, bool sto void GameObjectModel::intersectPoint(G3D::Vector3 const& point, VMAP::AreaInfo& info, PhaseShift const& phaseShift) const { - if (!isCollisionEnabled() || !owner->IsSpawned()) + if (!isCollisionEnabled() || !owner->IsSpawned() || !isMapObject()) return; if (!owner->IsInPhase(phaseShift)) |