More diff noise reductions. yay!

This commit is contained in:
Adam Olsen 2001-07-15 01:48:03 +00:00
parent ac46e5b49d
commit 155b46b8c8
12 changed files with 229 additions and 324 deletions

View file

@ -80,7 +80,7 @@ COM_Init (void)
registered = Cvar_Get ("registered", "0", CVAR_NONE, NULL,
"Is the game the registered version. 1 yes 0 no");
cmdline = Cvar_Get ("cmdline", "0", CVAR_SERVERINFO, Cvar_Info, "None");
Cmd_AddCommand ("path", COM_Path_f, "No Description");
Cmd_AddCommand ("path", COM_Path_f, "Show what paths Quake is using");
COM_Filesystem_Init_Cvars ();
COM_Filesystem_Init ();

View file

@ -257,7 +257,7 @@ Key_Console (int key)
else if ((cls.state >= ca_connected && cl_chatmode->int_val == 2)
|| cl_chatmode->int_val == 1) {
if (cls.state < ca_connected) // can happen if cl_chatmode
// is 1
// is 1
goto no_lf; // the text goes to /dev/null :)
// convert to a chat message

View file

@ -37,13 +37,10 @@
#define STEPSIZE 18
/*
=============
SV_CheckBottom
SV_CheckBottom
Returns false if any part of the bottom of the entity is off an edge that
is not a staircase.
=============
Returns false if any part of the bottom of the entity is off an edge that
is not a staircase.
*/
int c_yes, c_no;
@ -110,14 +107,12 @@ SV_CheckBottom (edict_t *ent)
/*
=============
SV_movestep
SV_movestep
Called by monster program code.
The move will be adjusted for slopes and stairs, but if the move isn't
possible, no move is done, false is returned, and
pr_global_struct->trace_normal is set to the normal of the blocking wall
=============
Called by monster program code.
The move will be adjusted for slopes and stairs, but if the move isn't
possible, no move is done, false is returned, and
pr_global_struct->trace_normal is set to the normal of the blocking wall
*/
qboolean
SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
@ -147,8 +142,7 @@ SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
neworg[2] += 8;
}
trace =
SV_Move (SVFIELD (ent, origin, vector), SVFIELD (ent, mins, vector), SVFIELD (ent, maxs, vector), neworg,
false, ent);
SV_Move (SVFIELD (ent, origin, vector), SVFIELD (ent, mins, vector), SVFIELD (ent, maxs, vector), neworg, false, ent);
if (trace.fraction == 1) {
if (((int) SVFIELD (ent, flags, float) & FL_SWIM)
@ -201,9 +195,9 @@ SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
if (!SV_CheckBottom (ent)) {
if ((int) SVFIELD (ent, flags, float) & FL_PARTIALGROUND) { // entity had floor
// mostly pulled out
// from underneath it
// and is trying to correct
// mostly pulled out
// from underneath it
// and is trying to correct
if (relink)
SV_LinkEdict (ent, true);
return true;
@ -228,13 +222,10 @@ SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
//============================================================================
/*
======================
SV_StepDirection
SV_StepDirection
Turns to the movement direction, and walks the current distance if
facing it.
======================
Turns to the movement direction, and walks the current distance if
facing it.
*/
qboolean
SV_StepDirection (edict_t *ent, float yaw, float dist)
@ -254,7 +245,7 @@ SV_StepDirection (edict_t *ent, float yaw, float dist)
if (SV_movestep (ent, move, false)) {
delta = SVFIELD (ent, angles, vector)[YAW] - SVFIELD (ent, ideal_yaw, float);
if (delta > 45 && delta < 315) { // not turned far enough, so
// don't take the step
// don't take the step
VectorCopy (oldorigin, SVFIELD (ent, origin, vector));
}
SV_LinkEdict (ent, true);
@ -266,10 +257,7 @@ SV_StepDirection (edict_t *ent, float yaw, float dist)
}
/*
======================
SV_FixCheckBottom
======================
SV_FixCheckBottom
*/
void
SV_FixCheckBottom (edict_t *ent)
@ -282,10 +270,7 @@ SV_FixCheckBottom (edict_t *ent)
/*
================
SV_NewChaseDir
================
SV_NewChaseDir
*/
#define DI_NODIR -1
void
@ -366,10 +351,7 @@ SV_NewChaseDir (edict_t *actor, edict_t *enemy, float dist)
}
/*
======================
SV_CloseEnough
======================
SV_CloseEnough
*/
qboolean
SV_CloseEnough (edict_t *ent, edict_t *goal, float dist)
@ -386,21 +368,14 @@ SV_CloseEnough (edict_t *ent, edict_t *goal, float dist)
}
/*
======================
SV_MoveToGoal
======================
SV_MoveToGoal
*/
void
SV_MoveToGoal (progs_t * pr)
SV_MoveToGoal (progs_t *pr)
{
edict_t *ent, *goal;
float dist;
#ifdef QUAKE2
edict_t *enemy;
#endif
ent = PROG_TO_EDICT (pr, *pr->globals.self);
goal = PROG_TO_EDICT (pr, SVFIELD (ent, goalentity, entity));
dist = G_FLOAT (pr, OFS_PARM0);
@ -410,13 +385,8 @@ SV_MoveToGoal (progs_t * pr)
return;
}
// if the next step hits the enemy, return immediately
#ifdef QUAKE2
enemy = PROG_TO_EDICT (pr->, SVFIELD (ent, enemy, entity));
if (enemy != sv.edicts && SV_CloseEnough (ent, enemy, dist))
#else
if (PROG_TO_EDICT (pr, SVFIELD (ent, enemy, entity)) != sv.edicts
&& SV_CloseEnough (ent, goal, dist))
#endif
return;
// bump around...

View file

@ -125,7 +125,7 @@ PR_Profile_f (void)
}
static int
parse_field (progs_t * pr, char *key, char *value)
parse_field (progs_t *pr, char *key, char *value)
{
return 0;
}
@ -142,142 +142,137 @@ SV_LoadProgs (void)
sv_globals.self = sv_pr_state.globals.self;
sv_globals.time = sv_pr_state.globals.time;
(void *) sv_globals.self = PR_GetGlobalPointer (&sv_pr_state, "self");
(void *) sv_globals.other = PR_GetGlobalPointer (&sv_pr_state, "other");
(void *) sv_globals.world = PR_GetGlobalPointer (&sv_pr_state, "world");
(void *) sv_globals.time = PR_GetGlobalPointer (&sv_pr_state, "time");
(void *) sv_globals.frametime = PR_GetGlobalPointer (&sv_pr_state, "frametime");
(void *) sv_globals.force_retouch = PR_GetGlobalPointer (&sv_pr_state, "force_retouch");
(void *) sv_globals.mapname = PR_GetGlobalPointer (&sv_pr_state, "mapname");
(void *) sv_globals.deathmatch = PR_GetGlobalPointer (&sv_pr_state, "deathmatch");
(void *) sv_globals.coop = PR_GetGlobalPointer (&sv_pr_state, "coop");
(void *) sv_globals.teamplay = PR_GetGlobalPointer (&sv_pr_state, "teamplay");
(void *) sv_globals.serverflags = PR_GetGlobalPointer (&sv_pr_state, "serverflags");
(void *) sv_globals.total_secrets = PR_GetGlobalPointer (&sv_pr_state, "total_secrets");
(void *) sv_globals.total_monsters = PR_GetGlobalPointer (&sv_pr_state, "total_monsters");
(void *) sv_globals.found_secrets = PR_GetGlobalPointer (&sv_pr_state, "found_secrets");
(void *) sv_globals.killed_monsters = PR_GetGlobalPointer (&sv_pr_state, "killed_monsters");
(void *) sv_globals.parms = PR_GetGlobalPointer (&sv_pr_state, "parm1");
(void *) sv_globals.v_forward = PR_GetGlobalPointer (&sv_pr_state, "v_forward");
(void *) sv_globals.v_up = PR_GetGlobalPointer (&sv_pr_state, "v_up");
(void *) sv_globals.v_right = PR_GetGlobalPointer (&sv_pr_state, "v_right");
(void *) sv_globals.trace_allsolid = PR_GetGlobalPointer (&sv_pr_state, "trace_allsolid");
(void *) sv_globals.trace_startsolid = PR_GetGlobalPointer (&sv_pr_state, "trace_startsolid");
(void *) sv_globals.trace_fraction = PR_GetGlobalPointer (&sv_pr_state, "trace_fraction");
(void *) sv_globals.trace_endpos = PR_GetGlobalPointer (&sv_pr_state, "trace_endpos");
(void *) sv_globals.trace_plane_normal = PR_GetGlobalPointer (&sv_pr_state, "trace_plane_normal");
(void *) sv_globals.trace_plane_dist = PR_GetGlobalPointer (&sv_pr_state, "trace_plane_dist");
(void *) sv_globals.trace_ent = PR_GetGlobalPointer (&sv_pr_state, "trace_ent");
(void *) sv_globals.trace_inopen = PR_GetGlobalPointer (&sv_pr_state, "trace_inopen");
(void *) sv_globals.trace_inwater = PR_GetGlobalPointer (&sv_pr_state, "trace_inwater");
(void *) sv_globals.msg_entity = PR_GetGlobalPointer (&sv_pr_state, "msg_entity");
(void *) sv_globals.self = PR_GetGlobalPointer (&sv_pr_state, "self");
(void *) sv_globals.other = PR_GetGlobalPointer (&sv_pr_state, "other");
(void *) sv_globals.world = PR_GetGlobalPointer (&sv_pr_state, "world");
(void *) sv_globals.time = PR_GetGlobalPointer (&sv_pr_state, "time");
(void *) sv_globals.frametime = PR_GetGlobalPointer (&sv_pr_state, "frametime");
(void *) sv_globals.force_retouch = PR_GetGlobalPointer (&sv_pr_state, "force_retouch");
(void *) sv_globals.mapname = PR_GetGlobalPointer (&sv_pr_state, "mapname");
(void *) sv_globals.deathmatch = PR_GetGlobalPointer (&sv_pr_state, "deathmatch");
(void *) sv_globals.coop = PR_GetGlobalPointer (&sv_pr_state, "coop");
(void *) sv_globals.teamplay = PR_GetGlobalPointer (&sv_pr_state, "teamplay");
(void *) sv_globals.serverflags = PR_GetGlobalPointer (&sv_pr_state, "serverflags");
(void *) sv_globals.total_secrets = PR_GetGlobalPointer (&sv_pr_state, "total_secrets");
(void *) sv_globals.total_monsters = PR_GetGlobalPointer (&sv_pr_state, "total_monsters");
(void *) sv_globals.found_secrets = PR_GetGlobalPointer (&sv_pr_state, "found_secrets");
(void *) sv_globals.killed_monsters = PR_GetGlobalPointer (&sv_pr_state, "killed_monsters");
(void *) sv_globals.parms = PR_GetGlobalPointer (&sv_pr_state, "parm1");
(void *) sv_globals.v_forward = PR_GetGlobalPointer (&sv_pr_state, "v_forward");
(void *) sv_globals.v_up = PR_GetGlobalPointer (&sv_pr_state, "v_up");
(void *) sv_globals.v_right = PR_GetGlobalPointer (&sv_pr_state, "v_right");
(void *) sv_globals.trace_allsolid = PR_GetGlobalPointer (&sv_pr_state, "trace_allsolid");
(void *) sv_globals.trace_startsolid = PR_GetGlobalPointer (&sv_pr_state, "trace_startsolid");
(void *) sv_globals.trace_fraction = PR_GetGlobalPointer (&sv_pr_state, "trace_fraction");
(void *) sv_globals.trace_endpos = PR_GetGlobalPointer (&sv_pr_state, "trace_endpos");
(void *) sv_globals.trace_plane_normal = PR_GetGlobalPointer (&sv_pr_state, "trace_plane_normal");
(void *) sv_globals.trace_plane_dist = PR_GetGlobalPointer (&sv_pr_state, "trace_plane_dist");
(void *) sv_globals.trace_ent = PR_GetGlobalPointer (&sv_pr_state, "trace_ent");
(void *) sv_globals.trace_inopen = PR_GetGlobalPointer (&sv_pr_state, "trace_inopen");
(void *) sv_globals.trace_inwater = PR_GetGlobalPointer (&sv_pr_state, "trace_inwater");
(void *) sv_globals.msg_entity = PR_GetGlobalPointer (&sv_pr_state, "msg_entity");
#ifdef QUAKE2
(void *) sv_globals.startspot = PR_GetGlobalPointer (&sv_pr_state, "startspot");
(void *) sv_globals.null = PR_GetGlobalPointer (&sv_pr_state, "null");
#endif
sv_funcs.main = PR_GetFunctionIndex (&sv_pr_state, "main");
sv_funcs.StartFrame = PR_GetFunctionIndex (&sv_pr_state, "StartFrame");
sv_funcs.PlayerPreThink = PR_GetFunctionIndex (&sv_pr_state, "PlayerPreThink");
sv_funcs.PlayerPostThink = PR_GetFunctionIndex (&sv_pr_state, "PlayerPostThink");
sv_funcs.ClientKill = PR_GetFunctionIndex (&sv_pr_state, "ClientKill");
sv_funcs.ClientConnect = PR_GetFunctionIndex (&sv_pr_state, "ClientConnect");
sv_funcs.PutClientInServer = PR_GetFunctionIndex (&sv_pr_state, "PutClientInServer");
sv_funcs.ClientDisconnect = PR_GetFunctionIndex (&sv_pr_state, "ClientDisconnect");
sv_funcs.SetNewParms = PR_GetFunctionIndex (&sv_pr_state, "SetNewParms");
sv_funcs.SetChangeParms = PR_GetFunctionIndex (&sv_pr_state, "SetChangeParms");
sv_funcs.main = PR_GetFunctionIndex (&sv_pr_state, "main");
sv_funcs.StartFrame = PR_GetFunctionIndex (&sv_pr_state, "StartFrame");
sv_funcs.PlayerPreThink = PR_GetFunctionIndex (&sv_pr_state, "PlayerPreThink");
sv_funcs.PlayerPostThink = PR_GetFunctionIndex (&sv_pr_state, "PlayerPostThink");
sv_funcs.ClientKill = PR_GetFunctionIndex (&sv_pr_state, "ClientKill");
sv_funcs.ClientConnect = PR_GetFunctionIndex (&sv_pr_state, "ClientConnect");
sv_funcs.PutClientInServer = PR_GetFunctionIndex (&sv_pr_state, "PutClientInServer");
sv_funcs.ClientDisconnect = PR_GetFunctionIndex (&sv_pr_state, "ClientDisconnect");
sv_funcs.SetNewParms = PR_GetFunctionIndex (&sv_pr_state, "SetNewParms");
sv_funcs.SetChangeParms = PR_GetFunctionIndex (&sv_pr_state, "SetChangeParms");
sv_fields.modelindex = ED_GetFieldIndex (&sv_pr_state, "modelindex");
sv_fields.absmin = ED_GetFieldIndex (&sv_pr_state, "absmin");
sv_fields.absmax = ED_GetFieldIndex (&sv_pr_state, "absmax");
sv_fields.ltime = ED_GetFieldIndex (&sv_pr_state, "ltime");
sv_fields.movetype = ED_GetFieldIndex (&sv_pr_state, "movetype");
sv_fields.solid = ED_GetFieldIndex (&sv_pr_state, "solid");
sv_fields.origin = ED_GetFieldIndex (&sv_pr_state, "origin");
sv_fields.oldorigin = ED_GetFieldIndex (&sv_pr_state, "oldorigin");
sv_fields.velocity = ED_GetFieldIndex (&sv_pr_state, "velocity");
sv_fields.angles = ED_GetFieldIndex (&sv_pr_state, "angles");
sv_fields.avelocity = ED_GetFieldIndex (&sv_pr_state, "avelocity");
sv_fields.basevelocity = ED_GetFieldIndex (&sv_pr_state, "basevelocity");
sv_fields.punchangle = ED_GetFieldIndex (&sv_pr_state, "punchangle");
sv_fields.classname = ED_GetFieldIndex (&sv_pr_state, "classname");
sv_fields.model = ED_GetFieldIndex (&sv_pr_state, "model");
sv_fields.frame = ED_GetFieldIndex (&sv_pr_state, "frame");
sv_fields.skin = ED_GetFieldIndex (&sv_pr_state, "skin");
sv_fields.effects = ED_GetFieldIndex (&sv_pr_state, "effects");
sv_fields.drawPercent = ED_GetFieldIndex (&sv_pr_state, "drawPercent");
sv_fields.gravity = ED_GetFieldIndex (&sv_pr_state, "gravity");
sv_fields.mass = ED_GetFieldIndex (&sv_pr_state, "mass");
sv_fields.light_level = ED_GetFieldIndex (&sv_pr_state, "light_level");
sv_fields.mins = ED_GetFieldIndex (&sv_pr_state, "mins");
sv_fields.maxs = ED_GetFieldIndex (&sv_pr_state, "maxs");
sv_fields.size = ED_GetFieldIndex (&sv_pr_state, "size");
sv_fields.touch = ED_GetFieldIndex (&sv_pr_state, "touch");
sv_fields.use = ED_GetFieldIndex (&sv_pr_state, "use");
sv_fields.think = ED_GetFieldIndex (&sv_pr_state, "think");
sv_fields.blocked = ED_GetFieldIndex (&sv_pr_state, "blocked");
sv_fields.nextthink = ED_GetFieldIndex (&sv_pr_state, "nextthink");
sv_fields.groundentity = ED_GetFieldIndex (&sv_pr_state, "groundentity");
sv_fields.health = ED_GetFieldIndex (&sv_pr_state, "health");
sv_fields.frags = ED_GetFieldIndex (&sv_pr_state, "frags");
sv_fields.weapon = ED_GetFieldIndex (&sv_pr_state, "weapon");
sv_fields.weaponmodel = ED_GetFieldIndex (&sv_pr_state, "weaponmodel");
sv_fields.weaponframe = ED_GetFieldIndex (&sv_pr_state, "weaponframe");
sv_fields.currentammo = ED_GetFieldIndex (&sv_pr_state, "currentammo");
sv_fields.ammo_shells = ED_GetFieldIndex (&sv_pr_state, "ammo_shells");
sv_fields.ammo_nails = ED_GetFieldIndex (&sv_pr_state, "ammo_nails");
sv_fields.ammo_rockets = ED_GetFieldIndex (&sv_pr_state, "ammo_rockets");
sv_fields.ammo_cells = ED_GetFieldIndex (&sv_pr_state, "ammo_cells");
sv_fields.items = ED_GetFieldIndex (&sv_pr_state, "items");
sv_fields.items2 = ED_GetFieldIndex (&sv_pr_state, "items2");
sv_fields.takedamage = ED_GetFieldIndex (&sv_pr_state, "takedamage");
sv_fields.chain = ED_GetFieldIndex (&sv_pr_state, "chain");
sv_fields.deadflag = ED_GetFieldIndex (&sv_pr_state, "deadflag");
sv_fields.view_ofs = ED_GetFieldIndex (&sv_pr_state, "view_ofs");
sv_fields.button0 = ED_GetFieldIndex (&sv_pr_state, "button0");
sv_fields.button1 = ED_GetFieldIndex (&sv_pr_state, "button1");
sv_fields.button2 = ED_GetFieldIndex (&sv_pr_state, "button2");
sv_fields.impulse = ED_GetFieldIndex (&sv_pr_state, "impulse");
sv_fields.fixangle = ED_GetFieldIndex (&sv_pr_state, "fixangle");
sv_fields.v_angle = ED_GetFieldIndex (&sv_pr_state, "v_angle");
sv_fields.idealpitch = ED_GetFieldIndex (&sv_pr_state, "idealpitch");
sv_fields.pitch_speed = ED_GetFieldIndex (&sv_pr_state, "pitch_speed");
sv_fields.netname = ED_GetFieldIndex (&sv_pr_state, "netname");
sv_fields.enemy = ED_GetFieldIndex (&sv_pr_state, "enemy");
sv_fields.flags = ED_GetFieldIndex (&sv_pr_state, "flags");
sv_fields.colormap = ED_GetFieldIndex (&sv_pr_state, "colormap");
sv_fields.team = ED_GetFieldIndex (&sv_pr_state, "team");
sv_fields.max_health = ED_GetFieldIndex (&sv_pr_state, "max_health");
sv_fields.teleport_time = ED_GetFieldIndex (&sv_pr_state, "teleport_time");
sv_fields.armortype = ED_GetFieldIndex (&sv_pr_state, "armortype");
sv_fields.armorvalue = ED_GetFieldIndex (&sv_pr_state, "armorvalue");
sv_fields.waterlevel = ED_GetFieldIndex (&sv_pr_state, "waterlevel");
sv_fields.watertype = ED_GetFieldIndex (&sv_pr_state, "watertype");
sv_fields.ideal_yaw = ED_GetFieldIndex (&sv_pr_state, "ideal_yaw");
sv_fields.yaw_speed = ED_GetFieldIndex (&sv_pr_state, "yaw_speed");
sv_fields.aiment = ED_GetFieldIndex (&sv_pr_state, "aiment");
sv_fields.goalentity = ED_GetFieldIndex (&sv_pr_state, "goalentity");
sv_fields.spawnflags = ED_GetFieldIndex (&sv_pr_state, "spawnflags");
sv_fields.target = ED_GetFieldIndex (&sv_pr_state, "target");
sv_fields.targetname = ED_GetFieldIndex (&sv_pr_state, "targetname");
sv_fields.dmg_take = ED_GetFieldIndex (&sv_pr_state, "dmg_take");
sv_fields.dmg_save = ED_GetFieldIndex (&sv_pr_state, "dmg_save");
sv_fields.dmg_inflictor = ED_GetFieldIndex (&sv_pr_state, "dmg_inflictor");
sv_fields.owner = ED_GetFieldIndex (&sv_pr_state, "owner");
sv_fields.movedir = ED_GetFieldIndex (&sv_pr_state, "movedir");
sv_fields.message = ED_GetFieldIndex (&sv_pr_state, "message");
sv_fields.sounds = ED_GetFieldIndex (&sv_pr_state, "sounds");
sv_fields.noise = ED_GetFieldIndex (&sv_pr_state, "noise");
sv_fields.noise1 = ED_GetFieldIndex (&sv_pr_state, "noise1");
sv_fields.noise2 = ED_GetFieldIndex (&sv_pr_state, "noise2");
sv_fields.noise3 = ED_GetFieldIndex (&sv_pr_state, "noise3");
sv_fields.dmg = ED_GetFieldIndex (&sv_pr_state, "dmg");
sv_fields.dmgtime = ED_GetFieldIndex (&sv_pr_state, "dmgtime");
sv_fields.air_finished = ED_GetFieldIndex (&sv_pr_state, "air_finished");
sv_fields.pain_finished = ED_GetFieldIndex (&sv_pr_state, "pain_finished");
sv_fields.radsuit_finished = ED_GetFieldIndex (&sv_pr_state, "radsuit_finished");
sv_fields.speed = ED_GetFieldIndex (&sv_pr_state, "speed");
sv_fields.modelindex = PR_GetFieldOffset (&sv_pr_state, "modelindex");
sv_fields.absmin = PR_GetFieldOffset (&sv_pr_state, "absmin");
sv_fields.absmax = PR_GetFieldOffset (&sv_pr_state, "absmax");
sv_fields.ltime = PR_GetFieldOffset (&sv_pr_state, "ltime");
sv_fields.movetype = PR_GetFieldOffset (&sv_pr_state, "movetype");
sv_fields.solid = PR_GetFieldOffset (&sv_pr_state, "solid");
sv_fields.origin = PR_GetFieldOffset (&sv_pr_state, "origin");
sv_fields.oldorigin = PR_GetFieldOffset (&sv_pr_state, "oldorigin");
sv_fields.velocity = PR_GetFieldOffset (&sv_pr_state, "velocity");
sv_fields.angles = PR_GetFieldOffset (&sv_pr_state, "angles");
sv_fields.avelocity = PR_GetFieldOffset (&sv_pr_state, "avelocity");
sv_fields.basevelocity = PR_GetFieldOffset (&sv_pr_state, "basevelocity");
sv_fields.punchangle = PR_GetFieldOffset (&sv_pr_state, "punchangle");
sv_fields.classname = PR_GetFieldOffset (&sv_pr_state, "classname");
sv_fields.model = PR_GetFieldOffset (&sv_pr_state, "model");
sv_fields.frame = PR_GetFieldOffset (&sv_pr_state, "frame");
sv_fields.skin = PR_GetFieldOffset (&sv_pr_state, "skin");
sv_fields.effects = PR_GetFieldOffset (&sv_pr_state, "effects");
sv_fields.drawPercent = PR_GetFieldOffset (&sv_pr_state, "drawPercent");
sv_fields.gravity = PR_GetFieldOffset (&sv_pr_state, "gravity");
sv_fields.mass = PR_GetFieldOffset (&sv_pr_state, "mass");
sv_fields.light_level = PR_GetFieldOffset (&sv_pr_state, "light_level");
sv_fields.mins = PR_GetFieldOffset (&sv_pr_state, "mins");
sv_fields.maxs = PR_GetFieldOffset (&sv_pr_state, "maxs");
sv_fields.size = PR_GetFieldOffset (&sv_pr_state, "size");
sv_fields.touch = PR_GetFieldOffset (&sv_pr_state, "touch");
sv_fields.use = PR_GetFieldOffset (&sv_pr_state, "use");
sv_fields.think = PR_GetFieldOffset (&sv_pr_state, "think");
sv_fields.blocked = PR_GetFieldOffset (&sv_pr_state, "blocked");
sv_fields.nextthink = PR_GetFieldOffset (&sv_pr_state, "nextthink");
sv_fields.groundentity = PR_GetFieldOffset (&sv_pr_state, "groundentity");
sv_fields.health = PR_GetFieldOffset (&sv_pr_state, "health");
sv_fields.frags = PR_GetFieldOffset (&sv_pr_state, "frags");
sv_fields.weapon = PR_GetFieldOffset (&sv_pr_state, "weapon");
sv_fields.weaponmodel = PR_GetFieldOffset (&sv_pr_state, "weaponmodel");
sv_fields.weaponframe = PR_GetFieldOffset (&sv_pr_state, "weaponframe");
sv_fields.currentammo = PR_GetFieldOffset (&sv_pr_state, "currentammo");
sv_fields.ammo_shells = PR_GetFieldOffset (&sv_pr_state, "ammo_shells");
sv_fields.ammo_nails = PR_GetFieldOffset (&sv_pr_state, "ammo_nails");
sv_fields.ammo_rockets = PR_GetFieldOffset (&sv_pr_state, "ammo_rockets");
sv_fields.ammo_cells = PR_GetFieldOffset (&sv_pr_state, "ammo_cells");
sv_fields.items = PR_GetFieldOffset (&sv_pr_state, "items");
sv_fields.items2 = PR_GetFieldOffset (&sv_pr_state, "items2");
sv_fields.takedamage = PR_GetFieldOffset (&sv_pr_state, "takedamage");
sv_fields.chain = PR_GetFieldOffset (&sv_pr_state, "chain");
sv_fields.deadflag = PR_GetFieldOffset (&sv_pr_state, "deadflag");
sv_fields.view_ofs = PR_GetFieldOffset (&sv_pr_state, "view_ofs");
sv_fields.button0 = PR_GetFieldOffset (&sv_pr_state, "button0");
sv_fields.button1 = PR_GetFieldOffset (&sv_pr_state, "button1");
sv_fields.button2 = PR_GetFieldOffset (&sv_pr_state, "button2");
sv_fields.impulse = PR_GetFieldOffset (&sv_pr_state, "impulse");
sv_fields.fixangle = PR_GetFieldOffset (&sv_pr_state, "fixangle");
sv_fields.v_angle = PR_GetFieldOffset (&sv_pr_state, "v_angle");
sv_fields.idealpitch = PR_GetFieldOffset (&sv_pr_state, "idealpitch");
sv_fields.pitch_speed = PR_GetFieldOffset (&sv_pr_state, "pitch_speed");
sv_fields.netname = PR_GetFieldOffset (&sv_pr_state, "netname");
sv_fields.enemy = PR_GetFieldOffset (&sv_pr_state, "enemy");
sv_fields.flags = PR_GetFieldOffset (&sv_pr_state, "flags");
sv_fields.colormap = PR_GetFieldOffset (&sv_pr_state, "colormap");
sv_fields.team = PR_GetFieldOffset (&sv_pr_state, "team");
sv_fields.max_health = PR_GetFieldOffset (&sv_pr_state, "max_health");
sv_fields.teleport_time = PR_GetFieldOffset (&sv_pr_state, "teleport_time");
sv_fields.armortype = PR_GetFieldOffset (&sv_pr_state, "armortype");
sv_fields.armorvalue = PR_GetFieldOffset (&sv_pr_state, "armorvalue");
sv_fields.waterlevel = PR_GetFieldOffset (&sv_pr_state, "waterlevel");
sv_fields.watertype = PR_GetFieldOffset (&sv_pr_state, "watertype");
sv_fields.ideal_yaw = PR_GetFieldOffset (&sv_pr_state, "ideal_yaw");
sv_fields.yaw_speed = PR_GetFieldOffset (&sv_pr_state, "yaw_speed");
sv_fields.aiment = PR_GetFieldOffset (&sv_pr_state, "aiment");
sv_fields.goalentity = PR_GetFieldOffset (&sv_pr_state, "goalentity");
sv_fields.spawnflags = PR_GetFieldOffset (&sv_pr_state, "spawnflags");
sv_fields.target = PR_GetFieldOffset (&sv_pr_state, "target");
sv_fields.targetname = PR_GetFieldOffset (&sv_pr_state, "targetname");
sv_fields.dmg_take = PR_GetFieldOffset (&sv_pr_state, "dmg_take");
sv_fields.dmg_save = PR_GetFieldOffset (&sv_pr_state, "dmg_save");
sv_fields.dmg_inflictor = PR_GetFieldOffset (&sv_pr_state, "dmg_inflictor");
sv_fields.owner = PR_GetFieldOffset (&sv_pr_state, "owner");
sv_fields.movedir = PR_GetFieldOffset (&sv_pr_state, "movedir");
sv_fields.message = PR_GetFieldOffset (&sv_pr_state, "message");
sv_fields.sounds = PR_GetFieldOffset (&sv_pr_state, "sounds");
sv_fields.noise = PR_GetFieldOffset (&sv_pr_state, "noise");
sv_fields.noise1 = PR_GetFieldOffset (&sv_pr_state, "noise1");
sv_fields.noise2 = PR_GetFieldOffset (&sv_pr_state, "noise2");
sv_fields.noise3 = PR_GetFieldOffset (&sv_pr_state, "noise3");
sv_fields.dmg = PR_GetFieldOffset (&sv_pr_state, "dmg");
sv_fields.dmgtime = PR_GetFieldOffset (&sv_pr_state, "dmgtime");
sv_fields.air_finished = PR_GetFieldOffset (&sv_pr_state, "air_finished");
sv_fields.pain_finished = PR_GetFieldOffset (&sv_pr_state, "pain_finished");
sv_fields.radsuit_finished = PR_GetFieldOffset (&sv_pr_state, "radsuit_finished");
sv_fields.speed = PR_GetFieldOffset (&sv_pr_state, "speed");
}
extern builtin_t sv_builtins[];
@ -310,7 +305,7 @@ void
SV_Progs_Init_Cvars (void)
{
r_skyname = Cvar_Get ("r_skyname", "", CVAR_SERVERINFO, Cvar_Info,
"name of skybox");
"name of skybox");
sv_progs = Cvar_Get ("sv_progs", "progs.dat", CVAR_ROM, NULL,
"Allows selectable game progs if you have several "
"of them in the gamedir");
@ -332,4 +327,3 @@ SV_Progs_Init_Cvars (void)
saved3 = Cvar_Get ("saved3", "0", CVAR_ARCHIVE, NULL, "No Description");
saved4 = Cvar_Get ("saved4", "0", CVAR_ARCHIVE, NULL, "No Description");
}

