]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/target_music.qc
Move the warning to whenever someone starts spectating, also add another
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / target_music.qc
index 75f77acf53b77beb9e0fc9274dcabec0f8c3307c..769416c467e534441279a52222fd802e283d26ac 100644 (file)
@@ -42,6 +42,16 @@ void spawnfunc_target_music()
        else
                target_music_sendto(MSG_INIT, 0);
 }
+void TargetMusic_RestoreGame()
+{
+       for(self = world; (self = find(self, classname, "target_music")); )
+       {
+               if(self.targetname == "")
+                       target_music_sendto(MSG_INIT, 1);
+               else
+                       target_music_sendto(MSG_INIT, 0);
+       }
+}
 // values:
 //   volume
 //   noise
@@ -53,7 +63,7 @@ void spawnfunc_target_music()
 float trigger_music_SendEntity(entity to, float sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_TRIGGER_MUSIC);
-       sf &~= 0x80;
+       sf &= ~0x80;
        if(self.cnt)
                sf |= 0x80;
        WriteByte(MSG_ENTITY, sf);