]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/target/music.qc
Merge branch 'master' into terencehill/translate_colors_2
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / target / music.qc
index 015ad9138f32887f8aefc76bd646be06f966e409..52f1fca0e27a723ecf5804b40700ee42074a9394 100644 (file)
@@ -54,10 +54,10 @@ void target_music_use()
                msg_entity = activator;
                target_music_sendto(MSG_ONE, 1);
        }
-       FOREACH_CLIENT(IS_SPEC(it) && it.enemy == activator, LAMBDA(
+       FOREACH_CLIENT(IS_SPEC(it) && it.enemy == activator, {
                msg_entity = it;
                target_music_sendto(MSG_ONE, 1);
-       ));
+       });
 }
 spawnfunc(target_music)
 {
@@ -168,7 +168,7 @@ void TargetMusic_Advance()
        entity best = music_default;
        if (music_target && time < music_target.lifetime) best = music_target;
        if (music_trigger) best = music_trigger;
-       LL_EACH(TargetMusic_list, it.noise, LAMBDA(
+       LL_EACH(TargetMusic_list, it.noise, {
                const float vol0 = (getsoundtime(it, CH_BGM_SINGLE) >= 0) ? it.lastvol : -1;
                if (it == best)
                {
@@ -189,7 +189,7 @@ void TargetMusic_Advance()
                                _sound(it, CH_BGM_SINGLE, "", vol, ATTEN_NONE);
                        it.lastvol = vol;
                }
-       ));
+       });
        music_trigger = world;
        bgmtime = (best) ? getsoundtime(best, CH_BGM_SINGLE) : gettime(GETTIME_CDTRACK);
 }
@@ -210,11 +210,10 @@ void Net_TargetMusic()
        const string noi = ReadString();
 
        entity e = NULL;
-       LL_EACH(TargetMusic_list, it.count == id, LAMBDA(e = it; break));
+       LL_EACH(TargetMusic_list, it.count == id, { e = it; break; });
        if (!e)
        {
-               LL_PUSH(TargetMusic_list, e = new(TargetMusic));
-               make_pure(e);
+               LL_PUSH(TargetMusic_list, e = new_pure(TargetMusic));
                e.count = id;
        }
        if(e.noise != noi)