diff --git a/src/doomstat.h b/src/doomstat.h index 6d595068..51211d1b 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -69,6 +69,7 @@ extern char *MAPNAME(int e, int m); extern boolean modifiedgame; extern boolean have_ssg; +#define ALLOW_SSG (gamemode == commercial || CRITICAL(have_ssg)) // compatibility with old engines (monster behavior, metrics, etc.) extern int compatibility, default_compatibility; // killough 1/31/98 diff --git a/src/g_game.c b/src/g_game.c index 46240db7..b1eeae6d 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -241,7 +241,7 @@ static boolean WeaponSelectable(weapontype_t weapon) { // Can't select the super shotgun in Doom 1. - if (weapon == wp_supershotgun && !have_ssg) + if (weapon == wp_supershotgun && !ALLOW_SSG) { return false; } @@ -780,7 +780,7 @@ void G_BuildTiccmd(ticcmd_t* cmd) M_InputGameActive(input_weapon6) && gamemode != shareware ? wp_plasma : M_InputGameActive(input_weapon7) && gamemode != shareware ? wp_bfg : M_InputGameActive(input_weapon8) ? wp_chainsaw : - M_InputGameActive(input_weapon9) && !demo_compatibility && have_ssg ? wp_supershotgun : + M_InputGameActive(input_weapon9) && !demo_compatibility && ALLOW_SSG ? wp_supershotgun : wp_nochange; // killough 3/22/98: For network and demo consistency with the @@ -818,7 +818,7 @@ void G_BuildTiccmd(ticcmd_t* cmd) // in use, or if the SSG is not already in use and the // player prefers it. - if (newweapon == wp_shotgun && have_ssg && + if (newweapon == wp_shotgun && ALLOW_SSG && player->weaponowned[wp_supershotgun] && (!player->weaponowned[wp_shotgun] || player->readyweapon == wp_shotgun || diff --git a/src/hu_stuff.c b/src/hu_stuff.c index 1fe3acde..94da286a 100644 --- a/src/hu_stuff.c +++ b/src/hu_stuff.c @@ -1006,7 +1006,7 @@ static void HU_widget_build_weapon (void) break; case retail: case registered: - if (w >= wp_supershotgun && !have_ssg) + if (w >= wp_supershotgun && !ALLOW_SSG) ok = 0; break; default: diff --git a/src/m_cheat.c b/src/m_cheat.c index 24c4183a..a8ef67eb 100644 --- a/src/m_cheat.c +++ b/src/m_cheat.c @@ -541,7 +541,7 @@ static void cheat_fa() // You can't own weapons that aren't in the game // phares 02/27/98 for (i=0;iweaponowned[i] = true; for (i=0;iweaponowned[wp_supershotgun] && have_ssg && + if (player->weaponowned[wp_supershotgun] && ALLOW_SSG && player->ammo[am_shell] >= (demo_compatibility ? 3 : 2)) newweapon = wp_supershotgun; break; diff --git a/src/p_user.c b/src/p_user.c index 98f22801..3ead7f88 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -478,7 +478,7 @@ void P_PlayerThink (player_t* player) (player->readyweapon != wp_chainsaw || !player->powers[pw_strength])) newweapon = wp_chainsaw; - if (have_ssg && + if (ALLOW_SSG && newweapon == wp_shotgun && player->weaponowned[wp_supershotgun] && player->readyweapon != wp_supershotgun)