model->type == mod_alias
:
(
- (((unsigned char)PRVM_EDICTFIELDFLOAT(ent, prog->fieldoffsets.pflags)) & PFLAGS_FULLDYNAMIC)
+ (((unsigned char)PRVM_serveredictfloat(ent, pflags)) & PFLAGS_FULLDYNAMIC)
||
((gamemode == GAME_TENEBRAE) && ((unsigned int)ent->fields.server->effects & (16 | 32)))
)
{
if (passedict)
{
- int dphitcontentsmask = (int)PRVM_EDICTFIELDFLOAT(passedict, prog->fieldoffsets.dphitcontentsmask);
+ int dphitcontentsmask = (int)PRVM_serveredictfloat(passedict, dphitcontentsmask);
if (dphitcontentsmask)
return dphitcontentsmask;
else if (passedict->fields.server->solid == SOLID_SLIDEBOX)
VectorSet (prog->globals.server->trace_plane_normal, 0, 0, 1);
prog->globals.server->trace_plane_dist = 0;
prog->globals.server->trace_ent = PRVM_EDICT_TO_PROG(ent);
- PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.trace_dpstartcontents) = 0;
- PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.trace_dphitcontents) = 0;
- PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.trace_dphitq3surfaceflags) = 0;
- PRVM_GLOBALFIELDSTRING(prog->globaloffsets.trace_dphittexturename) = 0;
+ PRVM_serverglobalfloat(trace_dpstartcontents) = 0;
+ PRVM_serverglobalfloat(trace_dphitcontents) = 0;
+ PRVM_serverglobalfloat(trace_dphitq3surfaceflags) = 0;
+ PRVM_serverglobalstring(trace_dphittexturename) = 0;
PRVM_ExecuteProgram (touch->fields.server->touch, "QC function self.touch is missing");
}
if(ent->fields.server->watertype != nContents)
{ // Changed Contents
// Acquire Contents Transition Function from QC
- if(PRVM_EDICTFIELDFUNCTION(ent, prog->fieldoffsets.contentstransition))
+ if(PRVM_serveredictfunction(ent, contentstransition))
{ // Valid Function; Execute
// Assign Valid Function
bValidFunctionCall = true;
// Assign Self
prog->globals.server->self = PRVM_EDICT_TO_PROG(ent);
// Execute VM Function
- PRVM_ExecuteProgram(PRVM_EDICTFIELDFUNCTION(ent, prog->fieldoffsets.contentstransition), "contentstransition: NULL function");
+ PRVM_ExecuteProgram(PRVM_serveredictfunction(ent, contentstransition), "contentstransition: NULL function");
}
}
VectorNegate(trace->plane.normal, prog->globals.server->trace_plane_normal);
prog->globals.server->trace_plane_dist = -trace->plane.dist;
prog->globals.server->trace_ent = PRVM_EDICT_TO_PROG(e1);
- PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.trace_dpstartcontents) = 0;
- PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.trace_dphitcontents) = 0;
- PRVM_GLOBALFIELDFLOAT(prog->globaloffsets.trace_dphitq3surfaceflags) = 0;
- PRVM_GLOBALFIELDSTRING(prog->globaloffsets.trace_dphittexturename) = 0;
+ PRVM_serverglobalfloat(trace_dpstartcontents) = 0;
+ PRVM_serverglobalfloat(trace_dphitcontents) = 0;
+ PRVM_serverglobalfloat(trace_dphitq3surfaceflags) = 0;
+ PRVM_serverglobalstring(trace_dphittexturename) = 0;
PRVM_ExecuteProgram (e2->fields.server->touch, "QC function self.touch is missing");
}
{
float ent_gravity;
- ent_gravity = PRVM_EDICTFIELDFLOAT(ent, prog->fieldoffsets.gravity);
+ ent_gravity = PRVM_serveredictfloat(ent, gravity);
if (!ent_gravity)
ent_gravity = 1.0f;
return ent_gravity * sv_gravity.value * sv.frametime;
if (ent->fields.server->movetype == MOVETYPE_BOUNCEMISSILE)
{
float bouncefactor;
- bouncefactor = PRVM_EDICTFIELDFLOAT(ent, prog->fieldoffsets.bouncefactor);
+ bouncefactor = PRVM_serveredictfloat(ent, bouncefactor);
if (!bouncefactor)
bouncefactor = 1.0f;
float bouncefactor;
float bouncestop;
- bouncefactor = PRVM_EDICTFIELDFLOAT(ent, prog->fieldoffsets.bouncefactor);
+ bouncefactor = PRVM_serveredictfloat(ent, bouncefactor);
if (!bouncefactor)
bouncefactor = 0.5f;
- bouncestop = PRVM_EDICTFIELDFLOAT(ent, prog->fieldoffsets.bouncestop);
+ bouncestop = PRVM_serveredictfloat(ent, bouncestop);
if (!bouncestop)
bouncestop = 60.0f / 800.0f;
ClipVelocity (ent->fields.server->velocity, trace.plane.normal, ent->fields.server->velocity, 1 + bouncefactor);
- ent_gravity = PRVM_EDICTFIELDFLOAT(ent, prog->fieldoffsets.gravity);
+ ent_gravity = PRVM_serveredictfloat(ent, gravity);
if (!ent_gravity)
ent_gravity = 1.0f;
// LordHavoc: fixed grenades not bouncing when fired down a slope
if (hitsound && (int)ent->fields.server->flags & FL_ONGROUND)
{
// DRESK - Check for Entity Land Event Function
- if(PRVM_EDICTFIELDFUNCTION(ent, prog->fieldoffsets.movetypesteplandevent))
+ if(PRVM_serveredictfunction(ent, movetypesteplandevent))
{ // Valid Function; Execute
// Prepare Parameters
// Assign Velocity at Impact
// Assign Self
prog->globals.server->self = PRVM_EDICT_TO_PROG(ent);
// Execute VM Function
- PRVM_ExecuteProgram(PRVM_EDICTFIELDFUNCTION(ent, prog->fieldoffsets.movetypesteplandevent), "movetypesteplandevent: NULL function");
+ PRVM_ExecuteProgram(PRVM_serveredictfunction(ent, movetypesteplandevent), "movetypesteplandevent: NULL function");
}
else
// Check for Engine Landing Sound