1 float Casing_SendEntity(entity to, float sf)
3 WriteByte(MSG_ENTITY, ENT_CLIENT_CASING);
4 WriteByte(MSG_ENTITY, self.state); // actually type
5 WriteCoord(MSG_ENTITY, self.origin_x);
6 WriteCoord(MSG_ENTITY, self.origin_y);
7 WriteCoord(MSG_ENTITY, self.origin_z);
8 WriteShort(MSG_ENTITY, self.oldorigin_x); // acrually compressed velocity
9 WriteByte(MSG_ENTITY, self.angles_x * 256 / 360);
10 WriteByte(MSG_ENTITY, self.angles_y * 256 / 360);
11 WriteByte(MSG_ENTITY, self.angles_z * 256 / 360);
15 void SpawnCasing(vector org, vector vel, float randomvel, vector ang, vector avel, float randomavel, float casingtype)
25 e.oldorigin_x = compressShortVector(e.velocity);
28 e.SendEntity = Casing_SendEntity;
30 e.nextthink = time + 0.2;
32 // 0.2s should be enough time for all clients to receive this ent once, do the gibbage and be done with it