-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Trigger flip effects don't work if sound devices are disabled #583
Comments
is this because it is waiting for a sound to end that will never end? |
Hm
|
I think it's a music trigger that can't fire and thus prevents other triggers from working? |
@rr- I think this is because of the effect routines running in before it's checked:
The bug affects flip effect routines caused by triggers: I also tested Flip Effect 5 (earthquake) in Palace Midas and it does not bounce the camera with sound devices disabled, so this bug is not limited to the Atlantis flicker. I think the flip effects were called in Also I went to test if this happens in TombATI, and the game doesn't even start if sound devices are disabled. So I'd say this is an OG bug. |
I'd say we should move this code:
to Something like this: diff --git a/src/game/effects.c b/src/game/effects.c
index ff6f4bc4..306cc389 100644
--- a/src/game/effects.c
+++ b/src/game/effects.c
@@ -34,6 +34,11 @@ void Effect_Control(void)
}
fx_num = fx->next_active;
}
+
+ // XXX: Some of the FX routines rely on the item to be not null!
+ if (g_FlipEffect != -1) {
+ g_EffectRoutines[g_FlipEffect](NULL);
+ }
}
int16_t Effect_Create(int16_t room_num)
diff --git a/src/game/sound.c b/src/game/sound.c
index 6f16c30f..0ca557de 100644
--- a/src/game/sound.c
+++ b/src/game/sound.c
@@ -217,12 +217,6 @@ void Sound_UpdateEffects(void)
}
}
- // XXX: Why are we firing this here? Some of the FX routines rely on the
- // item to be not null!
- if (g_FlipEffect != -1) {
- g_EffectRoutines[g_FlipEffect](NULL);
- }
-
for (int i = 0; i < MAX_PLAYING_FX; i++) {
SOUND_SLOT *slot = &m_SFXPlaying[i];
if (!(slot->flags & SOUND_FLAG_USED)) { We're already calling |
Ok. And call it / check it where? |
See my edit |
Ok I'll ask around if that will break anything since it moves where the effect routines are called in
|
I discussed this a bit with ChocolateFan. What about separating it into its own function but call it just before the sound code? I think moving it into
|
Sounds good. |
This is a bit esoteric, but if all sound output devices are disabled in Windows, the lights never turn on at the beginning of Atlantis.
The text was updated successfully, but these errors were encountered: