+#if defined(CSQC)
+ #include "../dpdefs/csprogsdefs.qh"
+ #include "defs.qh"
+ #include "../common/constants.qh"
+ #include "../warpzonelib/common.qh"
+ #include "../common/util.qh"
+ #include "autocvars.qh"
+ #include "main.qh"
+ #include "../csqcmodellib/cl_model.qh"
+#elif defined(MENUQC)
+#elif defined(SVQC)
+#endif
+
float music_disabled;
entity music_default;
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()
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;
}
void Ent_ReadTriggerMusic()
{
- float f;
- string s;
- f = ReadByte();
+ int f = ReadByte();
if(f & 4)
{
self.origin_x = ReadCoord();
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());
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;
}