bool WarpZone_Teleported_Send(entity to, int sf)
{SELFPARAM();
- WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_WARPZONE_TELEPORTED);
WriteCoord(MSG_ENTITY, self.angles.x);
WriteCoord(MSG_ENTITY, self.angles.y);
WriteCoord(MSG_ENTITY, self.angles.z);
// instead of fixangle, send the transform to the client for smoother operation
player.fixangle = false;
- entity ts = spawn();
+ entity ts = new(warpzone_teleported);
setmodel(ts, MDL_Null);
ts.SendEntity = WarpZone_Teleported_Send;
ts.SendFlags = 0xFFFFFF;
ts.owner = player;
ts.enemy = wz;
ts.effects = EF_NODEPTHTEST;
- ts.classname = "warpzone_teleported";
ts.angles = wz.warpzone_transform;
}
#endif
bool WarpZone_Send(entity to, int sendflags)
{SELFPARAM();
- WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_WARPZONE);
// we must send this flag for clientside to match properly too
int f = 0;
bool WarpZone_Camera_Send(entity to, int sendflags)
{SELFPARAM();
int f = 0;
- WriteByte(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);
+ WriteHeader(MSG_ENTITY, ENT_CLIENT_WARPZONE_CAMERA);
if(self.warpzone_fadestart)
BITSET_ASSIGN(f, 2);