1 float CSQCProjectile_SendEntity(entity to, float sf)
5 if(self.csqcprojectile_clientanimate)
6 sf |= 0x80; // client animated, not interpolated
8 if((self.scale != 0 && self.scale != 1) || self.effects != 0)
9 sf |= 0x40; // scale used
11 WriteByte(MSG_ENTITY, ENT_CLIENT_PROJECTILE);
12 WriteByte(MSG_ENTITY, sf);
16 WriteCoord(MSG_ENTITY, self.origin_x);
17 WriteCoord(MSG_ENTITY, self.origin_y);
18 WriteCoord(MSG_ENTITY, self.origin_z);
22 WriteCoord(MSG_ENTITY, self.velocity_x);
23 WriteCoord(MSG_ENTITY, self.velocity_y);
24 WriteCoord(MSG_ENTITY, self.velocity_z);
25 WriteCoord(MSG_ENTITY, self.gravity);
31 WriteShort(MSG_ENTITY, self.modelindex);
34 WriteByte(MSG_ENTITY, bound(0, self.scale / 16.0, 255));
35 WriteShort(MSG_ENTITY, self.effects & 65535);
36 WriteByte(MSG_ENTITY, floor(self.effects / 65536));
38 WriteShort(MSG_ENTITY, self.csqcprojectile_flysound);
39 WriteByte(MSG_ENTITY, 0); // size category
45 void CSQCProjectile(entity e)
47 e.SendEntity = CSQCProjectile_SendEntity;
50 void UpdateCSQCProjectile(entity e)
52 if(e.SendEntity == CSQCProjectile_SendEntity)
53 e.SendFlags |= 1; // send new origin data