Skip to content

Commit

Permalink
better
Browse files Browse the repository at this point in the history
  • Loading branch information
proller committed Dec 27, 2024
1 parent 196ef68 commit 4a6057c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/server/player_sao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/server/player_sao.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 4a6057c

Please sign in to comment.