LL_EACH(shownames_ent, true, LAMBDA(
entity entcs = entcs_receiver(i);
if (!entcs) continue;
+ WITH(entity, self, entcs, entcs.think());
if (entcs.m_entcs_private)
{
it.healthvalue = entcs.healthvalue;
void entcs_think()
{
SELFPARAM();
- this.nextthink = time;
entity e = CSQCModel_server2csqc(this.sv_entnum);
- bool exists = e != NULL;
- if (exists)
+ if (e == NULL)
{
- this.has_origin = true;
- this.origin = e.origin;
- // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it
- if (this.model != e.model)
- {
- if (this.model) strunzone(this.model);
- this.model = strzone(e.model);
- }
+ this.has_origin = this.has_sv_origin;
+ return;
}
- else
+ this.has_origin = true;
+ this.origin = e.origin;
+ // `cl_forceplayermodels 1` sounds will be wrong until the player has been in the PVS, but so be it
+ if (this.model != e.model)
{
- this.has_origin = this.has_sv_origin;
+ if (this.model) strunzone(this.model);
+ this.model = strzone(e.model);
}
}
this.classname = "entcs_receiver";
this.entremove = Ent_RemoveEntCS;
this.think = entcs_think;
- this.nextthink = time;
}
InterpolateOrigin_Undo(this);
int sf = ReadShort();
entcs_receiver(this.sv_entnum, this);
this.iflags |= IFLAG_ORIGIN;
InterpolateOrigin_Note(this);
+ this.think();
return true;
}