summaryrefslogtreecommitdiffstats
path: root/TemplePushing.c4s/Script.c
diff options
context:
space:
mode:
Diffstat (limited to 'TemplePushing.c4s/Script.c')
-rw-r--r--TemplePushing.c4s/Script.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/TemplePushing.c4s/Script.c b/TemplePushing.c4s/Script.c
index 00c1bf6..2e54794 100644
--- a/TemplePushing.c4s/Script.c
+++ b/TemplePushing.c4s/Script.c
@@ -491,11 +491,16 @@ global func FxGameOverStart(object pTarget, int iEffectNumber)
global func FxGameOverTimer(object pTarget, int iEffectNumber, int iEffectTime)
{
var sounds = EffectVar(0, pTarget, iEffectNumber);
- if (iEffectTime <= 100 && ambienceEnabled)
+ if (iEffectTime <= 100/* && ambienceEnabled*/)
{
for(var sound in sounds)
{
SoundLevel(sound[0], sound[1]*(100 - iEffectTime)/100);
+ for(var i = 0; i < GetPlayerCount(); ++i)
+ {
+ var player = GetPlayerByIndex(i);
+ if (!WantsAmbienceSounds(player)) Sound(sound[0], true, 0, sound[1], player + 1, -1);
+ }
}
}
else if((iEffectTime > 200) || (iEffectTime > 100 && !ambienceEnabled))
@@ -683,7 +688,7 @@ func CheckGameStatus()
}
}
-func WantsAmbienceSounds(int player)
+global func WantsAmbienceSounds(int player)
{
// Check if user already specified in the past if he wants to enable ambience sounds
var preference = GetPlrExtraData(player, PlrData_EnableAmbienceSounds);