1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-09-15 18:57:08 +00: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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;
}