#include "ent_cs.qh"
+// for use in mods
+#define ENTCS_EXTRAPROPS
+
#define ENTCS_SET_NORMAL(var, x) MACRO_BEGIN \
var = x; \
MACRO_END
PROP(true, frags, ENTCS_SET_NORMAL, \
{ WriteShort(chan, ent.frags); }, \
{ ent.frags = ReadShort(); }) \
+ \
+ ENTCS_EXTRAPROPS \
\
/**/
i += 1; \
}
ENTCS_NETPROPS(this, X);
- #undef X
+ #undef X
if (i >= BITS(16 - 1)) LOG_FATAL("Exceeded ENTCS_NETPROPS limit");
}
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)
i += 1; \
}
ENTCS_NETPROPS(this, X);
- #undef X
+ #undef X
return true;
}
i += 1; \
}
ENTCS_NETPROPS(this, X);
- #undef X
+ #undef X
setorigin(this, this.origin); // relink
}
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);
}
i += 1; \
}
ENTCS_NETPROPS(e, X);
- #undef X
+ #undef X
e.iflags |= IFLAG_ORIGIN;
InterpolateOrigin_Note(e);
getthink(e)(e);