.int Version; // deprecated, use SendFlags
.int SendFlags;
- .bool(entity to, int sendflags) SendEntity;
- /** return false to remove from the client */
- .bool(entity this, entity to, int sendflags) SendEntity3;
-
- bool SendEntity_self(entity to, int sendflags) { SELFPARAM(); return this.SendEntity3(this, to, sendflags); }
void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc)
{
setsize(e, mi, ma);
}
- e.SendEntity = SendEntity_self;
- e.SendEntity3 = sendfunc;
+ setSendEntity(e, sendfunc);
e.SendFlags = 0xFFFFFF;
if (!docull) e.effects |= EF_NODEPTHTEST;
void Net_UnlinkEntity(entity e)
{
- e.SendEntity = func_null;
+ setSendEntity(e, func_null);
}
- .void() uncustomizeentityforclient;
+ .void(entity this) uncustomizeentityforclient;
.float uncustomizeentityforclient_set;
- void SetCustomizer(entity e, float() customizer, void() uncustomizer)
+ void SetCustomizer(entity e, bool(entity this) customizer, void(entity this) uncustomizer)
{
- e.customizeentityforclient = customizer;
+ setcefc(e, customizer);
e.uncustomizeentityforclient = uncustomizer;
e.uncustomizeentityforclient_set = !!uncustomizer;
}
void UncustomizeEntitiesRun()
{
- FOREACH_ENTITY_FLOAT(uncustomizeentityforclient_set, true, WITHSELF(it, it.uncustomizeentityforclient()));
+ FOREACH_ENTITY_FLOAT(uncustomizeentityforclient_set, true, it.uncustomizeentityforclient(it));
}
STRING_ITERATOR(g_buf, string_null, 0);