Update AnticheatScripts.cpp - correctly set hook lists

This commit is contained in:
sudlud
2025-02-18 10:27:28 +01:00
committed by GitHub
parent 845e4c77e2
commit 03aa739948

View File

@@ -38,7 +38,7 @@ Seconds lastIterationPlayer = GameTime::GetUptime() + 30s; //TODO: change 30 sec
class AnticheatPlayerScript : public PlayerScript class AnticheatPlayerScript : public PlayerScript
{ {
public: public:
AnticheatPlayerScript() : PlayerScript("AnticheatPlayerScript") { PLAYERHOOK_ON_LOGOUT, PLAYERHOOK_ON_LOGIN, PLAYERHOOK_ON_UPDATE } AnticheatPlayerScript() : PlayerScript("AnticheatPlayerScript", { PLAYERHOOK_ON_LOGOUT, PLAYERHOOK_ON_LOGIN, PLAYERHOOK_ON_UPDATE }) { }
void OnPlayerLogout(Player* player) override void OnPlayerLogout(Player* player) override
{ {
@@ -63,7 +63,7 @@ public:
class AnticheatWorldScript : public WorldScript class AnticheatWorldScript : public WorldScript
{ {
public: public:
AnticheatWorldScript() : WorldScript("AnticheatWorldScript") { WORLDHOOK_ON_UPDATE, WORLDHOOK_ON_AFTER_CONFIG_LOAD } AnticheatWorldScript() : WorldScript("AnticheatWorldScript", { WORLDHOOK_ON_UPDATE, WORLDHOOK_ON_AFTER_CONFIG_LOAD }) { }
void OnUpdate(uint32 /* diff */) override // unusued parameter void OnUpdate(uint32 /* diff */) override // unusued parameter
{ {
@@ -102,7 +102,7 @@ public:
class AnticheatMovementHandlerScript : public MovementHandlerScript class AnticheatMovementHandlerScript : public MovementHandlerScript
{ {
public: public:
AnticheatMovementHandlerScript() : MovementHandlerScript("AnticheatMovementHandlerScript") { MOVEMENTHOOK_ON_PLAYER_MOVE } AnticheatMovementHandlerScript() : MovementHandlerScript("AnticheatMovementHandlerScript", { MOVEMENTHOOK_ON_PLAYER_MOVE }) { }
void OnPlayerMove(Player* player, MovementInfo mi, uint32 opcode) override void OnPlayerMove(Player* player, MovementInfo mi, uint32 opcode) override
{ {