bool CSQCModel_Send(entity this, entity to, int sf)
{
// some nice flags for CSQCMODEL_IF
- float isplayer = (IS_CLIENT(this));
- float islocalplayer = (this == to);
- float isnolocalplayer = (isplayer && (this != to));
-
- unused_float = isplayer;
- unused_float = islocalplayer;
- unused_float = isnolocalplayer;
+ noref bool isplayer = IS_CLIENT(this);
+ noref bool islocalplayer = (this == to);
+ noref bool isnolocalplayer = (isplayer && (this != to));
WriteHeader(MSG_ENTITY, ENT_CLIENT_MODEL);
WriteInt24_t(MSG_ENTITY, sf);
+ WriteByte(MSG_ENTITY, isplayer);
#define CSQCMODEL_IF(cond) if(cond) {
#define CSQCMODEL_ENDIF }
void CSQCModel_CheckUpdate(entity e)
{
// some nice flags for CSQCMODEL_IF
- float isplayer = (IS_CLIENT(e));
+ float isplayer = IS_CLIENT(e);
float islocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
float isnolocalplayer = isplayer; // we set BOTH to 1 here as we need the sendflags
void CSQCModel_LinkEntity(entity e)
{
- e.SendEntity3 = CSQCModel_Send;
e.SendEntity = SendEntity_self;
+ e.SendEntity3 = CSQCModel_Send;
e.SendFlags = 0xFFFFFF;
CSQCModel_CheckUpdate(e);
}
void CSQCModel_UnlinkEntity(entity e)
{
+ e.SendEntity = func_null;
e.SendEntity3 = func_null;
}