X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fclient%2Ftarget_music.qc;h=731c432af7c743ee2988829eda56dd436e6e83e2;hb=288a95f54dc6763f03136adfdf22fbf244ce9301;hp=f30e77af424007e8aebd4d8805c1fea2e19359f8;hpb=3c7ef5b449d479f9a2e24fdddf767f87208c9be6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/client/target_music.qc b/qcsrc/client/target_music.qc index f30e77af4..731c432af 100644 --- a/qcsrc/client/target_music.qc +++ b/qcsrc/client/target_music.qc @@ -4,7 +4,7 @@ entity music_target; entity music_trigger; // FIXME also control bgmvolume here, to not require a target_music for the default track. -.float state; +.int state; .float lastvol; void TargetMusic_Advance() @@ -91,7 +91,7 @@ void Net_TargetMusic() sound(e, CH_BGM_SINGLE, e.noise, 0, ATTEN_NONE); if(getsoundtime(e, CH_BGM_SINGLE) < 0) { - print(sprintf(_("Cannot initialize sound %s\n"), e.noise)); + dprintf("Cannot initialize sound %s\n", e.noise); strunzone(e.noise); e.noise = string_null; } @@ -138,9 +138,7 @@ void Ent_TriggerMusic_Remove() void Ent_ReadTriggerMusic() { - float f; - string s; - f = ReadByte(); + int f = ReadByte(); if(f & 4) { self.origin_x = ReadCoord(); @@ -170,7 +168,7 @@ void Ent_ReadTriggerMusic() self.volume = ReadByte() / 255.0; self.fade_time = ReadByte() / 16.0; self.fade_rate = ReadByte() / 16.0; - s = self.noise; + string s = self.noise; if(self.noise) strunzone(self.noise); self.noise = strzone(ReadString()); @@ -180,7 +178,7 @@ void Ent_ReadTriggerMusic() sound(self, CH_BGM_SINGLE, self.noise, 0, ATTEN_NONE); if(getsoundtime(self, CH_BGM_SINGLE) < 0) { - print(sprintf(_("Cannot initialize sound %s\n"), self.noise)); + dprintf("Cannot initialize sound %s\n", self.noise); strunzone(self.noise); self.noise = string_null; }