diff --git a/server/processors/PlayerMessageProcessor.cpp b/server/processors/PlayerMessageProcessor.cpp index 1e987df1d..7cadfda29 100644 --- a/server/processors/PlayerMessageProcessor.cpp +++ b/server/processors/PlayerMessageProcessor.cpp @@ -437,13 +437,13 @@ bool PlayerMessageProcessor::handleCheatCode(const std::string & cheat, PlayerCo executeCheatCode(cheatName, i.first, h->id, parameters); } - if (!playerTargetedCheat) - executeCheatCode(cheatName, player, currObj, words); - PlayerCheated pc; pc.player = player; gameHandler->sendAndApply(&pc); + if (!playerTargetedCheat) + executeCheatCode(cheatName, player, currObj, words); + return true; }