mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Fixed bug collecting lifeleech with ignited tnt/spray
This commit is contained in:
parent
2fbfa82fe8
commit
049665e03e
3 changed files with 6 additions and 2 deletions
|
@ -43,6 +43,7 @@ void HookReplaceFunctions();
|
|||
|
||||
struct PLAYER;
|
||||
|
||||
bool checkFired6or7(PLAYER *pPlayer);
|
||||
void WeaponInit(void);
|
||||
void WeaponDraw(PLAYER *pPlayer, int a2, double a3, double a4, int a5);
|
||||
void WeaponRaise(PLAYER *pPlayer);
|
||||
|
|
|
@ -28,6 +28,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "compat.h"
|
||||
|
||||
#include "blood.h"
|
||||
#include "misc.h"
|
||||
#include "d_net.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
@ -206,14 +207,16 @@ void LifeLeechOperate(spritetype *pSprite, XSPRITE *pXSprite, EVENT event)
|
|||
PLAYER *pPlayer = &gPlayer[nPlayer];
|
||||
if (pPlayer->pXSprite->health > 0)
|
||||
{
|
||||
evKill(pSprite->index, 3);
|
||||
pPlayer->ammoCount[8] = ClipHigh(pPlayer->ammoCount[8]+pXSprite->data3, gAmmoInfo[8].max);
|
||||
pPlayer->hasWeapon[9] = 1;
|
||||
if (pPlayer->curWeapon != kWeapLifeLeech)
|
||||
{
|
||||
if (!VanillaMode() && checkFired6or7(pPlayer)) // if tnt/spray is actively used, do not switch weapon
|
||||
break;
|
||||
pPlayer->weaponState = 0;
|
||||
pPlayer->nextWeapon = 9;
|
||||
}
|
||||
evKill(pSprite->index, 3);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -140,7 +140,7 @@ enum
|
|||
nClientAltFireNapalm,
|
||||
};
|
||||
|
||||
static bool checkFired6or7(PLAYER *pPlayer)
|
||||
bool checkFired6or7(PLAYER *pPlayer)
|
||||
{
|
||||
switch (pPlayer->curWeapon)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue