mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
- Renamed checkFired6or7->checkLitSprayOrTNT
replicates NBlood 285ad39455556ede31a0a94796a324ac43d1e3ef
This commit is contained in:
parent
67339d18ae
commit
2576de04b8
3 changed files with 8 additions and 8 deletions
|
@ -46,7 +46,7 @@ int qanimateoffs(int a1, int a2);
|
|||
|
||||
struct PLAYER;
|
||||
|
||||
bool checkFired6or7(PLAYER* pPlayer);
|
||||
bool checkLitSprayOrTNT(PLAYER* pPlayer);
|
||||
void WeaponInit(void);
|
||||
void WeaponDraw(PLAYER* pPlayer, int a2, double a3, double a4, int a5);
|
||||
void WeaponRaise(PLAYER* pPlayer);
|
||||
|
|
|
@ -242,7 +242,7 @@ void LifeLeechOperate(DBloodActor* actor, EVENT event)
|
|||
pPlayer->hasWeapon[kWeapLifeLeech] = 1;
|
||||
if (pPlayer->curWeapon != kWeapLifeLeech)
|
||||
{
|
||||
if (!VanillaMode() && checkFired6or7(pPlayer)) // if tnt/spray is actively used, do not switch weapon
|
||||
if (!VanillaMode() && checkLitSprayOrTNT(pPlayer)) // if tnt/spray is actively used, do not switch weapon
|
||||
break;
|
||||
pPlayer->weaponState = 0;
|
||||
pPlayer->nextWeapon = kWeapLifeLeech;
|
||||
|
|
|
@ -145,7 +145,7 @@ enum
|
|||
//
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
bool checkFired6or7(PLAYER* pPlayer)
|
||||
bool checkLitSprayOrTNT(PLAYER* pPlayer)
|
||||
{
|
||||
switch (pPlayer->curWeapon)
|
||||
{
|
||||
|
@ -743,7 +743,7 @@ void WeaponRaise(PLAYER* pPlayer)
|
|||
void WeaponLower(PLAYER* pPlayer)
|
||||
{
|
||||
assert(pPlayer != NULL);
|
||||
if (checkFired6or7(pPlayer))
|
||||
if (checkLitSprayOrTNT(pPlayer))
|
||||
return;
|
||||
pPlayer->throwPower = 0;
|
||||
int prevState = pPlayer->weaponState;
|
||||
|
@ -2058,7 +2058,7 @@ static const uint8_t gWeaponUpgrade[][13] = {
|
|||
int WeaponUpgrade(PLAYER* pPlayer, int newWeapon)
|
||||
{
|
||||
int weapon = pPlayer->curWeapon;
|
||||
if (!checkFired6or7(pPlayer) && (cl_weaponswitch & 1) && (gWeaponUpgrade[pPlayer->curWeapon][newWeapon] || (cl_weaponswitch & 2)))
|
||||
if (!checkLitSprayOrTNT(pPlayer) && (cl_weaponswitch & 1) && (gWeaponUpgrade[pPlayer->curWeapon][newWeapon] || (cl_weaponswitch & 2)))
|
||||
weapon = newWeapon;
|
||||
return weapon;
|
||||
}
|
||||
|
@ -2380,7 +2380,7 @@ void WeaponProcess(PLAYER* pPlayer) {
|
|||
}
|
||||
if (pPlayer->isUnderwater && BannedUnderwater(pPlayer->curWeapon))
|
||||
{
|
||||
if (checkFired6or7(pPlayer))
|
||||
if (checkLitSprayOrTNT(pPlayer))
|
||||
{
|
||||
if (pPlayer->curWeapon == kWeapSpraycan)
|
||||
{
|
||||
|
@ -2570,7 +2570,7 @@ void WeaponProcess(PLAYER* pPlayer) {
|
|||
}
|
||||
if (pPlayer->newWeapon)
|
||||
{
|
||||
if (pPlayer->isUnderwater && BannedUnderwater(pPlayer->newWeapon) && !checkFired6or7(pPlayer) && !VanillaMode()) // skip banned weapons when underwater and using next/prev weapon key inputs
|
||||
if (pPlayer->isUnderwater && BannedUnderwater(pPlayer->newWeapon) && !checkLitSprayOrTNT(pPlayer) && !VanillaMode()) // skip banned weapons when underwater and using next/prev weapon key inputs
|
||||
{
|
||||
if (prevNewWeaponVal == WeaponSel_Next || prevNewWeaponVal == WeaponSel_Prev) // if player switched weapons
|
||||
{
|
||||
|
@ -2636,7 +2636,7 @@ void WeaponProcess(PLAYER* pPlayer) {
|
|||
pPlayer->newWeapon = kWeapNone;
|
||||
return;
|
||||
}
|
||||
if (pPlayer->isUnderwater && BannedUnderwater(pPlayer->newWeapon) && !checkFired6or7(pPlayer))
|
||||
if (pPlayer->isUnderwater && BannedUnderwater(pPlayer->newWeapon) && !checkLitSprayOrTNT(pPlayer))
|
||||
{
|
||||
pPlayer->newWeapon = kWeapNone;
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue