summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-05-26 23:13:40 +0200
committerarchshift <admin@archshift.com>2014-05-26 23:15:32 +0200
commit0a3570bc9daab9fb8772dee48aab1ba6bf4da92a (patch)
tree1ba372c788f7c4d6acd4494786e435b46415e88f /src
parentUpdate main.css (diff)
downloadcuberite-0a3570bc9daab9fb8772dee48aab1ba6bf4da92a.tar
cuberite-0a3570bc9daab9fb8772dee48aab1ba6bf4da92a.tar.gz
cuberite-0a3570bc9daab9fb8772dee48aab1ba6bf4da92a.tar.bz2
cuberite-0a3570bc9daab9fb8772dee48aab1ba6bf4da92a.tar.lz
cuberite-0a3570bc9daab9fb8772dee48aab1ba6bf4da92a.tar.xz
cuberite-0a3570bc9daab9fb8772dee48aab1ba6bf4da92a.tar.zst
cuberite-0a3570bc9daab9fb8772dee48aab1ba6bf4da92a.zip
Diffstat (limited to 'src')
-rw-r--r--src/ClientHandle.cpp24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp
index 83b21ae3c..4aa42a489 100644
--- a/src/ClientHandle.cpp
+++ b/src/ClientHandle.cpp
@@ -1391,28 +1391,8 @@ void cClientHandle::HandlePlayerLook(float a_Rotation, float a_Pitch, bool a_IsO
void cClientHandle::HandlePlayerMoveLook(double a_PosX, double a_PosY, double a_PosZ, double a_Stance, float a_Rotation, float a_Pitch, bool a_IsOnGround)
{
- if ((m_Player == NULL) || (m_State != csPlaying))
- {
- // The client hasn't been spawned yet and sends nonsense, we know better
- return;
- }
-
- /*
- // TODO: Invalid stance check
- if ((a_PosY >= a_Stance) || (a_Stance > a_PosY + 1.65))
- {
- LOGD("Invalid stance");
- SendPlayerMoveLook();
- return;
- }
- */
-
- m_Player->MoveTo(Vector3d(a_PosX, a_PosY, a_PosZ));
- m_Player->SetStance (a_Stance);
- m_Player->SetTouchGround(a_IsOnGround);
- m_Player->SetHeadYaw (a_Rotation);
- m_Player->SetYaw (a_Rotation);
- m_Player->SetPitch (a_Pitch);
+ HandlePlayerPos(a_PosX, a_PosY, a_PosZ, a_Stance, a_IsOnGround);
+ HandlePlayerLook(a_Rotation, a_Pitch, a_IsOnGround);
}