allocate one more element in the weaponinfo[] array

This commit is contained in:
Fabian Greffrath 2024-07-24 13:20:58 +02:00
parent d98a8476eb
commit fa62ed23ac
3 changed files with 5 additions and 3 deletions

View File

@ -32,7 +32,7 @@
// atkstate, i.e. attack/fire/hit frame
// flashstate, muzzle flash
//
weaponinfo_t weaponinfo[NUMWEAPONS+1] =
weaponinfo_t weaponinfo[NUMWEAPONS+2] =
{
{
// fist
@ -145,6 +145,9 @@ weaponinfo_t weaponinfo[NUMWEAPONS+1] =
{
0
},
{
0
},
};
//----------------------------------------------------------------------------

View File

@ -59,7 +59,7 @@ typedef struct
int flags;
} weaponinfo_t;
extern weaponinfo_t weaponinfo[NUMWEAPONS+1];
extern weaponinfo_t weaponinfo[NUMWEAPONS+2];
#endif

View File

@ -159,7 +159,6 @@ static void P_BringUpWeapon(player_t *player)
if (player->pendingweapon >= NUMWEAPONS)
{
player->pendingweapon = NUMWEAPONS;
I_Printf(VB_WARNING, "P_BringUpWeapon: weaponinfo overrun has occurred.");
}