PRVM_serverglobalfloat(trace_dphitcontents) = 0;
PRVM_serverglobalfloat(trace_dphitq3surfaceflags) = 0;
PRVM_serverglobalstring(trace_dphittexturename) = 0;
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(touch);
+ // optional entity parameter for other (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM1) = PRVM_EDICT_TO_PROG(ent);
prog->ExecuteProgram(prog, PRVM_serveredictfunction(touch, touch), "QC function self.touch is missing");
}
PRVM_serveredictfloat(ent, nextthink) = 0;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(ent);
PRVM_serverglobaledict(other) = PRVM_EDICT_TO_PROG(prog->edicts);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(ent);
prog->ExecuteProgram(prog, PRVM_serveredictfunction(ent, think), "QC function self.think is missing");
// mods often set nextthink to time to cause a think every frame,
// we don't want to loop in that case, so exit if the new nextthink is
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(e1);
PRVM_serverglobaledict(other) = PRVM_EDICT_TO_PROG(e2);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(e1);
+ // optional entity parameter for other (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM1) = PRVM_EDICT_TO_PROG(e2);
prog->ExecuteProgram(prog, PRVM_serveredictfunction(e1, touch), "QC function self.touch is missing");
}
PRVM_serverglobalfloat(trace_dphitcontents) = 0;
PRVM_serverglobalfloat(trace_dphitq3surfaceflags) = 0;
PRVM_serverglobalstring(trace_dphittexturename) = 0;
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(e2);
+ // optional entity parameter for other (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM1) = PRVM_EDICT_TO_PROG(e1);
prog->ExecuteProgram(prog, PRVM_serveredictfunction(e2, touch), "QC function self.touch is missing");
}
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(pusher);
PRVM_serverglobaledict(other) = PRVM_EDICT_TO_PROG(check);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(pusher);
+ // optional entity parameter for other (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM1) = PRVM_EDICT_TO_PROG(check);
prog->ExecuteProgram(prog, PRVM_serveredictfunction(pusher, blocked), "QC function self.blocked is missing");
}
break;
static void SV_Physics_Pusher (prvm_edict_t *ent)
{
prvm_prog_t *prog = SVVM_prog;
- float thinktime, oldltime, movetime;
+ double thinktime, oldltime, movetime;
oldltime = PRVM_serveredictfloat(ent, ltime);
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(ent);
PRVM_serverglobaledict(other) = PRVM_EDICT_TO_PROG(prog->edicts);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(ent);
prog->ExecuteProgram(prog, PRVM_serveredictfunction(ent, think), "QC function self.think is missing");
}
}
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobalfloat(frametime) = 0;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(ent);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(ent);
prog->ExecuteProgram(prog, PRVM_serverfunction(PlayerPreThink), "QC function PlayerPreThink is missing");
PRVM_serverglobalfloat(frametime) = sv.frametime;
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobalfloat(frametime) = 0;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(ent);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(ent);
prog->ExecuteProgram(prog, PRVM_serverfunction(PlayerPostThink), "QC function PlayerPostThink is missing");
PRVM_serverglobalfloat(frametime) = sv.frametime;
// call standard client pre-think
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(ent);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(ent);
prog->ExecuteProgram(prog, PRVM_serverfunction(PlayerPreThink), "QC function PlayerPreThink is missing");
// make sure the velocity is still sane (not a NaN)
// call standard player post-think
PRVM_serverglobalfloat(time) = sv.time;
PRVM_serverglobaledict(self) = PRVM_EDICT_TO_PROG(ent);
+ // optional entity parameter for self (EXT_ENTITYPARAM)
+ PRVM_G_INT(OFS_PARM0) = PRVM_EDICT_TO_PROG(ent);
prog->ExecuteProgram(prog, PRVM_serverfunction(PlayerPostThink), "QC function PlayerPostThink is missing");
// make sure the velocity is still sane (not a NaN)