From 4a6057c6a1ebadb688113c5dfa71a025233bda9a Mon Sep 17 00:00:00 2001 From: proller Date: Fri, 27 Dec 2024 02:44:04 +0100 Subject: [PATCH] better --- src/server/player_sao.cpp | 4 ++-- src/server/player_sao.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/server/player_sao.cpp b/src/server/player_sao.cpp index f3ae483012ddf..1f373f2d1dacd 100644 --- a/src/server/player_sao.cpp +++ b/src/server/player_sao.cpp @@ -620,9 +620,9 @@ std::string PlayerSAO::getPropertyPacket() void PlayerSAO::setMaxSpeedOverride(const v3f &vel) { if (m_max_speed_override_time == 0.0f) - m_max_speed_override = vel; + m_max_speed_override = v3fToOpos(vel); else - m_max_speed_override += vel; + m_max_speed_override += v3fToOpos(vel); if (m_player) { float accel = MYMIN(m_player->movement_acceleration_default, m_player->movement_acceleration_air); diff --git a/src/server/player_sao.h b/src/server/player_sao.h index 0067150c5712d..8c259893fae4d 100644 --- a/src/server/player_sao.h +++ b/src/server/player_sao.h @@ -192,7 +192,7 @@ class PlayerSAO : public UnitSAO v3pos_t m_nocheat_dig_pos = v3pos_t(32767, 32767, 32767); float m_nocheat_dig_time = 0.0f; float m_max_speed_override_time = 0.0f; - v3f m_max_speed_override = v3f(0.0f, 0.0f, 0.0f); + v3opos_t m_max_speed_override = v3opos_t(0.0f, 0.0f, 0.0f); // Timers IntervalLimiter m_breathing_interval;