shithub: choc

Download patch

ref: 6e099632c653dd42dbe1f719c5887844091da0cc
parent: a69af94b58ac491c8a215ebe2f81b3a521b833f4
author: Simon Howard <[email protected]>
date: Sun Mar 27 20:24:47 EDT 2011

Fix weapon cycling from the shotgun to the chaingun in Doom 1 (thanks
Alexandre Xavier).

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 2311

--- a/NEWS
+++ b/NEWS
@@ -37,6 +37,8 @@
      * The default sfx/music volume set by the setup tool is now 8
        instead of 15, matching the game itself. (thanks Alexandre
        Xavier).
+     * Weapon cycling from the shotgun to the chaingun in Doom 1 now
+       works properly (thanks Alexandre Xavier).
 
     libtextscreen:
      * It is now possible to type a '+' in input boxes (thanks
--- a/src/g_game.c
+++ b/src/g_game.c
@@ -428,6 +428,13 @@
 
 static boolean WeaponSelectable(weapontype_t weapon)
 {
+    // Can't select the super shotgun in Doom 1.
+
+    if (weapon == wp_supershotgun && gamemission == doom)
+    {
+        return false;
+    }
+
     // Can't select a weapon if we don't own it.
 
     if (!players[consoleplayer].weaponowned[weapon])