1 .float csqcprojectile_type;
3 float CSQCProjectile_SendEntity(entity to, float sf)
7 if(self.csqcprojectile_clientanimate)
8 sf |= 0x80; // client animated, not interpolated
10 if(self.flags & FL_ONGROUND)
13 WriteByte(MSG_ENTITY, ENT_CLIENT_PROJECTILE);
14 WriteByte(MSG_ENTITY, sf);
18 WriteCoord(MSG_ENTITY, self.origin_x);
19 WriteCoord(MSG_ENTITY, self.origin_y);
20 WriteCoord(MSG_ENTITY, self.origin_z);
24 WriteCoord(MSG_ENTITY, self.velocity_x);
25 WriteCoord(MSG_ENTITY, self.velocity_y);
26 WriteCoord(MSG_ENTITY, self.velocity_z);
27 WriteCoord(MSG_ENTITY, self.gravity);
32 WriteByte(MSG_ENTITY, self.csqcprojectile_type); // TODO maybe put this into sf?
37 .vector csqcprojectile_oldorigin;
38 void CSQCProjectile_Check(entity e)
40 if(e.csqcprojectile_clientanimate)
41 if(e.flags & FL_ONGROUND)
42 if(e.origin != e.csqcprojectile_oldorigin)
43 UpdateCSQCProjectile(e);
44 e.csqcprojectile_oldorigin = e.origin;
47 void CSQCProjectile(entity e, float clientanimate, float type, float docull)
49 Net_LinkEntity(e, docull, 0, CSQCProjectile_SendEntity);
51 e.csqcprojectile_clientanimate = clientanimate;
53 if(e.movetype == MOVETYPE_TOSS || e.movetype == MOVETYPE_BOUNCE)
61 e.csqcprojectile_type = type;
64 void UpdateCSQCProjectile(entity e)
66 if(e.SendEntity == CSQCProjectile_SendEntity)
68 // send new origin data
73 void UpdateCSQCProjectileNextFrame(entity e)
75 if(e.SendEntity == CSQCProjectile_SendEntity)
77 // send new origin data
78 e.NextFrameSendFlags |= 1;