1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-19 11:15:18 +02:00

Sanitize player position and speed server-side (#12396)

This commit is contained in:
sfan5
2022-06-07 21:27:05 +02:00
committed by GitHub
parent 3107c98591
commit 3ac5a24b12
4 changed files with 25 additions and 6 deletions

View File

@@ -134,13 +134,14 @@ public:
std::vector<CollisionInfo> *collision_info)
{}
const v3f &getSpeed() const
v3f getSpeed() const
{
return m_speed;
}
void setSpeed(const v3f &speed)
void setSpeed(v3f speed)
{
clampToF1000(speed);
m_speed = speed;
}