mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-14 08:30:35 +00:00
- Blood: Allow fire button to be used for tnt/spray throw
Prevent alt fire blocking fire button for tnt/spray can throwing * Advised of fix to Raze here: https://github.com/nukeykt/NBlood/pull/654#issuecomment-1253886969 * Fixes #671.
This commit is contained in:
parent
6aa94a9b8e
commit
bcd2d82bc7
1 changed files with 6 additions and 4 deletions
|
@ -2166,14 +2166,15 @@ static int WeaponFindLoaded(PLAYER* pPlayer, int* a2)
|
|||
|
||||
int processSprayCan(PLAYER* pPlayer)
|
||||
{
|
||||
const char bUseShootAsThrow = !VanillaMode() && pPlayer->input.buttonFlags.shoot;
|
||||
switch (pPlayer->weaponState)
|
||||
{
|
||||
case 5:
|
||||
if (!(pPlayer->input.actions & SB_ALTFIRE))
|
||||
if (!(pPlayer->input.actions & SB_ALTFIRE) || bUseShootAsThrow)
|
||||
pPlayer->weaponState = 6;
|
||||
return 1;
|
||||
case 6:
|
||||
if (pPlayer->input.actions & SB_ALTFIRE)
|
||||
if ((pPlayer->input.actions & SB_ALTFIRE) && !bUseShootAsThrow)
|
||||
{
|
||||
pPlayer->weaponState = 3;
|
||||
pPlayer->fuseTime = pPlayer->weaponTimer;
|
||||
|
@ -2210,14 +2211,15 @@ int processSprayCan(PLAYER* pPlayer)
|
|||
|
||||
static bool processTNT(PLAYER* pPlayer)
|
||||
{
|
||||
const char bUseShootAsThrow = !VanillaMode() && pPlayer->input.buttonFlags.shoot;
|
||||
switch (pPlayer->weaponState)
|
||||
{
|
||||
case 4:
|
||||
if (!(pPlayer->input.actions & SB_ALTFIRE))
|
||||
if (!(pPlayer->input.actions & SB_ALTFIRE) || bUseShootAsThrow)
|
||||
pPlayer->weaponState = 5;
|
||||
return 1;
|
||||
case 5:
|
||||
if (pPlayer->input.actions & SB_ALTFIRE)
|
||||
if ((pPlayer->input.actions & SB_ALTFIRE) && !bUseShootAsThrow)
|
||||
{
|
||||
pPlayer->weaponState = 1;
|
||||
pPlayer->fuseTime = pPlayer->weaponTimer;
|
||||
|
|
Loading…
Reference in a new issue