View file

@ -44,7 +44,7 @@ extern cvar_t *cl_cshift_powerup;
extern byte gammatable[256];
extern void V_CalcGlowCshift (void);
extern void V_CalcGlowCshift (void);
void
V_CalcPowerupCshift (void)

View file

@ -48,21 +48,22 @@ line of sight checks trace->crosscontent, but bullets don't
typedef struct {
vec3_t boxmins, boxmaxs; // enclose the test object along
vec3_t boxmins, boxmaxs; // enclose the test object along
// entire move
float *mins, *maxs; // size of the moving object
vec3_t mins2, maxs2; // size when clipping against monsters
vec3_t mins2, maxs2; // size when clipping against
// monsters
float *start, *end;
trace_t trace;
int type;
trace_t trace;
int type;
edict_t *passedict;
} moveclip_t;
int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
/*
HULL BOXES
HULL BOXES
*/
static hull_t box_hull;
@ -129,9 +130,9 @@ SV_HullForBox (vec3_t mins, vec3_t maxs)
SV_HullForEntity
Returns a hull that can be used for testing or clipping an object of
mins/maxs size. Offset is filled in to contain the adjustment that must
be added to the testing object's origin to get a point to use with the
returned hull.
mins/maxs size. Offset is filled in to contain the adjustment that
must be added to the testing object's origin to get a point to use with
the returned hull.
*/
hull_t *
SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
@ -142,8 +143,8 @@ SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
hull_t *hull;
// decide which clipping hull to use, based on the size
if (SVFIELD (ent, solid, float) == SOLID_BSP) { // explicit hulls in the
// BSP model
if (SVFIELD (ent, solid, float) == SOLID_BSP) {
// explicit hulls in the BSP model
if (SVFIELD (ent, movetype, float) != MOVETYPE_PUSH)
Sys_Error ("SOLID_BSP without MOVETYPE_PUSH");
@ -163,8 +164,7 @@ SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
// calculate an offset value to center the origin
VectorSubtract (hull->clip_mins, mins, offset);
VectorAdd (offset, SVFIELD (ent, origin, vector), offset);
} else { // create a temp hull from bounding
// box sizes
} else { // create a temp hull from bounding box sizes
VectorSubtract (SVFIELD (ent, mins, vector), maxs, hullmins);
VectorSubtract (SVFIELD (ent, maxs, vector), mins, hullmaxs);
hull = SV_HullForBox (hullmins, hullmaxs);
@ -175,8 +175,9 @@ SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
return hull;
}
/*
ENTITY AREA CHECKING ========================================================
ENTITY AREA CHECKING
*/
typedef struct areanode_s {
@ -198,8 +199,8 @@ areanode_t *
SV_CreateAreaNode (int depth, vec3_t mins, vec3_t maxs)
{
areanode_t *anode;
vec3_t size;
vec3_t mins1, maxs1, mins2, maxs2;
vec3_t size;
vec3_t mins1, maxs1, mins2, maxs2;
anode = &sv_areanodes[sv_numareanodes];
sv_numareanodes++;
@ -268,7 +269,8 @@ SV_TouchLinks (edict_t *ent, areanode_t *node)
touch = EDICT_FROM_AREA (l);
if (touch == ent)
continue;
if (!SVFIELD (touch, touch, func) || SVFIELD (touch, solid, float) != SOLID_TRIGGER)
if (!SVFIELD (touch, touch, func)
|| SVFIELD (touch, solid, float) != SOLID_TRIGGER)
continue;
if (SVFIELD (ent, absmin, vector)[0] > SVFIELD (touch, absmax, vector)[0]
|| SVFIELD (ent, absmin, vector)[1] > SVFIELD (touch, absmax, vector)[1]
@ -277,11 +279,11 @@ SV_TouchLinks (edict_t *ent, areanode_t *node)
|| SVFIELD (ent, absmax, vector)[1] < SVFIELD (touch, absmin, vector)[1]
|| SVFIELD (ent, absmax, vector)[2] < SVFIELD (touch, absmin, vector)[2])
continue;
old_self = *sv_globals.self;
old_other = *sv_globals.other;
*sv_globals.self =
EDICT_TO_PROG (&sv_pr_state, touch);
*sv_globals.self = EDICT_TO_PROG (&sv_pr_state, touch);
*sv_globals.other = EDICT_TO_PROG (&sv_pr_state, ent);
*sv_globals.time = sv.time;
PR_ExecuteProgram (&sv_pr_state, SVFIELD (touch, touch, func));
@ -306,8 +308,8 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
{
mplane_t *splitplane;
mleaf_t *leaf;
int sides;
int leafnum;
int sides;
int leafnum;
if (node->contents == CONTENTS_SOLID)
return;
@ -324,10 +326,11 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
ent->num_leafs++;
return;
}
// NODE_MIXED
// NODE_MIXED
splitplane = node->plane;
sides = BOX_ON_PLANE_SIDE (SVFIELD (ent, absmin, vector), SVFIELD (ent, absmax, vector), splitplane);
sides = BOX_ON_PLANE_SIDE (SVFIELD (ent, absmin, vector),
SVFIELD (ent, absmax, vector), splitplane);
// recurse down the contacted sides
if (sides & 1)
@ -353,33 +356,10 @@ SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
return;
// set the abs box
#ifdef QUAKE2
if (SVFIELD (ent, solid, float) == SOLID_BSP &&
(SVFIELD (ent, angles, float)[0] || SVFIELD (ent, angles, float)[1]
|| SVFIELD (ent, angles, float)[2])) { // expand for rotation
float max, v;
int i;
max = 0;
for (i = 0; i < 3; i++) {
v = fabs (SVFIELD (ent, mins, float)[i]);
if (v > max)
max = v;
v = fabs (SVFIELD (ent, maxs, float)[i]);
if (v > max)
max = v;
}
for (i = 0; i < 3; i++) {
SVFIELD (ent, absmin, float)[i] = SVFIELD (ent, origin, float)[i] - max;
SVFIELD (ent, absmax, float)[i] = SVFIELD (ent, origin, float)[i] + max;
}
} else
#endif
{
VectorAdd (SVFIELD (ent, origin, vector), SVFIELD (ent, mins, vector), SVFIELD (ent, absmin, vector));
VectorAdd (SVFIELD (ent, origin, vector), SVFIELD (ent, maxs, vector), SVFIELD (ent, absmax, vector));
}
VectorAdd (SVFIELD (ent, origin, vector), SVFIELD (ent, mins, vector),
SVFIELD (ent, absmin, vector));
VectorAdd (SVFIELD (ent, origin, vector), SVFIELD (ent, maxs, vector),
SVFIELD (ent, absmax, vector));
// to make items easier to pick up and allow them to be grabbed off
// of shelves, the abs sizes are expanded
@ -419,24 +399,24 @@ SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
break; // crosses the node
}
// link it in
// link it in
if (SVFIELD (ent, solid, float) == SOLID_TRIGGER)
InsertLinkBefore (&ent->area, &node->trigger_edicts);
else
InsertLinkBefore (&ent->area, &node->solid_edicts);
// if touch_triggers, touch all entities at this node and decend for more
// if touch_triggers, touch all entities at this node and descend for more
if (touch_triggers)
SV_TouchLinks (ent, sv_areanodes);
}
/*
POINT TESTING IN HULLS ======================================================
POINT TESTING IN HULLS
*/
#ifndef USE_INTEL_ASM
#ifndef USE_INTEL_ASM
int
SV_HullPointContents (hull_t *hull, int num, vec3_t p)
{
@ -463,7 +443,7 @@ SV_HullPointContents (hull_t *hull, int num, vec3_t p)
return num;
}
#endif // USE_INTEL_ASM
#endif // !USE_INTEL_ASM
int
@ -508,7 +488,7 @@ SV_TestEntityPosition (edict_t *ent)
/*
LINE TESTING IN HULLS =======================================================
LINE TESTING IN HULLS
*/
// 1/32 epsilon to keep floating point happy
@ -668,58 +648,10 @@ SV_ClipMoveToEntity (edict_t *ent, vec3_t start, vec3_t mins, vec3_t maxs,
VectorSubtract (start, offset, start_l);
VectorSubtract (end, offset, end_l);
#ifdef QUAKE2
// rotate start and end into the models frame of reference
if (SVFIELD (ent, solid, float) == SOLID_BSP &&
(SVFIELD (ent, angles, float)[0] || SVFIELD (ent, angles, float)[1]
|| SVFIELD (ent, angles, float)[2])) {
vec3_t a;
vec3_t forward, right, up;
vec3_t temp;
AngleVectors (SVFIELD (ent, angles, float), forward, right, up);
VectorCopy (start_l, temp);
start_l[0] = DotProduct (temp, forward);
start_l[1] = -DotProduct (temp, right);
start_l[2] = DotProduct (temp, up);
VectorCopy (end_l, temp);
end_l[0] = DotProduct (temp, forward);
end_l[1] = -DotProduct (temp, right);
end_l[2] = DotProduct (temp, up);
}
#endif
// trace a line through the apropriate clipping hull
SV_RecursiveHullCheck (hull, hull->firstclipnode, 0, 1, start_l, end_l,
&trace);
#ifdef QUAKE2
// rotate endpos back to world frame of reference
if (SVFIELD (ent, solid, float) == SOLID_BSP &&
(SVFIELD (ent, angles, float)[0] || SVFIELD (ent, angles, float)[1] || SVFIELD (ent, angles, float)[2])) {
vec3_t a;
vec3_t forward, right, up;
vec3_t temp;
if (trace.fraction != 1) {
VectorSubtract (vec3_origin, SVFIELD (ent, angles, float), a);
AngleVectors (a, forward, right, up);
VectorCopy (trace.endpos, temp);
trace.endpos[0] = DotProduct (temp, forward);
trace.endpos[1] = -DotProduct (temp, right);
trace.endpos[2] = DotProduct (temp, up);
VectorCopy (trace.plane.normal, temp);
trace.plane.normal[0] = DotProduct (temp, forward);
trace.plane.normal[1] = -DotProduct (temp, right);
trace.plane.normal[2] = DotProduct (temp, up);
}
}
#endif
// fix trace up by the offset
if (trace.fraction != 1)
VectorAdd (trace.endpos, offset, trace.endpos);
@ -755,7 +687,8 @@ SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
if (SVFIELD (touch, solid, float) == SOLID_TRIGGER)
Sys_Error ("Trigger in clipping list");
if (clip->type == MOVE_NOMONSTERS && SVFIELD (touch, solid, float) != SOLID_BSP)
if (clip->type == MOVE_NOMONSTERS && SVFIELD (touch, solid, float)
!= SOLID_BSP)
continue;
if (clip->boxmins[0] > SVFIELD (touch, absmax, vector)[0]
@ -766,7 +699,7 @@ SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
|| clip->boxmaxs[2] < SVFIELD (touch, absmin, vector)[2])
continue;
if (clip->passedict && SVFIELD (clip->passedict, size, vector)[0]
if (clip->passedict != 0 && SVFIELD (clip->passedict, size, vector)[0]
&& !SVFIELD (touch, size, vector)[0])
continue; // points never interact
@ -774,11 +707,12 @@ SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
if (clip->trace.allsolid)
return;
if (clip->passedict) {
if (PROG_TO_EDICT (&sv_pr_state, SVFIELD (touch, owner, entity)) ==
clip->passedict) continue; // don't clip against own missiles
if (PROG_TO_EDICT (&sv_pr_state, SVFIELD (touch, owner, entity))
== clip->passedict)
continue; // don't clip against own missiles
if (PROG_TO_EDICT (&sv_pr_state,
SVFIELD (clip->passedict, owner, entity))
== touch) continue; // don't clip against owner
SVFIELD (clip->passedict, owner, entity)) == touch)
continue; // don't clip against owner
}
if ((int) SVFIELD (touch, flags, float) & FL_MONSTER)

View file

@ -1,7 +1,7 @@
/*
game.c
game specific support
game specific support (notably hipnotic, rogue and abyss)
Copyright (C) 1996-1997 Id Software, Inc.
Copyright (C) 1999,2000 contributors of the QuakeForge project

View file

@ -69,7 +69,7 @@ int history_line = 0;
keydest_t key_dest = key_console;
char *keybindings[256];
qboolean consolekeys[256]; // if true, can't be rebound while in console
qboolean consolekeys[256]; // if true, can't be rebound while in console
qboolean menubound[256]; // if true, can't be rebound while in menu
int keyshift[256]; // key to map to if shift held down in console
int key_repeats[256]; // if > 1, it is autorepeating

View file

@ -251,7 +251,7 @@ V_DriftPitch (void)
/*
PALETTE FLASHES
PALETTE FLASHES
*/

View file

@ -149,8 +149,7 @@ SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
neworg[2] += 8;
}
trace =
SV_Move (SVFIELD (ent, origin, vector), SVFIELD (ent, mins, vector), SVFIELD (ent, maxs, vector), neworg, false,
ent);
SV_Move (SVFIELD (ent, origin, vector), SVFIELD (ent, mins, vector), SVFIELD (ent, maxs, vector), neworg, false, ent);
if (trace.fraction == 1) {
if (((int) SVFIELD (ent, flags, float) & FL_SWIM)
@ -203,9 +202,9 @@ SV_movestep (edict_t *ent, vec3_t move, qboolean relink)
if (!SV_CheckBottom (ent)) {
if ((int) SVFIELD (ent, flags, float) & FL_PARTIALGROUND) { // entity had floor
// mostly pulled out
// from underneath it
// and is trying to correct
// mostly pulled out
// from underneath it
// and is trying to correct
if (relink)
SV_LinkEdict (ent, true);
return true;
@ -394,7 +393,8 @@ SV_MoveToGoal (progs_t *pr)
}
// if the next step hits the enemy, return immediately
if (PROG_TO_EDICT (&sv_pr_state, SVFIELD (ent, enemy, entity)) != sv.edicts
&& SV_CloseEnough (ent, goal, dist)) return;
&& SV_CloseEnough (ent, goal, dist))
return;
// bump around...
if ((rand () & 3) == 1 || !SV_StepDirection (ent, SVFIELD (ent, ideal_yaw, float), dist)) {

View file

@ -300,18 +300,21 @@ SV_Progs_Init (void)
sv_pr_state.parse_field = parse_field;
sv_pr_state.prune_edict = prune_edict;
Cmd_AddCommand ("edict", ED_PrintEdict_f, "Report information on a given edict in the game. (edict (edict number))");
Cmd_AddCommand ("edicts", ED_PrintEdicts_f, "Display information on all edicts in the game.");
Cmd_AddCommand ("edictcount", ED_Count_f, "Display summary information on the edicts in the game.");
Cmd_AddCommand ("profile", PR_Profile_f, "FIXME: Report information about QuakeC Stuff (\?\?\?) No Description");
Cmd_AddCommand ("edict", ED_PrintEdict_f,
"Report information on a given edict in the game. (edict (edict number))");
Cmd_AddCommand ("edicts", ED_PrintEdicts_f,
"Display information on all edicts in the game.");
Cmd_AddCommand ("edictcount", ED_Count_f,
"Display summary information on the edicts in the game.");
Cmd_AddCommand ("profile", PR_Profile_f,
"FIXME: Report information about QuakeC Stuff (\?\?\?) No Description");
}
void
SV_Progs_Init_Cvars (void)
{
r_skyname =
Cvar_Get ("r_skyname", "", CVAR_SERVERINFO, Cvar_Info,
"name of skybox");
r_skyname = Cvar_Get ("r_skyname", "", CVAR_SERVERINFO, Cvar_Info,
"name of skybox");
sv_progs = Cvar_Get ("sv_progs", "qwprogs.dat", CVAR_ROM, NULL,
"Allows selectable game progs if you have several "
"of them in the gamedir");

View file

@ -461,7 +461,8 @@ SV_TestEntityPosition (edict_t *ent)
trace_t trace;
trace = SV_Move (SVFIELD (ent, origin, vector),
SVFIELD (ent, mins, vector), SVFIELD (ent, maxs, vector),
SVFIELD (ent, mins, vector),
SVFIELD (ent, maxs, vector),
SVFIELD (ent, origin, vector), 0, ent);
if (trace.startsolid)
@ -658,7 +659,7 @@ SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
{
link_t *l, *next;
edict_t *touch;
trace_t trace;
trace_t trace;
// touch linked edicts
for (l = node->solid_edicts.next; l != &node->solid_edicts; l = next) {
@ -684,21 +685,24 @@ SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
continue;
if (clip->passedict != 0 && SVFIELD (clip->passedict, size, vector)[0]
&& !SVFIELD (touch, size, vector)[0]) continue; // points never interact
&& !SVFIELD (touch, size, vector)[0])
continue; // points never interact
// might intersect, so do an exact clip
if (clip->trace.allsolid)
return;
if (clip->passedict) {
if (PROG_TO_EDICT (&sv_pr_state, SVFIELD (touch, owner, entity)) == clip->passedict)
if (PROG_TO_EDICT (&sv_pr_state, SVFIELD (touch, owner, entity))
== clip->passedict)
continue; // don't clip against own missiles
if (PROG_TO_EDICT (&sv_pr_state, SVFIELD (clip->passedict, owner, entity)) == touch)
if (PROG_TO_EDICT (&sv_pr_state,
SVFIELD (clip->passedict, owner, entity)) == touch)
continue; // don't clip against owner
}
if ((int) SVFIELD (touch, flags, float) & FL_MONSTER)
trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins2,
clip->maxs2, clip->end);
clip->maxs2, clip->end);
else
trace = SV_ClipMoveToEntity (touch, clip->start, clip->mins,
clip->maxs, clip->end);