diff options
author | Shauren <shauren.trinity@gmail.com> | 2015-06-03 19:53:28 +0200 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2015-06-03 19:53:28 +0200 |
commit | 6e9ab38fcc9d2859393e452ef8630ee420783e47 (patch) | |
tree | f156d957548639292b3d19892f619d9ffd916db7 /src/server/collision/Models/GameObjectModel.cpp | |
parent | df80f1900d8ffc5f366ede8e19bfbeaeb82c954c (diff) |
Core/GameObject: Removed unneeded argument from GameObjectModel::Relocate and renamed it to UpdatePosition
Diffstat (limited to 'src/server/collision/Models/GameObjectModel.cpp')
-rw-r--r-- | src/server/collision/Models/GameObjectModel.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/collision/Models/GameObjectModel.cpp b/src/server/collision/Models/GameObjectModel.cpp index 6140c266b18..607460a2784 100644 --- a/src/server/collision/Models/GameObjectModel.cpp +++ b/src/server/collision/Models/GameObjectModel.cpp @@ -188,12 +188,12 @@ bool GameObjectModel::intersectRay(const G3D::Ray& ray, float& MaxDist, bool Sto return hit; } -bool GameObjectModel::Relocate(const GameObject& go) +bool GameObjectModel::UpdatePosition() { if (!iModel) return false; - ModelList::const_iterator it = model_list.find(go.GetDisplayId()); + ModelList::const_iterator it = model_list.find(owner->GetDisplayId()); if (it == model_list.end()) return false; @@ -205,9 +205,9 @@ bool GameObjectModel::Relocate(const GameObject& go) return false; } - iPos = Vector3(go.GetPositionX(), go.GetPositionY(), go.GetPositionZ()); + iPos = Vector3(owner->GetPositionX(), owner->GetPositionY(), owner->GetPositionZ()); - G3D::Matrix3 iRotation = G3D::Matrix3::fromEulerAnglesZYX(go.GetOrientation(), 0, 0); + G3D::Matrix3 iRotation = G3D::Matrix3::fromEulerAnglesZYX(owner->GetOrientation(), 0, 0); iInvRot = iRotation.inverse(); // transform bounding box: mdl_box = AABox(mdl_box.low() * iScale, mdl_box.high() * iScale); @@ -221,7 +221,7 @@ bool GameObjectModel::Relocate(const GameObject& go) for (int i = 0; i < 8; ++i) { Vector3 pos(iBound.corner(i)); - go.SummonCreature(1, pos.x, pos.y, pos.z, 0, TEMPSUMMON_MANUAL_DESPAWN); + owner->SummonCreature(1, pos.x, pos.y, pos.z, 0, TEMPSUMMON_MANUAL_DESPAWN); } #endif |