16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-23 00:29:19 +02:00

configurable complex_sound stop during beginning behavior

This commit is contained in:
milek7
2017-08-25 20:24:06 +02:00
parent 73a1baf3f9
commit 59317743fa
3 changed files with 32 additions and 3 deletions

View File

@@ -440,7 +440,7 @@ void complex_sound::play()
void complex_sound::stop()
{
if (cs == state::main)
if (cs == state::main || (Global::soundstopmode == Global::playstop && cs == state::premain))
{
alSourceRewind(id);
@@ -453,7 +453,15 @@ void complex_sound::stop()
cs = state::post;
}
else if (cs == state::premain)
cs = state::prepost;
{
if (Global::soundstopmode == Global::queue)
cs = state::prepost;
else if (Global::soundstopmode == Global::stop)
{
alSourceRewind(id);
cs = state::post;
}
}
}
void complex_sound::update(float dt)