X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fcsqcprojectile.qc;h=5352b40cde1a8fa1afb3b6058d36a48a3ea0b6cf;hb=e51ce3d45d2852ca793118fc73da9c25f789101f;hp=7e7478e9b8ea8aedd9e71f0b49f839084849bf93;hpb=fc15d72b041c9a748b605ba28735380fbe5b5b01;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index 7e7478e9b..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) @@ -83,7 +85,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;