summaryrefslogtreecommitdiff
path: root/src/common/Collision/Models/GameObjectModel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Collision/Models/GameObjectModel.cpp')
-rw-r--r--src/common/Collision/Models/GameObjectModel.cpp35
1 files changed, 8 insertions, 27 deletions
diff --git a/src/common/Collision/Models/GameObjectModel.cpp b/src/common/Collision/Models/GameObjectModel.cpp
index 683dd0c1a9..eebc7e62d2 100644
--- a/src/common/Collision/Models/GameObjectModel.cpp
+++ b/src/common/Collision/Models/GameObjectModel.cpp
@@ -1,14 +1,14 @@
/*
* This file is part of the AzerothCore Project. See AUTHORS file for Copyright information
*
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by the
- * Free Software Foundation; either version 3 of the License, or (at your
- * option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
@@ -203,27 +203,6 @@ bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool Sto
return hit;
}
-void GameObjectModel::IntersectPoint(G3D::Vector3 const& point, VMAP::AreaInfo& info, uint32 ph_mask) const
-{
- if (!(phasemask & ph_mask) || !owner->IsSpawned() || !IsMapObject())
- return;
-
- if (!iBound.contains(point))
- return;
-
- // child bounds are defined in object space:
- Vector3 pModel = iInvRot * (point - iPos) * iInvScale;
- Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f);
- float zDist;
- if (iModel->IntersectPoint(pModel, zDirModel, zDist, info))
- {
- Vector3 modelGround = pModel + zDist * zDirModel;
- float world_Z = ((modelGround * iInvRot) * iScale + iPos).z;
- if (info.ground_Z < world_Z)
- info.ground_Z = world_Z;
- }
-}
-
bool GameObjectModel::GetLocationInfo(G3D::Vector3 const& point, VMAP::LocationInfo& info, uint32 ph_mask) const
{
if (!(phasemask & ph_mask) || !owner->IsSpawned() || !IsMapObject())
@@ -236,7 +215,9 @@ bool GameObjectModel::GetLocationInfo(G3D::Vector3 const& point, VMAP::LocationI
Vector3 pModel = iInvRot * (point - iPos) * iInvScale;
Vector3 zDirModel = iInvRot * Vector3(0.f, 0.f, -1.f);
float zDist;
- if (iModel->GetLocationInfo(pModel, zDirModel, zDist, info))
+
+ VMAP::GroupLocationInfo groupInfo;
+ if (iModel->GetLocationInfo(pModel, zDirModel, zDist, groupInfo))
{
Vector3 modelGround = pModel + zDist * zDirModel;
float world_Z = ((modelGround * iInvRot) * iScale + iPos).z;