X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fweapons%2Fcsqcprojectile.qc;h=507fc4a413b792d6d5450d3591c6442c6d438036;hb=7bae88d09fbd53cce732e31633aea92671b43699;hp=11daf4cc22ac8598a413b2d926f2f5b5e520ca2e;hpb=d6e1aa437e7eb8e182053cf17231597e79df0f81;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/weapons/csqcprojectile.qc b/qcsrc/server/weapons/csqcprojectile.qc index 11daf4cc2..507fc4a41 100644 --- a/qcsrc/server/weapons/csqcprojectile.qc +++ b/qcsrc/server/weapons/csqcprojectile.qc @@ -1,6 +1,16 @@ +#include "csqcprojectile.qh" +#include "../_all.qh" + +#include "../t_items.qh" + +#include "../command/common.qh" + +#include "../../common/constants.qh" +#include "../../common/weapons/all.qh" + .float csqcprojectile_type; -float CSQCProjectile_SendEntity(entity to, float sf) +bool CSQCProjectile_SendEntity(entity to, int sf) { float ft, fr; @@ -30,15 +40,15 @@ float CSQCProjectile_SendEntity(entity to, float sf) if(sf & 1) { - WriteCoord(MSG_ENTITY, self.origin_x); - WriteCoord(MSG_ENTITY, self.origin_y); - WriteCoord(MSG_ENTITY, self.origin_z); + WriteCoord(MSG_ENTITY, self.origin.x); + WriteCoord(MSG_ENTITY, self.origin.y); + WriteCoord(MSG_ENTITY, self.origin.z); if(sf & 0x80) { - WriteCoord(MSG_ENTITY, self.velocity_x); - WriteCoord(MSG_ENTITY, self.velocity_y); - WriteCoord(MSG_ENTITY, self.velocity_z); + WriteCoord(MSG_ENTITY, self.velocity.x); + WriteCoord(MSG_ENTITY, self.velocity.y); + WriteCoord(MSG_ENTITY, self.velocity.z); if(sf & 0x10) WriteCoord(MSG_ENTITY, self.gravity); } @@ -48,12 +58,14 @@ float CSQCProjectile_SendEntity(entity to, float sf) WriteByte(MSG_ENTITY, ft); WriteByte(MSG_ENTITY, fr); } + + WriteByte(MSG_ENTITY, self.realowner.team); } if(sf & 2) WriteByte(MSG_ENTITY, self.csqcprojectile_type); // TODO maybe put this into sf? - return 1; + return true; } .vector csqcprojectile_oldorigin; @@ -66,7 +78,7 @@ void CSQCProjectile_Check(entity e) e.csqcprojectile_oldorigin = e.origin; } -void CSQCProjectile(entity e, float clientanimate, float type, float docull) +void CSQCProjectile(entity e, float clientanimate, int type, float docull) { Net_LinkEntity(e, docull, 0, CSQCProjectile_SendEntity);