mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-12 16:58:39 +00:00
Allow mods to listen to cheat detections using minetest.register_on_cheat()
This commit is contained in:
parent
742614180c
commit
8831669505
7 changed files with 40 additions and 3 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue