mirror of
https://github.com/XProger/OpenLara.git
synced 2025-08-13 00:24:24 +02:00
#22 floodfill sound effect
This commit is contained in:
@@ -265,6 +265,8 @@ namespace TR {
|
||||
|
||||
SND_UNDERWATER = 60,
|
||||
|
||||
SND_FLOOD = 81,
|
||||
|
||||
SND_INV_SPIN = 108,
|
||||
SND_INV_HOME = 109,
|
||||
SND_INV_CONTROLS = 110,
|
||||
@@ -2163,6 +2165,10 @@ namespace TR {
|
||||
|
||||
for (int i = 0; i < info.trigCmdCount; i++) {
|
||||
FloorData::TriggerCommand cmd = info.trigCmd[i];
|
||||
if (cmd.action == Action::CAMERA_SWITCH) {
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
if (cmd.action != Action::ACTIVATE) continue;
|
||||
|
||||
Entity &e = entities[cmd.args];
|
||||
|
@@ -154,6 +154,12 @@ struct Level : IGame {
|
||||
if (effect == TR::Effect::FLICKER)
|
||||
flickerIdx = 0;
|
||||
|
||||
if (effect == TR::Effect::FLOOD) {
|
||||
Sound::Sample *sample = playSound(TR::SND_FLOOD, vec3(), 0);
|
||||
if (sample)
|
||||
sample->setVolume(0.0f, 4.0f);
|
||||
}
|
||||
|
||||
this->effect = effect;
|
||||
this->effectTimer = 0.0f;
|
||||
}
|
||||
|
Reference in New Issue
Block a user