commit 01e91aab21ad457dc7cd04d4288d38eaf46286df
Author: Simon Howard <fraggle@gmail.com>
AuthorDate: Sat Nov 26 22:09:42 2011 +0000
Commit: Simon Howard <fraggle@gmail.com>
CommitDate: Sat Nov 26 22:09:42 2011 +0000
Fix weapon cycling keys when using IDKFA in Shareware Doom (thanks
Alexandre Xavier).
Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2478
---
NEWS | 2 ++
src/g_game.c | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/NEWS b/NEWS
index 59c5ffaa..0c8b9cf8 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,8 @@
emulate the PC VGA hardware (thanks GhostlyDeath).
* Fix teleport behavior when emulating the alternate Final Doom
executable (-gameversion final2) (thanks xttl).
+ * Fix weapon cycling keys when playing in Shareware Doom and using
+ the IDKFA cheat (thanks Alexandre Xavier).
libtextscreen:
* Input boxes stop editing and save when they lose their focus,
diff --git a/src/g_game.c b/src/g_game.c
index 933a1b7b..c68f40ad 100644
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -435,6 +435,14 @@ static boolean WeaponSelectable(weapontype_t weapon)
return false;
}
+ // These weapons aren't available in shareware.
+
+ if ((weapon == wp_plasma || weapon == wp_bfg)
+ && gamemission == doom && gamemode == shareware)
+ {
+ return false;
+ }
+
// Can't select a weapon if we don't own it.
if (!players[consoleplayer].weaponowned[weapon])