forked from nikita/muzika-gromche
Stop farAudio (popGoesTheWeaselTheme) in the only place where it matters
This commit is contained in:
parent
3041d9f73c
commit
a254188f0c
|
|
@ -3369,7 +3369,6 @@ namespace MuzikaGromche
|
|||
// reset if previously skipped winding by assigning different starting time.
|
||||
introAudioSource.time = 0f;
|
||||
|
||||
__instance.farAudio.Stop();
|
||||
var introStartDspTime = AudioSettings.dspTime;
|
||||
introAudioSource.PlayScheduled(introStartDspTime);
|
||||
behaviour.PlayScheduledLoop(introStartDspTime);
|
||||
|
|
@ -3377,10 +3376,10 @@ namespace MuzikaGromche
|
|||
}
|
||||
break;
|
||||
case 1:
|
||||
if (__state.previousState != 1 && introDelta < 0)
|
||||
{
|
||||
// Always stop vanilla audio popGoesTheWeaselTheme, we use custom audio sources anyway.
|
||||
// Base method only starts it in the case 1 branch, no need to stop it elsewhere.
|
||||
__instance.farAudio.Stop();
|
||||
}
|
||||
|
||||
if (__state.previousState != 1 && introDelta >= 0)
|
||||
{
|
||||
// if just started winding up
|
||||
|
|
@ -3408,7 +3407,6 @@ namespace MuzikaGromche
|
|||
introAudioSource.time = 0f;
|
||||
}
|
||||
|
||||
__instance.farAudio.Stop();
|
||||
var introStartDspTime = AudioSettings.dspTime + introDelta;
|
||||
introAudioSource.PlayScheduled(introStartDspTime);
|
||||
behaviour.PlayScheduledLoop(introStartDspTime);
|
||||
|
|
@ -3422,7 +3420,6 @@ namespace MuzikaGromche
|
|||
{
|
||||
if (!introAudioSource.isPlaying)
|
||||
{
|
||||
__instance.farAudio.Stop();
|
||||
var introStartDspTime = AudioSettings.dspTime + introDelta;
|
||||
introAudioSource.UnPause();
|
||||
behaviour.PlayScheduledLoop(introStartDspTime);
|
||||
|
|
@ -3432,6 +3429,8 @@ namespace MuzikaGromche
|
|||
case 2:
|
||||
if (__state.previousState != 2)
|
||||
{
|
||||
// creatureVoice plays screamingSFX, and it should be prevented from playing.
|
||||
// Base method only starts it in the case 2 && previousState != 2 branch, no need to stop it elsewhere.
|
||||
__instance.creatureVoice.Stop();
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in New Issue