reset rumble on some conditions
This commit is contained in:
1 parent
fd48335688
commit
4554bcc565
5 files changed
+23
No files matched your search
@@ -3394,6 +3394,7 @@ void CL_Reset(void)
|
||||
curl_running = false;
|
||||
http_source[0] = '\0';
|
||||
#endif
|
||||
G_ResetAllDeviceRumbles();
|
||||
|
||||
// D_StartTitle should get done now, but the calling function will handle it
|
||||
}
|
||||
|
||||
@@ -3228,6 +3228,8 @@ static void Got_Pause(UINT8 **cp, INT32 playernum)
|
||||
else
|
||||
S_ResumeAudio();
|
||||
}
|
||||
|
||||
G_ResetAllDeviceRumbles();
|
||||
}
|
||||
|
||||
static void Command_ReplayMarker(void)
|
||||
|
||||
@@ -1600,6 +1600,8 @@ void G_DoLoadLevel(boolean resetplayer)
|
||||
|
||||
// clear hud messages remains (usually from game startup)
|
||||
CON_ClearHUD();
|
||||
|
||||
G_ResetAllDeviceRumbles();
|
||||
}
|
||||
|
||||
static INT32 pausedelay = 0;
|
||||
@@ -3031,6 +3033,8 @@ void G_AddPlayer(INT32 playernum)
|
||||
|
||||
void G_ExitLevel(void)
|
||||
{
|
||||
G_ResetAllDeviceRumbles();
|
||||
|
||||
if (gamestate == GS_LEVEL)
|
||||
{
|
||||
gameaction = ga_completed;
|
||||
|
||||
@@ -1013,6 +1013,21 @@ static void G_ResetPlayerDeviceRumble(INT32 player)
|
||||
I_GamepadRumble(device_id, 0, 0, 0);
|
||||
}
|
||||
|
||||
void G_ResetAllDeviceRumbles(void)
|
||||
{
|
||||
int i;
|
||||
int devices;
|
||||
|
||||
devices = I_NumJoys();
|
||||
|
||||
for (i = 0; i < devices; i++)
|
||||
{
|
||||
INT32 device_id = G_GetDeviceForPlayer(i);
|
||||
|
||||
I_GamepadRumble(device_id, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void G_PlayerDeviceRumble(INT32 player, UINT16 low_strength, UINT16 high_strength, UINT32 duration)
|
||||
{
|
||||
INT32 device_id;
|
||||
|
||||
@@ -138,6 +138,7 @@ UINT16 G_GetSkinColor(INT32 player);
|
||||
INT32 G_GetDeviceForPlayer(INT32 player);
|
||||
void G_SetPlayerGamepadIndicatorColor(INT32 player, UINT16 color);
|
||||
void G_PlayerDeviceRumble(INT32 player, UINT16 low_strength, UINT16 high_strength, UINT32 duration);
|
||||
void G_ResetAllDeviceRumbles(void);
|
||||
|
||||
// remaps the input event to a game control.
|
||||
void G_MapEventsToControls(event_t *ev);
|
||||
|
||||
Reference in new issue
Block a user