1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Fix wrapDegrees family of functions

wrapDegrees() (renamed to modulo360f)
wrapDegrees_0_360
wrapDegrees_180

Minor errors were present in previous versions; see issue #2328
This commit is contained in:
Craig Robbins 2015-02-23 16:25:14 +10:00
parent 51057a56f5
commit 3b6480c5b0
3 changed files with 80 additions and 51 deletions

View file

@ -543,8 +543,8 @@ void Server::handleCommand_PlayerPos(NetworkPacket* pkt)
v3f position((f32)ps.X / 100.0, (f32)ps.Y / 100.0, (f32)ps.Z / 100.0);
v3f speed((f32)ss.X / 100.0, (f32)ss.Y / 100.0, (f32)ss.Z / 100.0);
pitch = wrapDegrees(pitch);
yaw = wrapDegrees(yaw);
pitch = modulo360f(pitch);
yaw = modulo360f(yaw);
Player *player = m_env->getPlayer(pkt->getPeerId());
if (player == NULL) {