aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Entities/GameObject
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-05-16 22:16:21 +0200
committerShauren <shauren.trinity@gmail.com>2017-05-16 22:16:21 +0200
commita12a34b1dce93b17dcb2978937ac00288949ae13 (patch)
tree81dc0776fe697795169497ec213f3790459b6095 /src/server/game/Entities/GameObject
parentb421a5c0cbaf8acd8f1152c96ad7872cb8d7c9e3 (diff)
Core/Game: Include cleanup - removed G3D classes from packets
* Use our own Position class instead, with the coords written to packets being part of type
Diffstat (limited to 'src/server/game/Entities/GameObject')
-rw-r--r--src/server/game/Entities/GameObject/GameObject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp
index cf9209699a9..dc749949fe9 100644
--- a/src/server/game/Entities/GameObject/GameObject.cpp
+++ b/src/server/game/Entities/GameObject/GameObject.cpp
@@ -393,7 +393,10 @@ void GameObject::Update(uint32 diff)
{
m_goValue.Transport.CurrentSeg = node->TimeSeg;
- G3D::Quat rotation = m_goValue.Transport.AnimationInfo->GetAnimRotation(timer);
+ G3D::Quat rotation;
+ if (TransportRotationEntry const* rot = m_goValue.Transport.AnimationInfo->GetAnimRotation(timer))
+ rotation = G3D::Quat(rot->X, rot->Y, rot->Z, rot->W);
+
G3D::Vector3 pos = rotation.toRotationMatrix()
* G3D::Matrix3::fromEulerAnglesZYX(GetOrientation(), 0.0f, 0.0f)
* G3D::Vector3(node->X, node->Y, node->Z);