From 1cbb44a897d4d3d44806a900c796e0ecb4b7619d Mon Sep 17 00:00:00 2001 From: zicodxx <> Date: Tue, 18 Nov 2008 14:34:52 +0000 Subject: [PATCH] Fixed Cheats --- CHANGELOG.txt | 1 + main/game.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a4680f21a..11c923750 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,6 +4,7 @@ D1X-Rebirth Changelog -------- main/console.c: When printing Gamelog, make sure canvas is NULL main/newmenu.c, main/multi.c, main/game.c, ui/inputbox.c, ui/menubar.c, arch/sdl/event.c, arch/sdl/key.c, arch/include/key.h: Yet another UNICODE overhaul - Using seperate buffer for UNICODE chars and only use it in key_ascii() while still using keysyms for the rest of the program so we do not screw up readings by key values altered by modifers - possibly still room to optimize +main/game.c: Fixed cheats! 20081115 -------- diff --git a/main/game.c b/main/game.c index b9d8f58c0..cce02b59a 100644 --- a/main/game.c +++ b/main/game.c @@ -1858,6 +1858,8 @@ void HandleDemoKey(int key) void FinalCheatsKey(int key) { + if (key == 0) return; + if (!(Game_mode&GM_MULTI) && key == cheat_enable_keys[cheat_enable_index]) { if (++cheat_enable_index == CHEAT_ENABLE_LENGTH) { hud_message(MSGC_GAME_CHEAT, TXT_CHEATS_ENABLED); @@ -2382,7 +2384,6 @@ void do_weapon_stuff() void ReadControls() { int key; - fix key_time; Player_fired_laser_this_frame=-1;