1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-08-06 17:41:04 +00:00

Move f1000 sanitizing to the places that still use this type

This commit is contained in:
sfan5 2022-06-08 19:33:46 +02:00
parent b204655081
commit 137eef6590
6 changed files with 8 additions and 17 deletions

View file

@ -321,12 +321,6 @@ std::string PlayerSAO::generateUpdatePhysicsOverrideCommand() const
void PlayerSAO::setBasePosition(v3f position)
{
// It's not entirely clear which parts of the network protocol still use
// v3f1000, but the script API enforces its bound on all float vectors
// (maybe it shouldn't?). For that reason we need to make sure the position
// isn't ever set to values that fail this restriction.
clampToF1000(position);
if (m_player && position != m_base_position)
m_player->setDirty(true);