X-Git-Url: http://de.git.xonotic.org/?p=xonotic%2Fxonotic-data.pk3dir.git;a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fcsqcprojectile.qc;h=5352b40cde1a8fa1afb3b6058d36a48a3ea0b6cf;hp=caa367e5d708ac96ef0f047a7fb3f1fdeac299c0;hb=af43b181a15f348a4de2045b716ebc7765ce8f9f;hpb=12354d764a576f55a290ba11d9f34ccf4e3930d0 diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index caa367e5d..5352b40cd 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -1,11 +1,14 @@ #include "csqcprojectile.qh" +#include +#include #include #include "../command/common.qh" #include -#include +#include +#include .float csqcprojectile_type; @@ -39,15 +42,11 @@ bool CSQCProjectile_SendEntity(entity this, entity to, int sf) if(sf & 1) { - WriteCoord(MSG_ENTITY, this.origin.x); - WriteCoord(MSG_ENTITY, this.origin.y); - WriteCoord(MSG_ENTITY, this.origin.z); + WriteVector(MSG_ENTITY, this.origin); if(sf & 0x80) { - WriteCoord(MSG_ENTITY, this.velocity.x); - WriteCoord(MSG_ENTITY, this.velocity.y); - WriteCoord(MSG_ENTITY, this.velocity.z); + WriteVector(MSG_ENTITY, this.velocity); if(sf & 0x10) WriteCoord(MSG_ENTITY, this.gravity); } @@ -58,7 +57,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)