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.
|
// reset if previously skipped winding by assigning different starting time.
|
||||||
introAudioSource.time = 0f;
|
introAudioSource.time = 0f;
|
||||||
|
|
||||||
__instance.farAudio.Stop();
|
|
||||||
var introStartDspTime = AudioSettings.dspTime;
|
var introStartDspTime = AudioSettings.dspTime;
|
||||||
introAudioSource.PlayScheduled(introStartDspTime);
|
introAudioSource.PlayScheduled(introStartDspTime);
|
||||||
behaviour.PlayScheduledLoop(introStartDspTime);
|
behaviour.PlayScheduledLoop(introStartDspTime);
|
||||||
|
|
@ -3377,10 +3376,10 @@ namespace MuzikaGromche
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 1:
|
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();
|
__instance.farAudio.Stop();
|
||||||
}
|
|
||||||
if (__state.previousState != 1 && introDelta >= 0)
|
if (__state.previousState != 1 && introDelta >= 0)
|
||||||
{
|
{
|
||||||
// if just started winding up
|
// if just started winding up
|
||||||
|
|
@ -3408,7 +3407,6 @@ namespace MuzikaGromche
|
||||||
introAudioSource.time = 0f;
|
introAudioSource.time = 0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
__instance.farAudio.Stop();
|
|
||||||
var introStartDspTime = AudioSettings.dspTime + introDelta;
|
var introStartDspTime = AudioSettings.dspTime + introDelta;
|
||||||
introAudioSource.PlayScheduled(introStartDspTime);
|
introAudioSource.PlayScheduled(introStartDspTime);
|
||||||
behaviour.PlayScheduledLoop(introStartDspTime);
|
behaviour.PlayScheduledLoop(introStartDspTime);
|
||||||
|
|
@ -3422,7 +3420,6 @@ namespace MuzikaGromche
|
||||||
{
|
{
|
||||||
if (!introAudioSource.isPlaying)
|
if (!introAudioSource.isPlaying)
|
||||||
{
|
{
|
||||||
__instance.farAudio.Stop();
|
|
||||||
var introStartDspTime = AudioSettings.dspTime + introDelta;
|
var introStartDspTime = AudioSettings.dspTime + introDelta;
|
||||||
introAudioSource.UnPause();
|
introAudioSource.UnPause();
|
||||||
behaviour.PlayScheduledLoop(introStartDspTime);
|
behaviour.PlayScheduledLoop(introStartDspTime);
|
||||||
|
|
@ -3432,6 +3429,8 @@ namespace MuzikaGromche
|
||||||
case 2:
|
case 2:
|
||||||
if (__state.previousState != 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();
|
__instance.creatureVoice.Stop();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue