.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) { return self.SendEntity3(self, to, sendflags); }
if (dt)
{
e.nextthink = time + dt;
- e.think = SUB_Remove;
+ e.think = SUB_Remove_self;
}
}
#ifdef CSQC
#define REGISTER_NET_LINKED(id) \
- [[accumulate]] NET_HANDLE(id, bool) \
+ [[accumulate]] NET_HANDLE(id, bool isnew) \
{ \
this = self; \
this.sourceLocFile = __FILE__; \
this.sourceLocLine = __LINE__; \
+ if (!this) isnew = true; \
} \
REGISTER(LinkedEntities, NET, id, m_id, new(net_linked_packet)) \
{ \
REGISTRY(LinkedEntities, BITS(8) - 1)
#define LinkedEntities_from(i) _LinkedEntities_from(i, NULL)
REGISTER_REGISTRY(LinkedEntities)
-REGISTRY_SORT(LinkedEntities, 0)
+REGISTRY_SORT(LinkedEntities)
REGISTRY_CHECK(LinkedEntities)
STATIC_INIT(RegisterLinkedEntities_renumber)
{
REGISTRY(TempEntities, BITS(8) - 80)
#define TempEntities_from(i) _TempEntities_from(i, NULL)
REGISTER_REGISTRY(TempEntities)
-REGISTRY_SORT(TempEntities, 0)
+REGISTRY_SORT(TempEntities)
REGISTRY_CHECK(TempEntities)
STATIC_INIT(RegisterTempEntities_renumber)
{