X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftarget%2Fmusic.qc;h=7abcd67403391fb821bbdfd45ff02de704dc5664;hb=fc15d72b041c9a748b605ba28735380fbe5b5b01;hp=4ce98b944b4907387ab66e058d850597e4a6a11b;hpb=df2fe9b28cb6210b671bec6d5ae834ff4eb2e2db;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index 4ce98b944..7abcd6740 100644 --- a/qcsrc/common/triggers/target/music.qc +++ b/qcsrc/common/triggers/target/music.qc @@ -71,13 +71,13 @@ spawnfunc(target_music) } void TargetMusic_RestoreGame() { - for(entity e = world; (e = find(e, classname, "target_music")); ) + FOREACH_ENTITY_CLASS("target_music", true, { - if(e.targetname == "") - target_music_sendto(e, MSG_INIT, 1); + if(it.targetname == "") + target_music_sendto(it, MSG_INIT, 1); else - target_music_sendto(e, MSG_INIT, 0); - } + target_music_sendto(it, MSG_INIT, 0); + }); } // values: // volume @@ -188,7 +188,7 @@ void TargetMusic_Advance() it.lastvol = vol; } }); - music_trigger = world; + music_trigger = NULL; bgmtime = (best) ? getsoundtime(best, CH_BGM_SINGLE) : gettime(GETTIME_CDTRACK); } @@ -254,7 +254,7 @@ void Net_TargetMusic() void Ent_TriggerMusic_Think(entity this) { - if(WarpZoneLib_BoxTouchesBrush(view_origin, view_origin, this, world)) + if(WarpZoneLib_BoxTouchesBrush(view_origin, view_origin, this, NULL)) { music_trigger = this; }