6 .bool(entity to, int sendflags) SendEntity;
8 void Net_LinkEntity(entity e, bool docull, float dt, bool(entity to, int sendflags) sendfunc)
10 if (!e.classname) e.classname = "net_linked";
12 if (!e.model || !self.modelindex) {
19 e.SendEntity = sendfunc;
20 e.SendFlags = 0xFFFFFF;
22 if (!docull) e.effects |= EF_NODEPTHTEST;
25 e.nextthink = time + dt;
30 .void() uncustomizeentityforclient;
31 .float uncustomizeentityforclient_set;
33 void SetCustomizer(entity e, float(void) customizer, void(void) uncustomizer)
35 e.customizeentityforclient = customizer;
36 e.uncustomizeentityforclient = uncustomizer;
37 e.uncustomizeentityforclient_set = !!uncustomizer;
40 void UncustomizeEntitiesRun()
42 for (entity e = NULL; (e = findfloat(e, uncustomizeentityforclient_set, 1)); ) {
43 WITH(entity, self, e, e.uncustomizeentityforclient());
49 #include "registry.qh"
56 .void(entity this, bool isNew) m_read;
59 #define REGISTER_LINKED(id, param) \
60 void Ent_Read##id(entity this, param) { this = self; } \
61 REGISTER(RegisterLinked, Linked, Linked, Linked_COUNT, id, m_id, spawn()) { \
63 this.m_read = Ent_Read##id; \
65 [[accumulate]] void Ent_Read##id(entity this, param)
67 #define REGISTER_LINKED(id, param) \
68 REGISTER(RegisterLinked, Linked, Linked, Linked_COUNT, id, m_id, spawn()) { \
73 REGISTER_REGISTRY(RegisterLinked)
74 REGISTRY_SORT(Linked, netname, 0)
75 STATIC_INIT(RegisterLinked_renumber) {
76 for (int i = 0; i < Linked_COUNT; ++i) {
77 Linked[i].m_id = 100 + i;