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:
12
sound.cpp
12
sound.cpp
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user