mirror of
https://github.com/ZDoom/Raze.git
synced 2025-02-20 18:42:26 +00:00
- Blood: Tidy up some missed kWeap
constants.
This commit is contained in:
parent
26e9d33bfa
commit
f8ffaa4be9
7 changed files with 14 additions and 13 deletions
|
@ -483,6 +483,7 @@ enum
|
|||
kWeapProximity = 11,
|
||||
kWeapRemote = 12,
|
||||
kWeapBeast = 13,
|
||||
kWeapMax = 14,
|
||||
};
|
||||
|
||||
// -------------------------------
|
||||
|
|
|
@ -106,7 +106,7 @@ void SetWeapons(bool stat)
|
|||
if (!VanillaMode())
|
||||
{
|
||||
// Keep the pitchfork to avoid freeze
|
||||
gMe->hasWeapon[1] = 1;
|
||||
gMe->hasWeapon[kWeapPitchFork] = 1;
|
||||
gMe->curWeapon = kWeapNone;
|
||||
gMe->nextWeapon = kWeapPitchFork;
|
||||
}
|
||||
|
@ -416,7 +416,7 @@ const char* GameInterface::GenericCheat(int player, int cheat)
|
|||
SetWooMode(true);
|
||||
powerupActivate(gMe, kPwUpDeliriumShroom);
|
||||
gMe->actor->xspr.health = 16;
|
||||
gMe->hasWeapon[1] = 1;
|
||||
gMe->hasWeapon[kWeapPitchFork] = 1;
|
||||
gMe->curWeapon = kWeapNone;
|
||||
gMe->nextWeapon = kWeapPitchFork;
|
||||
break;
|
||||
|
|
|
@ -2228,7 +2228,7 @@ void trPlayerCtrlEraseStuff(int value, PLAYER* pPlayer)
|
|||
if (i < 12) pPlayer->ammoCount[i] = 0;
|
||||
}
|
||||
|
||||
pPlayer->hasWeapon[1] = true;
|
||||
pPlayer->hasWeapon[kWeapPitchFork] = true;
|
||||
pPlayer->curWeapon = kWeapNone;
|
||||
pPlayer->nextWeapon = kWeapPitchFork;
|
||||
|
||||
|
|
|
@ -921,7 +921,7 @@ void playerReset(PLAYER* pPlayer)
|
|||
pPlayer->hasWeapon[i] = gInfiniteAmmo;
|
||||
pPlayer->weaponMode[i] = 0;
|
||||
}
|
||||
pPlayer->hasWeapon[1] = 1;
|
||||
pPlayer->hasWeapon[kWeapPitchFork] = 1;
|
||||
pPlayer->curWeapon = kWeapNone;
|
||||
pPlayer->qavCallback = -1;
|
||||
pPlayer->newWeapon = kWeapPitchFork;
|
||||
|
@ -2516,7 +2516,7 @@ FSerializer& Serialize(FSerializer& arc, const char* keyname, PLAYER& w, PLAYER*
|
|||
("weaponammo", w.weaponAmmo)
|
||||
.Array("hasweapon", w.hasWeapon, countof(w.hasWeapon))
|
||||
.Array("weaponmode", w.weaponMode, countof(w.weaponMode))
|
||||
.Array("weaponorder", &w.weaponOrder[0][0], 14 * 2)
|
||||
.Array("weaponorder", &w.weaponOrder[0][kWeapNone], +kWeapMax * 2)
|
||||
.Array("ammocount", w.ammoCount, countof(w.ammoCount))
|
||||
("qavloop", w.qavLoop)
|
||||
("qavlastTick", w.qavLastTick)
|
||||
|
|
|
@ -118,9 +118,9 @@ struct PLAYER
|
|||
int weaponTimer;
|
||||
int weaponState;
|
||||
int weaponAmmo; //rename
|
||||
bool hasWeapon[14];
|
||||
int weaponMode[14];
|
||||
int weaponOrder[2][14];
|
||||
bool hasWeapon[kWeapMax];
|
||||
int weaponMode[kWeapMax];
|
||||
int weaponOrder[2][kWeapMax];
|
||||
//int at149[14];
|
||||
int ammoCount[12];
|
||||
bool qavLoop;
|
||||
|
|
|
@ -239,13 +239,13 @@ void LifeLeechOperate(DBloodActor* actor, EVENT event)
|
|||
{
|
||||
evKillActor(actor);
|
||||
pPlayer->ammoCount[8] = ClipHigh(pPlayer->ammoCount[8] + actor->xspr.data3, gAmmoInfo[8].max);
|
||||
pPlayer->hasWeapon[9] = 1;
|
||||
pPlayer->hasWeapon[kWeapLifeLeech] = 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;
|
||||
pPlayer->nextWeapon = kWeapLifeLeech;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1795,7 +1795,7 @@ void AltFireVoodoo(int nTrigger, PLAYER* pPlayer)
|
|||
}
|
||||
}
|
||||
UseAmmo(pPlayer, 9, pPlayer->ammoCount[9]);
|
||||
pPlayer->hasWeapon[10] = 0;
|
||||
pPlayer->hasWeapon[kWeapVoodooDoll] = 0;
|
||||
pPlayer->weaponState = -1;
|
||||
}
|
||||
}
|
||||
|
@ -1816,7 +1816,7 @@ void DropVoodoo(int, PLAYER* pPlayer)
|
|||
evPostActor(spawned, 90, kCallbackDropVoodoo);
|
||||
UseAmmo(pPlayer, 6, gAmmoItemData[0].count);
|
||||
UseAmmo(pPlayer, 9, pPlayer->ammoCount[9]);
|
||||
pPlayer->hasWeapon[10] = 0;
|
||||
pPlayer->hasWeapon[kWeapVoodooDoll] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2014,7 +2014,7 @@ void AltFireLifeLeech(int, PLAYER* pPlayer)
|
|||
missile->xspr.data3 = pPlayer->ammoCount[8];
|
||||
pPlayer->ammoCount[8] = 0;
|
||||
}
|
||||
pPlayer->hasWeapon[9] = 0;
|
||||
pPlayer->hasWeapon[kWeapLifeLeech] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue