[Fix] spfx_clear() also clears rumble.

This commit is contained in:
Allanis 2013-07-21 11:40:32 +01:00
parent e331a8e8b6
commit 2381ca3a36

View File

@ -145,11 +145,17 @@ void spfx_add(int effect,
void spfx_clear(void) { void spfx_clear(void) {
int i; int i;
/* Clear front layer. */
for(i = spfx_nstack_front-1; i >= 0; i--) for(i = spfx_nstack_front-1; i >= 0; i--)
spfx_destroy(spfx_stack_front, &spfx_nstack_front, i); spfx_destroy(spfx_stack_front, &spfx_nstack_front, i);
/* Clear back layer. */
for(i = spfx_nstack_back-1; i >= 0; i--) for(i = spfx_nstack_back-1; i >= 0; i--)
spfx_destroy(spfx_stack_back, &spfx_nstack_back, i); spfx_destroy(spfx_stack_back, &spfx_nstack_back, i);
/* Clear rumble. */
shake_rad = 0;
} }
static void spfx_destroy(SPFX* layer, int* nlayer, int spfx) { static void spfx_destroy(SPFX* layer, int* nlayer, int spfx) {