mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-14 09:05:19 +02:00
Allow mods to listen to cheat detections using minetest.register_on_cheat()
This commit is contained in:
@@ -1454,8 +1454,9 @@ std::string PlayerSAO::getPropertyPacket()
|
||||
return gob_cmd_set_properties(m_prop);
|
||||
}
|
||||
|
||||
void PlayerSAO::checkMovementCheat()
|
||||
bool PlayerSAO::checkMovementCheat()
|
||||
{
|
||||
bool cheated = false;
|
||||
if(isAttached() || m_is_singleplayer ||
|
||||
g_settings->getBool("disable_anticheat"))
|
||||
{
|
||||
@@ -1503,8 +1504,10 @@ void PlayerSAO::checkMovementCheat()
|
||||
<<std::endl;
|
||||
m_player->setPosition(m_last_good_position);
|
||||
m_moved = true;
|
||||
cheated = true;
|
||||
}
|
||||
}
|
||||
return cheated;
|
||||
}
|
||||
|
||||
bool PlayerSAO::getCollisionBox(aabb3f *toset) {
|
||||
|
Reference in New Issue
Block a user