LL_EACH(shownames_ent, true, LAMBDA(
entity entcs = entcs_receiver(i);
if (!entcs) continue;
- WITH(entity, self, entcs, entcs.think());
+ if (entcs.think) WITH(entity, self, entcs, entcs.think());
+ else
+ {
+ LOG_WARNING("entcs.think == null");
+ eprint(entcs);
+ }
if (entcs.m_entcs_private)
{
it.healthvalue = entcs.healthvalue;
(e).pure_data = true; \
} \
while (0)
+#define make_impure(e) \
+ do \
+ { \
+ (e).pure_data = false; \
+ } \
+ while (0)
#define is_pure(e) ((e).pure_data)
.string classname;
STATIC_INIT(clearentity)
{
_clearentity_ent = new(clearentity);
+ make_pure(_clearentity_ent);
}
void clearentity(entity e)
{
#ifdef CSQC
int n = e.entnum;
#endif
+ bool was_pure = is_pure(e);
copyentity(_clearentity_ent, e);
+ if (!was_pure) make_impure(e);
#ifdef CSQC
e.entnum = n;
#endif
#define REGISTRY_RESERVE(registry, fld, id, suffix) do { \
entity e = new(registry_reserved); \
+ make_pure(e); \
e.registered_id = #id "/" #suffix; \
REGISTRY_PUSH(registry, fld, e); \
} while (0)
if(IS_REAL_CLIENT(e))
{
stuffcmd(e, "\nscr_printspeed 1000000\n");
- string list = autocvar_sv_intermission_cdtrack;
- for(string it; (it = car(list)); list = cdr(list))
- RandomSelection_Add(world, 0, it, 1, 1);
- if(RandomSelection_chosen_string && RandomSelection_chosen_string != "")
- stuffcmd(e, strcat("\ncd loop ", RandomSelection_chosen_string, "\n"));
+ FOREACH_WORD(autocvar_sv_intermission_cdtrack, true, LAMBDA(
+ RandomSelection_Add(NULL, 0, it, 1, 1);
+ ));
+ if (RandomSelection_chosen_string != "")
+ {
+ stuffcmd(e, sprintf("\ncd loop %s\n", RandomSelection_chosen_string));
+ }
msg_entity = e;
WriteByte(MSG_ONE, SVC_INTERMISSION);
}