having duplicate functions is bad.

This commit is contained in:
Adam Olsen 2001-08-22 05:50:01 +00:00
parent 4a9567cb8d
commit ea063a1e0f
2 changed files with 0 additions and 157 deletions

View file

@ -670,46 +670,6 @@ PF_localcmd (progs_t *pr)
Cbuf_AddText (str);
}
/*
PF_cvar
float cvar (string)
*/
void
PF_cvar (progs_t *pr)
{
const char *str;
str = G_STRING (pr, OFS_PARM0);
G_FLOAT (pr, OFS_RETURN) = Cvar_VariableValue (str);
}
/*
PF_cvar_set
float cvar (string)
*/
void
PF_cvar_set (progs_t *pr)
{
const char *var_name, *val;
cvar_t *var;
var_name = G_STRING (pr, OFS_PARM0);
val = G_STRING (pr, OFS_PARM1);
var = Cvar_FindVar (var_name);
if (!var)
var = Cvar_FindAlias (var_name);
if (!var) {
// FIXME: make Con_DPrint?
Con_Printf ("PF_cvar_set: variable %s not found\n", var_name);
return;
}
Cvar_Set (var, val);
}
/*
PF_findradius
@ -849,30 +809,6 @@ PF_precache_model (progs_t *pr)
}
void
PF_coredump (progs_t *pr)
{
ED_PrintEdicts (pr, "");
}
void
PF_traceon (progs_t *pr)
{
pr->pr_trace = true;
}
void
PF_traceoff (progs_t *pr)
{
pr->pr_trace = false;
}
void
PF_eprint (progs_t *pr)
{
ED_PrintNum (pr, G_EDICTNUM (pr, OFS_PARM0));
}
/*
PF_walkmove
@ -977,31 +913,6 @@ PF_lightstyle (progs_t *pr)
}
}
void
PF_rint (progs_t *pr)
{
float f;
f = G_FLOAT (pr, OFS_PARM0);
if (f > 0)
G_FLOAT (pr, OFS_RETURN) = (int) (f + 0.5);
else
G_FLOAT (pr, OFS_RETURN) = (int) (f - 0.5);
}
void
PF_floor (progs_t *pr)
{
G_FLOAT (pr, OFS_RETURN) = floor (G_FLOAT (pr, OFS_PARM0));
}
void
PF_ceil (progs_t *pr)
{
G_FLOAT (pr, OFS_RETURN) = ceil (G_FLOAT (pr, OFS_PARM0));
}
/*
PF_checkbottom
*/
@ -1028,32 +939,6 @@ PF_pointcontents (progs_t *pr)
G_FLOAT (pr, OFS_RETURN) = SV_PointContents (v);
}
/*
PF_nextent
entity nextent(entity)
*/
void
PF_nextent (progs_t *pr)
{
int i;
edict_t *ent;
i = G_EDICTNUM (pr, OFS_PARM0);
while (1) {
i++;
if (i == sv.num_edicts) {
RETURN_EDICT (pr, sv.edicts);
return;
}
ent = EDICT_NUM (pr, i);
if (!ent->free) {
RETURN_EDICT (pr, ent);
return;
}
}
}
/*
PF_aim

View file

@ -606,46 +606,6 @@ PF_localcmd (progs_t *pr)
Cbuf_AddText (str);
}
/*
PF_cvar
float cvar (string)
*/
void
PF_cvar (progs_t *pr)
{
const char *str;
str = G_STRING (pr, OFS_PARM0);
G_FLOAT (pr, OFS_RETURN) = Cvar_VariableValue (str);
}
/*
PF_cvar_set
float cvar (string)
*/
void
PF_cvar_set (progs_t *pr)
{
const char *var_name, *val;
cvar_t *var;
var_name = G_STRING (pr, OFS_PARM0);
val = G_STRING (pr, OFS_PARM1);
var = Cvar_FindVar (var_name);
if (!var)
var = Cvar_FindAlias (var_name);
if (!var) {
// FIXME: make Con_DPrint?
SV_Printf ("PF_cvar_set: variable %s not found\n", var_name);
return;
}
Cvar_Set (var, val);
}
/*
PF_findradius
@ -1662,7 +1622,6 @@ SV_PR_Cmds_Init ()
PR_AddBuiltin (&sv_pr_state, "checkbottom", PF_checkbottom, 40); // float(entity e) checkbottom = #40
PR_AddBuiltin (&sv_pr_state, "pointcontents", PF_pointcontents, 41); // float(vector v) pointcontents = #41
// no 42
PR_AddBuiltin (&sv_pr_state, "cvar", PF_cvar, 45); // float(string s) cvar = #45
PR_AddBuiltin (&sv_pr_state, "localcmd", PF_localcmd, 46); // void(string s) localcmd = #46
// no 48
PR_AddBuiltin (&sv_pr_state, "changeyaw", PF_changeyaw, 49); // void() ChangeYaw = #49
@ -1692,7 +1651,6 @@ SV_PR_Cmds_Init ()
PR_AddBuiltin (&sv_pr_state, "changelevel", PF_changelevel, 70); // void(string s) changelevel = #70
// 71
PR_AddBuiltin (&sv_pr_state, "cvar_set", PF_cvar_set, 72); // void(string var, string val) cvar_set = #72
PR_AddBuiltin (&sv_pr_state, "centerprint", PF_centerprint, 73); // void(...) centerprint = #73
PR_AddBuiltin (&sv_pr_state, "ambientsound", PF_ambientsound, 74); // void(vector pos, string samp, float vol, float atten) ambientsound = #74