From 554edf6edfbeb472af9f6d95220cc1b5b798f4fd Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 25 Oct 2023 15:05:45 -0700 Subject: [PATCH] don't force personal cheat flags off when cheat mode is disabled in a game --- src/ChatCommands.cc | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/ChatCommands.cc b/src/ChatCommands.cc index ec539573..f1972c9f 100644 --- a/src/ChatCommands.cc +++ b/src/ChatCommands.cc @@ -467,19 +467,6 @@ static void server_command_cheat(shared_ptr c, const std::string&) { l->flags ^= Lobby::Flag::CHEATS_ENABLED; send_text_message_printf(l, "Cheat mode %s", (l->flags & Lobby::Flag::CHEATS_ENABLED) ? "enabled" : "disabled"); - - // If cheat mode was disabled, turn off all the cheat features that were on - if (!(l->flags & Lobby::Flag::CHEATS_ENABLED)) { - for (size_t x = 0; x < l->max_clients; x++) { - auto c = l->clients[x]; - if (!c) { - continue; - } - c->options.infinite_hp = false; - c->options.infinite_tp = false; - c->options.switch_assist = false; - } - } } static void server_command_lobby_event(shared_ptr c, const std::string& args) {