mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 00:21:38 +00:00
- CommonLoon102's weapon fixes from NBlood:
Fix bug when switching to another weapon from the spray while firing with primary fire won't switch to the new weapon. And telling Caleb not to put away his lighter if the spray is being switched to TNT. Do not put away lighter after TNT is thrown if while throwing the weapon was switched already to spray. Do not put away lighter if TNT was selected while throwing a spray can. Fix next/prev weapon
This commit is contained in:
parent
ee5950e7ad
commit
e375c799ce
1 changed files with 77 additions and 14 deletions
|
@ -665,7 +665,20 @@ void WeaponLower(PLAYER *pPlayer)
|
||||||
switch (prevState)
|
switch (prevState)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
StartQAV(pPlayer, 7, -1, 0);
|
if (VanillaMode())
|
||||||
|
{
|
||||||
|
StartQAV(pPlayer, 7, -1, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (pPlayer->newWeapon == 6)
|
||||||
|
{
|
||||||
|
pPlayer->weaponState = 2;
|
||||||
|
StartQAV(pPlayer, 11, -1, 0);
|
||||||
|
WeaponRaise(pPlayer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
pPlayer->weaponState = 1;
|
pPlayer->weaponState = 1;
|
||||||
|
@ -674,8 +687,24 @@ void WeaponLower(PLAYER *pPlayer)
|
||||||
case 4:
|
case 4:
|
||||||
pPlayer->weaponState = 1;
|
pPlayer->weaponState = 1;
|
||||||
StartQAV(pPlayer, 11, -1, 0);
|
StartQAV(pPlayer, 11, -1, 0);
|
||||||
pPlayer->newWeapon = 0;
|
if (VanillaMode())
|
||||||
WeaponLower(pPlayer);
|
{
|
||||||
|
pPlayer->newWeapon = 0;
|
||||||
|
WeaponLower(pPlayer);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (pPlayer->newWeapon == 6)
|
||||||
|
{
|
||||||
|
pPlayer->weaponState = 2;
|
||||||
|
StartQAV(pPlayer, 11, -1, 0);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
WeaponLower(pPlayer);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
if (pPlayer->newWeapon == 6)
|
if (pPlayer->newWeapon == 6)
|
||||||
|
@ -703,7 +732,20 @@ void WeaponLower(PLAYER *pPlayer)
|
||||||
switch (prevState)
|
switch (prevState)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
StartQAV(pPlayer, 7, -1, 0);
|
if (VanillaMode())
|
||||||
|
{
|
||||||
|
StartQAV(pPlayer, 7, -1, 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (pPlayer->newWeapon == 7)
|
||||||
|
{
|
||||||
|
pPlayer->weaponState = 2;
|
||||||
|
StartQAV(pPlayer, 17, -1, 0);
|
||||||
|
WeaponRaise(pPlayer);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
WeaponRaise(pPlayer);
|
WeaponRaise(pPlayer);
|
||||||
|
@ -2061,32 +2103,44 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
if (pPlayer->input.getNewWeapon() == WeaponSel_Next)
|
if (pPlayer->input.getNewWeapon() == WeaponSel_Next)
|
||||||
{
|
{
|
||||||
pPlayer->input.setNewWeapon(0);
|
pPlayer->input.setNewWeapon(0);
|
||||||
pPlayer->weaponState = 0;
|
if (VanillaMode())
|
||||||
|
{
|
||||||
|
pPlayer->weaponState = 0;
|
||||||
|
}
|
||||||
pPlayer->nextWeapon = 0;
|
pPlayer->nextWeapon = 0;
|
||||||
int t;
|
int t;
|
||||||
char weapon = WeaponFindNext(pPlayer, &t, 1);
|
char weapon = WeaponFindNext(pPlayer, &t, 1);
|
||||||
pPlayer->weaponMode[weapon] = t;
|
pPlayer->weaponMode[weapon] = t;
|
||||||
if (pPlayer->curWeapon)
|
if (VanillaMode())
|
||||||
{
|
{
|
||||||
WeaponLower(pPlayer);
|
if (pPlayer->curWeapon)
|
||||||
pPlayer->nextWeapon = weapon;
|
{
|
||||||
return;
|
WeaponLower(pPlayer);
|
||||||
|
pPlayer->nextWeapon = weapon;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pPlayer->newWeapon = weapon;
|
pPlayer->newWeapon = weapon;
|
||||||
}
|
}
|
||||||
else if (pPlayer->input.getNewWeapon() == WeaponSel_Prev)
|
else if (pPlayer->input.getNewWeapon() == WeaponSel_Prev)
|
||||||
{
|
{
|
||||||
pPlayer->input.setNewWeapon(0);
|
pPlayer->input.setNewWeapon(0);
|
||||||
pPlayer->weaponState = 0;
|
if (VanillaMode())
|
||||||
|
{
|
||||||
|
pPlayer->weaponState = 0;
|
||||||
|
}
|
||||||
pPlayer->nextWeapon = 0;
|
pPlayer->nextWeapon = 0;
|
||||||
int t;
|
int t;
|
||||||
char weapon = WeaponFindNext(pPlayer, &t, 0);
|
char weapon = WeaponFindNext(pPlayer, &t, 0);
|
||||||
pPlayer->weaponMode[weapon] = t;
|
pPlayer->weaponMode[weapon] = t;
|
||||||
if (pPlayer->curWeapon)
|
if (VanillaMode())
|
||||||
{
|
{
|
||||||
WeaponLower(pPlayer);
|
if (pPlayer->curWeapon)
|
||||||
pPlayer->nextWeapon = weapon;
|
{
|
||||||
return;
|
WeaponLower(pPlayer);
|
||||||
|
pPlayer->nextWeapon = weapon;
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
pPlayer->newWeapon = weapon;
|
pPlayer->newWeapon = weapon;
|
||||||
}
|
}
|
||||||
|
@ -2122,6 +2176,15 @@ void WeaponProcess(PLAYER *pPlayer) {
|
||||||
}
|
}
|
||||||
pPlayer->newWeapon = weapon;
|
pPlayer->newWeapon = weapon;
|
||||||
}
|
}
|
||||||
|
if (!VanillaMode())
|
||||||
|
{
|
||||||
|
if (pPlayer->nextWeapon)
|
||||||
|
{
|
||||||
|
sfxKill3DSound(pPlayer->pSprite, -1, 441);
|
||||||
|
pPlayer->newWeapon = pPlayer->nextWeapon;
|
||||||
|
pPlayer->nextWeapon = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
if (pPlayer->weaponState == -1)
|
if (pPlayer->weaponState == -1)
|
||||||
{
|
{
|
||||||
pPlayer->weaponState = 0;
|
pPlayer->weaponState = 0;
|
||||||
|
|
Loading…
Reference in a new issue