From f47f6af382228431fa363198ebf9d6d9424c5b56 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Sun, 16 Aug 2015 22:08:11 +0200 Subject: games/doom: fix idclev cheat in doom2 and final doom (thanks qu7uux) a typo in st_stuff.c:ST_Responder prevents idclev (change level) cheat to work in doom2 and final doom (gamemode == commercial): episode is set to 0, when that's invalid, and ST_Responder just returns. to test, while ingame type idclev, followed by: . doom1: episode (1-3 or 1-4) then map number (1-9) . doom2/final doom: map number (1-32) incidentally, if the last digit typed is 1, the player's weapon will switch to the fist, because of a different bug (basically kbdproc registering two events when pressing a key, for 'c' and 'k' case). --- sys/src/games/doom/st_stuff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/src') diff --git a/sys/src/games/doom/st_stuff.c b/sys/src/games/doom/st_stuff.c index a4ead5fec..414c2991e 100644 --- a/sys/src/games/doom/st_stuff.c +++ b/sys/src/games/doom/st_stuff.c @@ -680,7 +680,7 @@ ST_Responder (event_t* ev) if (gamemode == commercial) { - epsd = 0; + epsd = 1; map = (buf[0] - '0')*10 + buf[1] - '0'; } else -- cgit v1.2.3