X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fcsqcprojectile.qc;h=758cd51ab33163d8c1265810218a316c24285235;hb=dc02e4d78fb0e67b47a0c1e150b4c18c0711b8bf;hp=a8a893e217700750b4364106ba7fd6065ac3ae8f;hpb=e424ba544c41fc40b241b17bd7c1d9c2fc930705;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index a8a893e21..758cd51ab 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -1,10 +1,14 @@ #include "csqcprojectile.qh" -#include +#include +#include +#include +#include #include "../command/common.qh" #include +#include #include .float csqcprojectile_type; @@ -39,15 +43,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 +58,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)