summaryrefslogtreecommitdiffstats
path: root/src/Entities/Player.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/Entities/Player.cpp65
1 files changed, 65 insertions, 0 deletions
diff --git a/src/Entities/Player.cpp b/src/Entities/Player.cpp
index feb09b5d2..33b339f8e 100644
--- a/src/Entities/Player.cpp
+++ b/src/Entities/Player.cpp
@@ -1264,6 +1264,71 @@ void cPlayer::ForceSetSpeed(const Vector3d & a_Speed)
+void cPlayer::SetSpeed(const Vector3d & a_Speed)
+{
+ m_Speed.Set(a_Speed.x, a_Speed.y, a_Speed.z);
+ WrapSpeed();
+
+ // Send the speed to the client so he actualy moves
+ m_ClientHandle->SendEntityVelocity(*this);
+}
+
+
+
+
+
+void cPlayer::SetSpeed(double a_SpeedX, double a_SpeedY, double a_SpeedZ)
+{
+ m_Speed.Set(a_SpeedX, a_SpeedY, a_SpeedZ);
+ WrapSpeed();
+
+ // Send the speed to the client so he actualy moves
+ m_ClientHandle->SendEntityVelocity(*this);
+}
+
+
+
+
+
+void cPlayer::SetSpeedX(double a_SpeedX)
+{
+ m_Speed.x = a_SpeedX;
+ WrapSpeed();
+
+ // Send the speed to the client so he actualy moves
+ m_ClientHandle->SendEntityVelocity(*this);
+}
+
+
+
+
+
+void cPlayer::SetSpeedY(double a_SpeedY)
+{
+ m_Speed.y = a_SpeedY;
+ WrapSpeed();
+
+ // Send the speed to the client so he actualy moves
+ m_ClientHandle->SendEntityVelocity(*this);
+}
+
+
+
+
+
+void cPlayer::SetSpeedZ(double a_SpeedZ)
+{
+ m_Speed.z = a_SpeedZ;
+ WrapSpeed();
+
+ // Send the speed to the client so he actualy moves
+ m_ClientHandle->SendEntityVelocity(*this);
+}
+
+
+
+
+
void cPlayer::MoveTo( const Vector3d & a_NewPos )
{
if ((a_NewPos.y < -990) && (GetPosY() > -100))