Fix gamepad rumble freezing when it should stop

This commit is contained in:
AJ Martinez 2024-01-19 19:03:33 -07:00
parent 8f320b6ac2
commit 5f1b8bb3b8

View file

@ -732,12 +732,8 @@ static inline void P_DeviceRumbleTick(void)
UINT16 low = 0; UINT16 low = 0;
UINT16 high = 0; UINT16 high = 0;
if (player->mo == NULL) if (player->mo != NULL && !player->exiting)
continue; {
if (player->exiting)
continue;
if ((player->mo->eflags & MFE_DAMAGEHITLAG) && player->mo->hitlag) if ((player->mo->eflags & MFE_DAMAGEHITLAG) && player->mo->hitlag)
{ {
low = high = 65536 / 2; low = high = 65536 / 2;
@ -751,6 +747,7 @@ static inline void P_DeviceRumbleTick(void)
{ {
low = high = 65536 / 32; low = high = 65536 / 32;
} }
}
G_PlayerDeviceRumble(i, low, high); G_PlayerDeviceRumble(i, low, high);
} }