VM_SAFEPARMCOUNT(1, VM_ftoe);
ent = (prvm_int_t)PRVM_G_FLOAT(OFS_PARM0);
- if (ent < 0 || ent >= prog->max_edicts || PRVM_PROG_TO_EDICT(ent)->priv.required->free)
+ if (ent < 0 || ent >= prog->max_edicts || PRVM_PROG_TO_EDICT(ent)->free)
ent = 0; // return world instead of a free or invalid entity
PRVM_G_INT(OFS_RETURN) = ent;
if (developer.integer > 0)
VM_Warning(prog, "VM_remove: tried to remove the null entity or a reserved entity!\n" );
}
- else if( ed->priv.required->free )
+ else if( ed->free )
{
if (developer.integer > 0)
VM_Warning(prog, "VM_remove: tried to remove an already freed entity!\n" );
{
prog->xfunction->builtinsprofile++;
ed = PRVM_EDICT_NUM(e);
- if (ed->priv.required->free)
+ if (ed->free)
continue;
t = PRVM_E_STRING(ed,f);
if (!t)
{
prog->xfunction->builtinsprofile++;
ed = PRVM_EDICT_NUM(e);
- if (ed->priv.required->free)
+ if (ed->free)
continue;
if (PRVM_E_FLOAT(ed,f) == s)
{
for (i = 1;i < prog->num_edicts;i++, ent = PRVM_NEXT_EDICT(ent))
{
prog->xfunction->builtinsprofile++;
- if (ent->priv.required->free)
+ if (ent->free)
continue;
t = PRVM_E_STRING(ent,f);
if (!t)
for (i = 1;i < prog->num_edicts;i++, ent = PRVM_NEXT_EDICT(ent))
{
prog->xfunction->builtinsprofile++;
- if (ent->priv.required->free)
+ if (ent->free)
continue;
if (PRVM_E_FLOAT(ent,f) != s)
continue;
{
prog->xfunction->builtinsprofile++;
ed = PRVM_EDICT_NUM(e);
- if (ed->priv.required->free)
+ if (ed->free)
continue;
if (!PRVM_E_FLOAT(ed,f))
continue;
for (i = 1;i < prog->num_edicts;i++, ent = PRVM_NEXT_EDICT(ent))
{
prog->xfunction->builtinsprofile++;
- if (ent->priv.required->free)
+ if (ent->free)
continue;
if (!PRVM_E_FLOAT(ent,f))
continue;
return;
}
ent = PRVM_EDICT_NUM(i);
- if (!ent->priv.required->free)
+ if (!ent->free)
{
VM_RETURN_EDICT(ent);
return;
}
ent = PRVM_G_EDICT(OFS_PARM1);
- if(ent->priv.required->free)
+ if(ent->free)
{
VM_Warning(prog, "VM_writetofile: %s: entity %i is free !\n", prog->name, PRVM_NUM_FOR_EDICT(ent));
return;
// get the entity
ent = PRVM_G_EDICT(OFS_PARM1);
- if(ent->priv.required->free)
+ if(ent->free)
{
PRVM_G_INT(OFS_RETURN) = PRVM_SetTempString(prog, "");
VM_Warning(prog, "VM_entityfielddata: %s: entity %i is free !\n", prog->name, PRVM_NUM_FOR_EDICT(ent));
// get the entity
ent = PRVM_G_EDICT(OFS_PARM1);
- if(ent->priv.required->free)
+ if(ent->free)
{
VM_Warning(prog, "VM_entityfielddata: %s: entity %i is free !\n", prog->name, PRVM_NUM_FOR_EDICT(ent));
PRVM_G_FLOAT(OFS_RETURN) = 0.0f;
// get edict and test it
ent = PRVM_G_EDICT(OFS_PARM0);
- if (ent->priv.required->free)
+ if (ent->free)
prog->error_cmd("VM_parseentitydata: %s: Can only set already spawned entities (entity %i is free)!", prog->name, PRVM_NUM_FOR_EDICT(ent));
data = PRVM_G_STRING(OFS_PARM1);
VM_Warning(prog, "changeyaw: can not modify world entity\n");
return;
}
- if (ent->priv.server->free)
+ if (ent->free)
{
VM_Warning(prog, "changeyaw: can not modify free entity\n");
return;
VM_Warning(prog, "changepitch: can not modify world entity\n");
return;
}
- if (ent->priv.server->free)
+ if (ent->free)
{
VM_Warning(prog, "changepitch: can not modify free entity\n");
return;
void VM_wasfreed (prvm_prog_t *prog)
{
VM_SAFEPARMCOUNT(1, VM_wasfreed);
- PRVM_G_FLOAT(OFS_RETURN) = PRVM_G_EDICT(OFS_PARM0)->priv.required->free;
+ PRVM_G_FLOAT(OFS_RETURN) = PRVM_G_EDICT(OFS_PARM0)->free;
}
void VM_SetTraceGlobals(prvm_prog_t *prog, const trace_t *trace)
ed = PRVM_G_EDICT(OFS_PARM0);
VectorCopy(PRVM_G_VECTOR(OFS_PARM1), point);
- if (!ed || ed->priv.server->free)
+ if (!ed || ed->free)
return;
model = getmodel(prog, ed);
if (!model || !model->num_surfaces)