]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/g_casings.qc
Merge branch 'master' into TimePath/vehicles_cleanup
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / g_casings.qc
index 5dea2ce7d41c6d2915c2e75af49669aedb8abf58..b9ad94e3f3910ec90f254a9a4ded0b3f2e9646e7 100644 (file)
@@ -1,4 +1,8 @@
-float Casing_SendEntity(entity to, float sf)
+#include "_all.qh"
+
+#include "../common/util.qh"
+
+float Casing_SendEntity(entity to, int sf)
 {
        WriteByte(MSG_ENTITY, ENT_CLIENT_CASING);
        WriteByte(MSG_ENTITY, self.state); // actually type
@@ -9,10 +13,10 @@ float Casing_SendEntity(entity to, float sf)
        WriteByte(MSG_ENTITY, self.angles.x * 256 / 360);
        WriteByte(MSG_ENTITY, self.angles.y * 256 / 360);
        WriteByte(MSG_ENTITY, self.angles.z * 256 / 360);
-       return TRUE;
+       return true;
 }
 
-void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, float casingtype, entity casingowner)
+void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float randomavel, int casingtype, entity casingowner)
 {
        entity e;
        vector org;
@@ -29,6 +33,6 @@ void SpawnCasing(vector vel, float randomvel, vector ang, vector avel, float ran
        e.angles = ang;
        e.oldorigin_x = compressShortVector(e.velocity);
 
-       Net_LinkEntity(e, TRUE, 0.2, Casing_SendEntity);
+       Net_LinkEntity(e, true, 0.2, Casing_SendEntity);
                // 0.2s should be enough time for all clients to receive this ent once, do the gibbage and be done with it
 }