mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix gamepad rumble freezing when it should stop
This commit is contained in:
parent
8f320b6ac2
commit
5f1b8bb3b8
1 changed files with 14 additions and 17 deletions
31
src/p_tick.c
31
src/p_tick.c
|
|
@ -732,24 +732,21 @@ 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)
|
|
||||||
{
|
{
|
||||||
low = high = 65536 / 2;
|
if ((player->mo->eflags & MFE_DAMAGEHITLAG) && player->mo->hitlag)
|
||||||
}
|
{
|
||||||
else if (player->sneakertimer > (sneakertime-(TICRATE/2)))
|
low = high = 65536 / 2;
|
||||||
{
|
}
|
||||||
low = high = 65536 / (3+player->numsneakers);
|
else if (player->sneakertimer > (sneakertime-(TICRATE/2)))
|
||||||
}
|
{
|
||||||
else if (((player->boostpower < FRACUNIT) || (player->stairjank > 8))
|
low = high = 65536 / (3+player->numsneakers);
|
||||||
&& P_IsObjectOnGround(player->mo) && player->speed != 0)
|
}
|
||||||
{
|
else if (((player->boostpower < FRACUNIT) || (player->stairjank > 8))
|
||||||
low = high = 65536 / 32;
|
&& P_IsObjectOnGround(player->mo) && player->speed != 0)
|
||||||
|
{
|
||||||
|
low = high = 65536 / 32;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
G_PlayerDeviceRumble(i, low, high);
|
G_PlayerDeviceRumble(i, low, high);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue