diff options
Diffstat (limited to 'frontend/cmd/cheat.cpp')
-rw-r--r-- | frontend/cmd/cheat.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/frontend/cmd/cheat.cpp b/frontend/cmd/cheat.cpp index ac392d6..8c0af8d 100644 --- a/frontend/cmd/cheat.cpp +++ b/frontend/cmd/cheat.cpp @@ -1,12 +1,13 @@ #include "backend/print.h" +#include "backend/Dungeon.h" #include "../GameController.h" using namespace std; -FollowupAction GameController::cmd_cheat(string &) { - this->player.cheating = !this->player.cheating; - lprtf("Cheats staan nu %s.\n", this->player.cheating ? "aan" : "uit"); - return FollowupAction::NONE; +void GameController::cmd_cheat(string &) { + Player & player = this->dungeon->get_player(); + player.cheating = !player.cheating; + lprtf("Cheats staan nu %s.\n", player.cheating ? "aan" : "uit"); } |