attempt to fix nextweapon autoswitch issue (#2037)

This commit is contained in:
Roman Fomin 2024-11-22 15:14:52 +07:00 committed by GitHub
parent 2809231f00
commit dd46dfb108
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -22,6 +22,7 @@
#include "d_items.h"
#include "d_player.h"
#include "doomstat.h"
#include "g_nextweapon.h"
#include "i_printf.h"
#include "i_video.h" // uncapped
#include "m_random.h"
@ -266,6 +267,8 @@ int P_SwitchWeapon(player_t *player)
int newweapon = currentweapon;
int i = NUMWEAPONS+1; // killough 5/2/98
G_NextWeaponReset();
// [XA] use fixed behavior for mbf21. no need
// for a discrete compat option for this, as
// it doesn't impact demo playback (weapon