From bd6cec70dfff90b4e2c22793ac28b2eb23c1c103 Mon Sep 17 00:00:00 2001 From: nukeykt Date: Fri, 10 Jun 2016 13:08:21 +0900 Subject: [PATCH 1/2] doom: Fix automap cheat handling when emulating older EXEs. --- src/doom/am_map.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/doom/am_map.c b/src/doom/am_map.c index 76acd8d4c5..004b232aec 100644 --- a/src/doom/am_map.c +++ b/src/doom/am_map.c @@ -697,10 +697,11 @@ AM_Responder rc = false; } - if (!deathmatch && cht_CheckCheat(&cheat_amap, ev->data2)) - { - rc = false; - cheating = (cheating+1) % 3; + if ((!deathmatch || gameversion <= exe_doom_1_8) + && cht_CheckCheat(&cheat_amap, ev->data2)) + { + rc = false; + cheating = (cheating+1) % 3; } } else if (ev->type == ev_keyup) From 4ce27fe5751a58189202b8ab6c3d11ef59ace56b Mon Sep 17 00:00:00 2001 From: nukeykt Date: Fri, 10 Jun 2016 13:11:17 +0900 Subject: [PATCH 2/2] doom: Fix tab char in last commit. --- src/doom/am_map.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/doom/am_map.c b/src/doom/am_map.c index 004b232aec..8d3c49eea3 100644 --- a/src/doom/am_map.c +++ b/src/doom/am_map.c @@ -697,12 +697,12 @@ AM_Responder rc = false; } - if ((!deathmatch || gameversion <= exe_doom_1_8) - && cht_CheckCheat(&cheat_amap, ev->data2)) - { - rc = false; - cheating = (cheating+1) % 3; - } + if ((!deathmatch || gameversion <= exe_doom_1_8) + && cht_CheckCheat(&cheat_amap, ev->data2)) + { + rc = false; + cheating = (cheating + 1) % 3; + } } else if (ev->type == ev_keyup) {