| 1206 | |
| 1207 | |
| 1208 | void cClientHandle::HandlePlayerMoveLook(double a_PosX, double a_PosY, double a_PosZ, double a_Stance, float a_Rotation, float a_Pitch, bool a_IsOnGround) |
| 1209 | { |
| 1210 | if ((m_Player == NULL) || (m_State != csPlaying)) |
| 1211 | { |
| 1212 | // The client hasn't been spawned yet and sends nonsense, we know better |
| 1213 | return; |
| 1214 | } |
| 1215 | |
| 1216 | /* |
| 1217 | // TODO: Invalid stance check |
| 1218 | if ((a_PosY >= a_Stance) || (a_Stance > a_PosY + 1.65)) |
| 1219 | { |
| 1220 | LOGD("Invalid stance"); |
| 1221 | SendPlayerMoveLook(); |
| 1222 | return; |
| 1223 | } |
| 1224 | */ |
| 1225 | |
| 1226 | m_Player->MoveTo(Vector3d(a_PosX, a_PosY, a_PosZ)); |
| 1227 | m_Player->SetStance (a_Stance); |
| 1228 | m_Player->SetTouchGround(a_IsOnGround); |
| 1229 | m_Player->SetHeadYaw (a_Rotation); |
| 1230 | m_Player->SetYaw (a_Rotation); |
| 1231 | m_Player->SetPitch (a_Pitch); |
| 1232 | } |
| 1233 | |
| 1234 | |
| 1235 |
no test coverage detected