- Blood: Replace all numerical constants for player's nextWeapon with enum values.

This commit is contained in:
Mitchell Richters 2021-08-03 20:23:48 +10:00
parent 6f08eb2292
commit cd5e01818a
4 changed files with 10 additions and 10 deletions

View file

@ -103,7 +103,7 @@ void SetWeapons(bool stat)
// Keep the pitchfork to avoid freeze
gMe->hasWeapon[1] = 1;
gMe->curWeapon = kWeapNone;
gMe->nextWeapon = 1;
gMe->nextWeapon = kWeapPitchFork;
}
viewSetMessage(GStrings("TXTB_NOWEAP"));
}
@ -401,7 +401,7 @@ const char* GameInterface::GenericCheat(int player, int cheat)
gMe->pXSprite->health = 16;
gMe->hasWeapon[1] = 1;
gMe->curWeapon = kWeapNone;
gMe->nextWeapon = 1;
gMe->nextWeapon = kWeapPitchFork;
break;
default:

View file

@ -2040,7 +2040,7 @@ void trPlayerCtrlEraseStuff(XSPRITE* pXSource, PLAYER* pPlayer) {
pPlayer->hasWeapon[1] = true;
pPlayer->curWeapon = kWeapNone;
pPlayer->nextWeapon = 1;
pPlayer->nextWeapon = kWeapPitchFork;
WeaponRaise(pPlayer);
if (pXSource->data2) break;
@ -2110,7 +2110,7 @@ void trPlayerCtrlGiveStuff(XSPRITE* pXSource, PLAYER* pPlayer, TRPLAYERCTRL* pCt
break;
}
if (pPlayer->hasWeapon[weapon] && pXSource->data4 == 0) { // switch on it
pPlayer->nextWeapon = 0;
pPlayer->nextWeapon = kWeapNone;
if (pPlayer->sceneQav >= 0 && spriRangeIsFine(pCtrl->qavScene.index)) {
XSPRITE* pXScene = &xsprite[sprite[pCtrl->qavScene.index].extra];

View file

@ -722,7 +722,7 @@ void playerStart(int nPlayer, int bNewLevel)
gFullMap = 0;
pPlayer->throwPower = 0;
pPlayer->deathTime = 0;
pPlayer->nextWeapon = 0;
pPlayer->nextWeapon = kWeapNone;
xvel[pSprite->index] = yvel[pSprite->index] = zvel[pSprite->index] = 0;
pInput->avel = 0;
pInput->actions = 0;

View file

@ -2095,7 +2095,7 @@ void WeaponProcess(PLAYER *pPlayer) {
sfxKill3DSound(pPlayer->pSprite, -1, 441);
pPlayer->weaponState = 0;
pPlayer->newWeapon = pPlayer->nextWeapon;
pPlayer->nextWeapon = 0;
pPlayer->nextWeapon = kWeapNone;
}
}
if (pPlayer->input.getNewWeapon() == WeaponSel_Next)
@ -2105,7 +2105,7 @@ void WeaponProcess(PLAYER *pPlayer) {
{
pPlayer->weaponState = 0;
}
pPlayer->nextWeapon = 0;
pPlayer->nextWeapon = kWeapNone;
int t;
int weapon = WeaponFindNext(pPlayer, &t, 1);
pPlayer->weaponMode[weapon] = t;
@ -2127,7 +2127,7 @@ void WeaponProcess(PLAYER *pPlayer) {
{
pPlayer->weaponState = 0;
}
pPlayer->nextWeapon = 0;
pPlayer->nextWeapon = kWeapNone;
int t;
int weapon = WeaponFindNext(pPlayer, &t, 0);
pPlayer->weaponMode[weapon] = t;
@ -2163,7 +2163,7 @@ void WeaponProcess(PLAYER *pPlayer) {
pPlayer->input.setNewWeapon(0);
pPlayer->weaponState = 0;
pPlayer->nextWeapon = 0;
pPlayer->nextWeapon = kWeapNone;
int t = 0;
pPlayer->weaponMode[weapon] = t;
if (pPlayer->curWeapon)
@ -2180,7 +2180,7 @@ void WeaponProcess(PLAYER *pPlayer) {
{
sfxKill3DSound(pPlayer->pSprite, -1, 441);
pPlayer->newWeapon = pPlayer->nextWeapon;
pPlayer->nextWeapon = 0;
pPlayer->nextWeapon = kWeapNone;
}
}
if (pPlayer->weaponState == -1)