X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Flib%2Fnet.qh;h=56c80e02d1b13ca5dcf66105aa597bb7c28d67f3;hb=d492869ab1f18e05121529b7bcffcb637d13994c;hp=86c15ec473e1bcdee8ad4a29891b5f8462ea9194;hpb=c039d054a46888048d214000273ccfc63e4611b6;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/lib/net.qh b/qcsrc/lib/net.qh index 86c15ec47..56c80e02d 100644 --- a/qcsrc/lib/net.qh +++ b/qcsrc/lib/net.qh @@ -98,6 +98,9 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); } .int Version; // deprecated, use SendFlags .int SendFlags; + IntrusiveList g_uncustomizables; + STATIC_INIT(g_uncustomizables) { g_uncustomizables = IL_NEW(); } + void Net_LinkEntity(entity e, bool docull, float dt, bool(entity this, entity to, int sendflags) sendfunc) { if (e.classname == "") e.classname = "net_linked"; @@ -135,11 +138,13 @@ STATIC_INIT(C2S_Protocol_renumber) { FOREACH(C2S_Protocol, true, it.m_id = i); } setcefc(e, customizer); e.uncustomizeentityforclient = uncustomizer; e.uncustomizeentityforclient_set = !!uncustomizer; + if(uncustomizer) + IL_PUSH(g_uncustomizables, e); } void UncustomizeEntitiesRun() { - FOREACH_ENTITY_FLOAT(uncustomizeentityforclient_set, true, it.uncustomizeentityforclient(it)); + IL_EACH(g_uncustomizables, it.uncustomizeentityforclient_set, it.uncustomizeentityforclient(it)); } STRING_ITERATOR(g_buf, string_null, 0); @@ -293,6 +298,7 @@ USING(Stream, int); #define APPROXPASTTIME_RANGE (64 * APPROXPASTTIME_ACCURACY_REQUIREMENT) #ifdef CSQC + float servertime; entity ReadCSQCEntity() { int f = ReadShort(); @@ -308,7 +314,7 @@ USING(Stream, int); #define ReadInt48_t() vec3(ReadInt24_t(), ReadInt24_t(), 0) #define ReadInt72_t() vec3(ReadInt24_t(), ReadInt24_t(), ReadInt24_t()) - int _ReadSByte; + noref int _ReadSByte; #define ReadSByte() (_ReadSByte = ReadByte(), (_ReadSByte & BIT(7) ? -128 : 0) + (_ReadSByte & BITS(7))) #define ReadFloat() ReadCoord() #define ReadVector() vec3(ReadFloat(), ReadFloat(), ReadFloat())