X-Git-Url: https://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fcommon%2Fent_cs.qc;h=f50f03b5f79dfa8a1cfb89e9c9f2cd2347a19268;hb=64b9c27175c86421b243e76e89a6ef4925a75414;hp=5a5c6acbebfefced8df45a82313944e36e49d496;hpb=599624ecf86d1ca148e2292f16a3b1f7d1010800;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/common/ent_cs.qc b/qcsrc/common/ent_cs.qc index 5a5c6acbe..f50f03b5f 100644 --- a/qcsrc/common/ent_cs.qc +++ b/qcsrc/common/ent_cs.qc @@ -1,5 +1,8 @@ #include "ent_cs.qh" +// for use in mods +#define ENTCS_EXTRAPROPS + #define ENTCS_SET_NORMAL(var, x) MACRO_BEGIN \ var = x; \ MACRO_END @@ -48,6 +51,8 @@ MACRO_END PROP(true, frags, ENTCS_SET_NORMAL, \ { WriteShort(chan, ent.frags); }, \ { ent.frags = ReadShort(); }) \ + \ + ENTCS_EXTRAPROPS \ \ /**/ @@ -64,7 +69,7 @@ MACRO_END i += 1; \ } ENTCS_NETPROPS(this, X); - #undef X + #undef X if (i >= BITS(16 - 1)) LOG_FATAL("Exceeded ENTCS_NETPROPS limit"); } @@ -73,16 +78,15 @@ MACRO_END entity player = this.owner; sf |= BIT(0); // assume private do { - if (!(IS_PLAYER(player))) + if (IS_PLAYER(player)) { - sf &= ENTCS_PUBLICMASK; // no private updates - break; + if (radar_showennemies) break; + if (SAME_TEAM(to, player)) break; + if (!(IS_PLAYER(to) || to.caplayer) && time > game_starttime) break; } - if (radar_showennemies) break; - if (SAME_TEAM(to, player)) break; - if (!(IS_PLAYER(to) || to.caplayer) && time > game_starttime) break; sf &= ENTCS_PUBLICMASK; // no private updates } while (0); + sf |= this.m_forceupdate; this.m_forceupdate = 0; if (chan == MSG_ENTITY) @@ -99,7 +103,7 @@ MACRO_END i += 1; \ } ENTCS_NETPROPS(this, X); - #undef X + #undef X return true; } @@ -121,7 +125,7 @@ MACRO_END i += 1; \ } ENTCS_NETPROPS(this, X); - #undef X + #undef X setorigin(this, this.origin); // relink } @@ -155,6 +159,10 @@ MACRO_END int n = this.sv_entnum; entity e = entcs_receiver(n); entcs_receiver(n, NULL); + if (e.netname) strunzone(e.netname); + e.netname = string_null; + if (e.model) strunzone(e.model); + e.model = string_null; if (e != this) delete(e); } @@ -213,7 +221,7 @@ MACRO_END i += 1; \ } ENTCS_NETPROPS(e, X); - #undef X + #undef X e.iflags |= IFLAG_ORIGIN; InterpolateOrigin_Note(e); getthink(e)(e);