fix: simplifica cmdCheat infinite lives, elimina getActionName mort

This commit is contained in:
2026-05-14 20:21:45 +02:00
parent 6d90b79260
commit 1b40c90a00
3 changed files with 3 additions and 18 deletions

View File

@@ -836,13 +836,12 @@ static auto cmdCheat(const std::vector<std::string>& args) -> std::string { //
if (args.size() < 2 || args[1] != "LIVES") { return "usage: cheat infinite lives [on|off]"; }
auto& cheat = Options::cheats.infinite_lives;
using State = Options::Cheat::State;
const std::vector<std::string> REST(args.begin() + 2, args.end());
if (REST.empty()) {
if (args.size() == 2) {
cheat = (cheat == State::ENABLED) ? State::DISABLED : State::ENABLED;
} else if (REST[0] == "ON") {
} else if (args[2] == "ON") {
if (cheat == State::ENABLED) { return "Infinite lives already ON"; }
cheat = State::ENABLED;
} else if (REST[0] == "OFF") {
} else if (args[2] == "OFF") {
if (cheat == State::DISABLED) { return "Infinite lives already OFF"; }
cheat = State::DISABLED;
} else {