aboutsummaryrefslogtreecommitdiff
path: root/src/game/MotionMaster.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-04-11 22:41:15 -0500
committermegamage <none@none>2009-04-11 22:41:15 -0500
commitdda2fdff33a6d12d6e8f2913fbb439d9b670890f (patch)
treeb8f581a7489ce71492ecc15a782ff08e9a5e75f6 /src/game/MotionMaster.cpp
parent1d640d02726683e73c455ddda3354cf77925a957 (diff)
*Implement spell Disengage and Death Grip.
--HG-- branch : trunk
Diffstat (limited to 'src/game/MotionMaster.cpp')
-rw-r--r--src/game/MotionMaster.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/game/MotionMaster.cpp b/src/game/MotionMaster.cpp
index 6d7a40da045..b299fbfd40a 100644
--- a/src/game/MotionMaster.cpp
+++ b/src/game/MotionMaster.cpp
@@ -305,7 +305,7 @@ MotionMaster::MovePoint(uint32 id, float x, float y, float z)
}
}
-void MotionMaster::MoveJumpFrom(float srcX, float srcY, float speedXY, float speedZ)
+void MotionMaster::MoveKnockbackFrom(float srcX, float srcY, float speedXY, float speedZ)
{
//this function may make players fall below map
if(i_owner->GetTypeId()==TYPEID_PLAYER)
@@ -317,6 +317,18 @@ void MotionMaster::MoveJumpFrom(float srcX, float srcY, float speedXY, float spe
MoveJump(x, y, z, speedXY, speedZ);
}
+void MotionMaster::MoveJumpTo(float angle, float speedXY, float speedZ)
+{
+ //this function may make players fall below map
+ if(i_owner->GetTypeId()==TYPEID_PLAYER)
+ return;
+
+ float x, y, z;
+ float dist = speedXY * speedZ * 0.1f;
+ i_owner->GetClosePoint(x, y, z, i_owner->GetObjectSize(), dist, angle);
+ MoveJump(x, y, z, speedXY, speedZ);
+}
+
void MotionMaster::MoveJump(float x, float y, float z, float speedXY, float speedZ)
{
uint32 moveFlag = MOVEFLAG_JUMP | MOVEFLAG_WALK;