summaryrefslogtreecommitdiffstats
path: root/src/ClientHandle.cpp
diff options
context:
space:
mode:
authormadmaxoft <github@xoft.cz>2014-05-27 22:09:30 +0200
committermadmaxoft <github@xoft.cz>2014-05-27 22:09:30 +0200
commitdff71823d40690b676a617025c5fb70b7eeaf209 (patch)
treeeda6ddf26d9e24b634a5940b3d2a0fbb72148ffb /src/ClientHandle.cpp
parentAdded AlchemistVillage prefabs (Thanks, KingsCraftAu). (diff)
parentStuff. (diff)
downloadcuberite-dff71823d40690b676a617025c5fb70b7eeaf209.tar
cuberite-dff71823d40690b676a617025c5fb70b7eeaf209.tar.gz
cuberite-dff71823d40690b676a617025c5fb70b7eeaf209.tar.bz2
cuberite-dff71823d40690b676a617025c5fb70b7eeaf209.tar.lz
cuberite-dff71823d40690b676a617025c5fb70b7eeaf209.tar.xz
cuberite-dff71823d40690b676a617025c5fb70b7eeaf209.tar.zst
cuberite-dff71823d40690b676a617025c5fb70b7eeaf209.zip
Diffstat (limited to 'src/ClientHandle.cpp')
-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..9b03bead9 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);
+ HandlePlayerLook(a_Rotation, a_Pitch, a_IsOnGround);
+ HandlePlayerPos(a_PosX, a_PosY, a_PosZ, a_Stance, a_IsOnGround);
}