X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Ftriggers%2Ftarget%2Fmusic.qc;h=ff195f03f9bff35a12f6adad94dfe66e1cec8656;hb=641c47df604de42c11c68a7d80813b29affcefb2;hp=d43cbec769c542774e5c54ea4e8f575a6e186dcf;hpb=3220cab5a7b69ced4a641504a6a5f4eccf2d3bfc;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/triggers/target/music.qc b/qcsrc/common/triggers/target/music.qc index d43cbec76..ff195f03f 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 = NULL; (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 @@ -223,7 +223,7 @@ void Net_TargetMusic() _sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE); if(getsoundtime(e, CH_BGM_SINGLE) < 0) { - LOG_TRACEF("Cannot initialize sound %s\n", e.noise); + LOG_TRACEF("Cannot initialize sound %s", e.noise); strunzone(e.noise); e.noise = string_null; } @@ -310,7 +310,7 @@ NET_HANDLE(ENT_CLIENT_TRIGGER_MUSIC, bool isnew) _sound(this, CH_BGM_SINGLE, this.noise, 0, ATTEN_NONE); if(getsoundtime(this, CH_BGM_SINGLE) < 0) { - LOG_TRACEF("Cannot initialize sound %s\n", this.noise); + LOG_TRACEF("Cannot initialize sound %s", this.noise); strunzone(this.noise); this.noise = string_null; }