mirror of
https://github.com/fabiangreffrath/woof.git
synced 2025-09-22 03:12:00 -04:00
Add vanilla input_weapon9
support
This commit is contained in:
parent
a2253b0699
commit
ede79db438
25
src/g_game.c
25
src/g_game.c
@ -318,6 +318,29 @@ static int G_NextWeapon(int direction)
|
||||
return weapon_order_table[i].weapon_num;
|
||||
}
|
||||
|
||||
static weapontype_t WeaponSSG(void)
|
||||
{
|
||||
const player_t *player = &players[consoleplayer];
|
||||
|
||||
if (!ALLOW_SSG || !player->weaponowned[wp_supershotgun])
|
||||
{
|
||||
return wp_nochange;
|
||||
}
|
||||
|
||||
if (!demo_compatibility)
|
||||
{
|
||||
return wp_supershotgun;
|
||||
}
|
||||
|
||||
if (player->pendingweapon != wp_supershotgun
|
||||
&& player->readyweapon != wp_supershotgun)
|
||||
{
|
||||
return wp_shotgun;
|
||||
}
|
||||
|
||||
return wp_nochange;
|
||||
}
|
||||
|
||||
// [FG] toggle demo warp mode
|
||||
void G_EnableWarp(boolean warp)
|
||||
{
|
||||
@ -780,7 +803,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 && ALLOW_SSG ? wp_supershotgun :
|
||||
M_InputGameActive(input_weapon9) ? WeaponSSG() :
|
||||
wp_nochange;
|
||||
|
||||
// killough 3/22/98: For network and demo consistency with the
|
||||
|
Loading…
x
Reference in New Issue
Block a user