]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/triggers/target/music.qc
Merge branch 'TimePath/experiments/csqc_prediction' into Mario/qc_physics
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / triggers / target / music.qc
index 5aa095d12edc98d1988f5f77b3ebbf3e3d9aaed4..fb38dad0ba7d380411843092201d9ac3f62b4434 100644 (file)
@@ -1,5 +1,15 @@
+#if defined(CSQC)
+#elif defined(MENUQC)
+#elif defined(SVQC)
+       #include "../../../dpdefs/progsdefs.qh"
+    #include "../../../dpdefs/dpextensions.qh"
+    #include "../../constants.qh"
+    #include "../../../server/constants.qh"
+    #include "../../../server/defs.qh"
+#endif
+
 #ifdef SVQC
-.float lifetime;
+
 // values:
 //   volume
 //   noise
@@ -75,28 +85,28 @@ float trigger_music_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, sf);
        if(sf & 4)
        {
-               WriteCoord(MSG_ENTITY, self.origin_x);
-               WriteCoord(MSG_ENTITY, self.origin_y);
-               WriteCoord(MSG_ENTITY, self.origin_z);
+               WriteCoord(MSG_ENTITY, self.origin.x);
+               WriteCoord(MSG_ENTITY, self.origin.y);
+               WriteCoord(MSG_ENTITY, self.origin.z);
        }
        if(sf & 1)
        {
                if(self.model != "null")
                {
                        WriteShort(MSG_ENTITY, self.modelindex);
-                       WriteCoord(MSG_ENTITY, self.mins_x);
-                       WriteCoord(MSG_ENTITY, self.mins_y);
-                       WriteCoord(MSG_ENTITY, self.mins_z);
-                       WriteCoord(MSG_ENTITY, self.maxs_x);
-                       WriteCoord(MSG_ENTITY, self.maxs_y);
-                       WriteCoord(MSG_ENTITY, self.maxs_z);
+                       WriteCoord(MSG_ENTITY, self.mins.x);
+                       WriteCoord(MSG_ENTITY, self.mins.y);
+                       WriteCoord(MSG_ENTITY, self.mins.z);
+                       WriteCoord(MSG_ENTITY, self.maxs.x);
+                       WriteCoord(MSG_ENTITY, self.maxs.y);
+                       WriteCoord(MSG_ENTITY, self.maxs.z);
                }
                else
                {
                        WriteShort(MSG_ENTITY, 0);
-                       WriteCoord(MSG_ENTITY, self.maxs_x);
-                       WriteCoord(MSG_ENTITY, self.maxs_y);
-                       WriteCoord(MSG_ENTITY, self.maxs_z);
+                       WriteCoord(MSG_ENTITY, self.maxs.x);
+                       WriteCoord(MSG_ENTITY, self.maxs.y);
+                       WriteCoord(MSG_ENTITY, self.maxs.z);
                }
                WriteByte(MSG_ENTITY, self.volume * 255.0);
                WriteByte(MSG_ENTITY, self.fade_time * 16.0);
@@ -131,6 +141,6 @@ void spawnfunc_trigger_music()
        self.use = trigger_music_use;
        self.reset = trigger_music_reset;
 
-       Net_LinkEntity(self, FALSE, 0, trigger_music_SendEntity);
+       Net_LinkEntity(self, false, 0, trigger_music_SendEntity);
 }
 #endif