]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/weapons/csqcprojectile.qc
Hopefully fix compilation unit
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / weapons / csqcprojectile.qc
index 0edf22664ae8eba7e89fff4851c5c98001019b17..d426e2f610d3000c69c2b16cba9defb350adfb9f 100644 (file)
@@ -1,11 +1,14 @@
 #include "csqcprojectile.qh"
 
+#include <server/defs.qh>
+#include <server/miscfunctions.qh>
 #include <common/t_items.qh>
 
 #include "../command/common.qh"
 
 #include <common/constants.qh>
-#include <common/weapons/all.qh>
+#include <common/net_linked.qh>
+#include <common/weapons/_all.qh>
 
 .float csqcprojectile_type;
 
@@ -58,7 +61,10 @@ bool CSQCProjectile_SendEntity(entity this, entity to, int sf)
                        WriteByte(MSG_ENTITY, fr);
                }
 
-               WriteByte(MSG_ENTITY, this.realowner.team);
+               if(teamplay)
+                       WriteByte(MSG_ENTITY, this.realowner.team);
+               else
+                       WriteByte(MSG_ENTITY, this.realowner.clientcolors); // NOTE: doesn't work on non-clients
        }
 
        if(sf & 2)
@@ -83,7 +89,7 @@ void CSQCProjectile(entity e, float clientanimate, int type, float docull)
 
        e.csqcprojectile_clientanimate = clientanimate;
 
-       if(e.movetype == MOVETYPE_TOSS || e.movetype == MOVETYPE_BOUNCE)
+       if(e.move_movetype == MOVETYPE_TOSS || e.move_movetype == MOVETYPE_BOUNCE)
        {
                if(e.gravity == 0)
                        e.gravity = 1;
@@ -98,13 +104,13 @@ void CSQCProjectile(entity e, float clientanimate, int type, float docull)
 
 void UpdateCSQCProjectile(entity e)
 {
-       if(e.SendEntity3 == CSQCProjectile_SendEntity)
+       if(getSendEntity(e) == CSQCProjectile_SendEntity)
        {
                // send new origin data
                e.SendFlags |= 0x01;
        }
 // FIXME HACK
-       else if(e.SendEntity3 == ItemSend)
+       else if(getSendEntity(e) == ItemSend)
        {
                ItemUpdate(e);
        }
@@ -113,7 +119,7 @@ void UpdateCSQCProjectile(entity e)
 
 void UpdateCSQCProjectileAfterTeleport(entity e)
 {
-       if(e.SendEntity3 == CSQCProjectile_SendEntity)
+       if(getSendEntity(e) == CSQCProjectile_SendEntity)
        {
                // send new origin data
                e.SendFlags |= 0x01;