Header/whitespace rampage continues.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-08-28 03:47:10 +00:00
parent f4fd3178f4
commit b1c0bb7626
6 changed files with 306 additions and 461 deletions

View file

@ -32,11 +32,12 @@
#include <math.h>
#include "QF/cvar.h"
#include "QF/qtypes.h"
#include "client.h"
#include "compat.h"
#include "QF/cvar.h"
#include "pmove.h"
#include "QF/qtypes.h"
cvar_t *no_pogo_stick;
movevars_t movevars;
@ -57,6 +58,7 @@ vec3_t player_maxs = { 16, 16, 32 };
void PM_InitBoxHull (void);
void PM_CategorizePosition (void);
void
Pmove_Init (void)
{
@ -71,23 +73,18 @@ Pmove_Init_Cvars (void)
}
#define STEPSIZE 18
#define BUTTON_JUMP 2
/*
PM_ClipVelocity
Slide off of the impacting object
returns the blocked flags (1 = floor, 2 = step / wall)
*/
int
PM_ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
{
float backoff;
float change;
float backoff, change;
int i, blocked;
blocked = 0;
@ -108,7 +105,6 @@ PM_ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
return blocked;
}
/*
PM_FlyMove
@ -119,17 +115,12 @@ PM_ClipVelocity (vec3_t in, vec3_t normal, vec3_t out, float overbounce)
int
PM_FlyMove (void)
{
int bumpcount, numbumps;
int blocked, bumpcount, numbumps, numplanes, i, j;
vec3_t dir;
float d;
int numplanes;
vec3_t planes[MAX_CLIP_PLANES];
vec3_t primal_velocity, original_velocity;
int i, j;
float time_left, d;
pmtrace_t trace;
vec3_t end;
float time_left;
int blocked;
vec3_t planes[MAX_CLIP_PLANES];
vec3_t end, primal_velocity, original_velocity;
numbumps = 4;
@ -182,9 +173,7 @@ PM_FlyMove (void)
VectorCopy (trace.plane.normal, planes[numplanes]);
numplanes++;
//
// modify original_velocity so it parallels all of the clip planes
//
// modify original_velocity so it parallels all of the clip planes
for (i = 0; i < numplanes; i++) {
PM_ClipVelocity (original_velocity, planes[i], pmove.velocity, 1);
for (j = 0; j < numplanes; j++)
@ -199,7 +188,7 @@ PM_FlyMove (void)
if (i != numplanes) { // go along this plane
} else { // go along the crease
if (numplanes != 2) {
// Con_Printf ("clip velocity, numplanes == %i\n",numplanes);
// Con_Printf ("clip velocity, numplanes == %i\n",numplanes);
VectorCopy (vec3_origin, pmove.velocity);
break;
}
@ -208,10 +197,8 @@ PM_FlyMove (void)
VectorScale (dir, d, pmove.velocity);
}
//
// if original velocity is against the original velocity, stop dead
// to avoid tiny occilations in sloping corners
//
// if original velocity is against the original velocity, stop dead
// to avoid tiny occilations in sloping corners
if (DotProduct (pmove.velocity, primal_velocity) <= 0) {
VectorCopy (vec3_origin, pmove.velocity);
break;
@ -224,7 +211,6 @@ PM_FlyMove (void)
return blocked;
}
void PM_Accelerate (vec3_t, float, float);
/*
@ -236,17 +222,16 @@ void PM_Accelerate (vec3_t, float, float);
void
PM_FlymodeMove (void)
{
vec3_t start, dest, pmvel, pmtmp;
pmtrace_t trace;
float pmspeed;
pmtrace_t trace;
vec3_t start, dest, pmvel, pmtmp;
pmvel[0] =
forward[0] * pmove.cmd.forwardmove + right[0] * pmove.cmd.sidemove;
pmvel[1] =
forward[1] * pmove.cmd.forwardmove + right[1] * pmove.cmd.sidemove;
pmvel[2] =
forward[2] * pmove.cmd.forwardmove + right[2] * pmove.cmd.sidemove +
pmove.cmd.upmove;
pmvel[0] = forward[0] * pmove.cmd.forwardmove +
right[0] * pmove.cmd.sidemove;
pmvel[1] = forward[1] * pmove.cmd.forwardmove +
right[1] * pmove.cmd.sidemove;
pmvel[2] = forward[2] * pmove.cmd.forwardmove +
right[2] * pmove.cmd.sidemove + pmove.cmd.upmove;
VectorCopy (pmvel, pmtmp);
pmspeed = VectorNormalize (pmtmp); // don't alter pmvel
@ -270,7 +255,6 @@ PM_FlymodeMove (void)
PM_FlyMove (); // NOW we fly.
}
/*
PM_GroundMove
@ -279,10 +263,10 @@ PM_FlymodeMove (void)
void
PM_GroundMove (void)
{
vec3_t start, dest;
pmtrace_t trace;
vec3_t original, originalvel, down, up, downvel;
float downdist, updist;
pmtrace_t trace;
vec3_t start, dest;
vec3_t original, originalvel, down, up, downvel;
pmove.velocity[2] = 0;
if (!pmove.velocity[0] && !pmove.velocity[1] && !pmove.velocity[2])
@ -314,17 +298,17 @@ PM_GroundMove (void)
VectorCopy (original, pmove.origin);
VectorCopy (originalvel, pmove.velocity);
// move up a stair height
// move up a stair height
VectorCopy (pmove.origin, dest);
dest[2] += STEPSIZE;
trace = PM_PlayerMove (pmove.origin, dest);
if (!trace.startsolid && !trace.allsolid) {
VectorCopy (trace.endpos, pmove.origin);
}
// slide move
// slide move
PM_FlyMove ();
// press down the stepheight
// press down the stepheight
VectorCopy (pmove.origin, dest);
dest[2] -= STEPSIZE;
trace = PM_PlayerMove (pmove.origin, dest);
@ -348,12 +332,9 @@ PM_GroundMove (void)
} else // copy z value from slide move
pmove.velocity[2] = downvel[2];
// if at a dead stop, retry the move with nudges to get around lips
// if at a dead stop, retry the move with nudges to get around lips
}
/*
PM_Friction
@ -363,11 +344,9 @@ void
PM_Friction (void)
{
float *vel;
float speed, newspeed;
float friction;
float drop;
vec3_t start, stop;
float drop, friction, speed, newspeed;
pmtrace_t trace;
vec3_t start, stop;
if (pmove.waterjumptime)
return;
@ -383,7 +362,7 @@ PM_Friction (void)
friction = movevars.friction;
// if the leading edge is over a dropoff, increase friction
// if the leading edge is over a dropoff, increase friction
if (onground != -1) {
start[0] = stop[0] = pmove.origin[0] + vel[0] / speed * 16;
start[1] = stop[1] = pmove.origin[1] + vel[1] / speed * 16;
@ -406,7 +385,7 @@ PM_Friction (void)
else if (onground != -1) // apply ground friction
drop += max (movevars.stopspeed, speed) * friction * frametime;
// scale the velocity
// scale the velocity
newspeed = speed - drop;
if (newspeed < 0)
newspeed = 0;
@ -417,15 +396,11 @@ PM_Friction (void)
vel[2] = vel[2] * newspeed;
}
/*
PM_Accelerate
*/
void
PM_Accelerate (vec3_t wishdir, float wishspeed, float accel)
{
int i;
float addspeed, accelspeed, currentspeed;
int i;
if (pmove.dead)
return;
@ -447,8 +422,8 @@ PM_Accelerate (vec3_t wishdir, float wishspeed, float accel)
void
PM_AirAccelerate (vec3_t wishdir, float wishspeed, float accel)
{
int i;
float addspeed, accelspeed, currentspeed, wishspd = wishspeed;
int i;
if (pmove.dead)
return;
@ -469,24 +444,15 @@ PM_AirAccelerate (vec3_t wishdir, float wishspeed, float accel)
pmove.velocity[i] += accelspeed * wishdir[i];
}
/*
PM_WaterMove
*/
void
PM_WaterMove (void)
{
int i;
vec3_t wishvel;
float wishspeed;
vec3_t wishdir;
vec3_t start, dest;
int i;
pmtrace_t trace;
vec3_t start, dest, wishdir, wishvel;
//
// user intentions
//
// user intentions
for (i = 0; i < 3; i++)
wishvel[i] =
forward[i] * pmove.cmd.forwardmove + right[i] * pmove.cmd.sidemove;
@ -505,14 +471,13 @@ PM_WaterMove (void)
}
wishspeed *= 0.7;
//
// water acceleration
//
// if (pmove.waterjumptime)
// Con_Printf ("wm->%f, %f, %f\n", pmove.velocity[0], pmove.velocity[1], pmove.velocity[2]);
// water acceleration
// if (pmove.waterjumptime)
// Con_Printf ("wm->%f, %f, %f\n", pmove.velocity[0], pmove.velocity[1],
// pmove.velocity[2]);
PM_Accelerate (wishdir, wishspeed, movevars.wateraccelerate);
// assume it is a stair or a slope, so press down from stepheight above
// assume it is a stair or a slope, so press down from stepheight above
VectorMA (pmove.origin, frametime, pmove.velocity, dest);
VectorCopy (dest, start);
start[2] += STEPSIZE + 1;
@ -526,19 +491,12 @@ PM_WaterMove (void)
PM_FlyMove ();
}
/*
PM_AirMove
*/
void
PM_AirMove (void)
{
int i;
vec3_t wishvel;
float fmove, smove;
vec3_t wishdir;
float wishspeed;
vec3_t original;
vec3_t original, wishdir, wishvel;
float fmove, smove, wishspeed;
fmove = pmove.cmd.forwardmove;
smove = pmove.cmd.sidemove;
@ -555,9 +513,7 @@ PM_AirMove (void)
VectorCopy (wishvel, wishdir);
wishspeed = VectorNormalize (wishdir);
//
// clamp to server defined max speed
//
// clamp to server defined max speed
if (wishspeed > movevars.maxspeed) {
VectorScale (wishvel, movevars.maxspeed / wishspeed, wishvel);
wishspeed = movevars.maxspeed;
@ -566,7 +522,8 @@ PM_AirMove (void)
if (onground != -1) {
pmove.velocity[2] = 0;
PM_Accelerate (wishdir, wishspeed, movevars.accelerate);
pmove.velocity[2] -= movevars.entgravity * movevars.gravity * frametime;
pmove.velocity[2] -= movevars.entgravity * movevars.gravity *
frametime;
PM_GroundMove ();
} else if (pmove.flying) {
PM_AirAccelerate (wishdir, wishspeed, movevars.accelerate);
@ -576,7 +533,8 @@ PM_AirMove (void)
PM_AirAccelerate (wishdir, wishspeed, movevars.accelerate);
// add gravity
pmove.velocity[2] -= movevars.entgravity * movevars.gravity * frametime;
pmove.velocity[2] -= movevars.entgravity * movevars.gravity *
frametime;
if (!PM_FlyMove ()) {
// the move didn't get blocked
@ -597,22 +555,17 @@ PM_AirMove (void)
}
}
/*
PM_CategorizePosition
*/
void
PM_CategorizePosition (void)
{
vec3_t point;
int cont;
pmtrace_t tr;
vec3_t point;
// if the player hull point one unit down is solid, the player
// is on ground
// if the player hull point one unit down is solid, the player
// is on ground
// see if standing on something solid
// see if standing on something solid
point[0] = pmove.origin[0];
point[1] = pmove.origin[1];
point[2] = pmove.origin[2] - 1;
@ -636,9 +589,7 @@ PM_CategorizePosition (void)
}
}
//
// get waterlevel
//
// get waterlevel
waterlevel = 0;
watertype = CONTENTS_EMPTY;
@ -660,10 +611,6 @@ PM_CategorizePosition (void)
}
}
/*
JumpButton
*/
void
JumpButton (void)
{
@ -708,15 +655,11 @@ JumpButton (void)
pmove.oldbuttons |= BUTTON_JUMP; // don't jump again until released
}
/*
CheckWaterJump
*/
void
CheckWaterJump (void)
{
vec3_t spot;
int cont;
vec3_t flatforward;
vec3_t flatforward, spot;
if (pmove.waterjumptime || pmove.flying)
return;
@ -757,21 +700,20 @@ CheckWaterJump (void)
void
NudgePosition (void)
{
vec3_t base;
int x, y, z;
int i;
int i, x, y, z;
static int sign[3] = { 0, -1, 1 };
vec3_t base;
VectorCopy (pmove.origin, base);
for (i = 0; i < 3; i++)
pmove.origin[i] = ((int) (pmove.origin[i] * 8)) * 0.125;
// pmove.origin[2] += 0.124;
// pmove.origin[2] += 0.124;
// if (pmove.dead)
// return; // might be a squished point, so don'y bother
// if (PM_TestPlayerPosition (pmove.origin) )
// return;
// if (pmove.dead)
// return; // might be a squished point, so don'y bother
// if (PM_TestPlayerPosition (pmove.origin) )
// return;
for (z = 0; z <= 2; z++) {
for (x = 0; x <= 2; x++) {
@ -785,25 +727,19 @@ NudgePosition (void)
}
}
VectorCopy (base, pmove.origin);
// Con_DPrintf ("NudgePosition: stuck\n");
// Con_DPrintf ("NudgePosition: stuck\n");
}
/*
SpectatorMove
*/
void
SpectatorMove (void)
{
float speed, drop, friction, control, newspeed;
float currentspeed, addspeed, accelspeed;
float control, drop, friction, fmove, smove, speed, newspeed;
float currentspeed, addspeed, accelspeed, wishspeed;
int i;
vec3_t wishvel;
float fmove, smove;
vec3_t wishdir;
float wishspeed;
// friction
speed = Length (pmove.velocity);
if (speed < 1) {
VectorCopy (vec3_origin, pmove.velocity)
@ -837,9 +773,7 @@ SpectatorMove (void)
VectorCopy (wishvel, wishdir);
wishspeed = VectorNormalize (wishdir);
//
// clamp to server defined max speed
//
if (wishspeed > movevars.spectatormaxspeed) {
VectorScale (wishvel, movevars.spectatormaxspeed / wishspeed, wishvel);
wishspeed = movevars.spectatormaxspeed;
@ -856,7 +790,6 @@ SpectatorMove (void)
for (i = 0; i < 3; i++)
pmove.velocity[i] += accelspeed * wishdir[i];
// move
VectorMA (pmove.origin, frametime, pmove.velocity, pmove.origin);
}

View file

@ -36,13 +36,14 @@
# include <strings.h>
#endif
#include "compat.h"
#include "QF/console.h"
#include "QF/model.h"
#include "pmove.h"
#include "QF/qtypes.h"
#include "QF/sys.h"
#include "compat.h"
#include "pmove.h"
static hull_t box_hull;
static dclipnode_t box_clipnodes[6];
static mplane_t box_planes[6];
@ -50,6 +51,7 @@ static mplane_t box_planes[6];
extern vec3_t player_mins;
extern vec3_t player_maxs;
/*
PM_InitBoxHull
@ -59,8 +61,7 @@ extern vec3_t player_maxs;
void
PM_InitBoxHull (void)
{
int i;
int side;
int side, i;
box_hull.clipnodes = box_clipnodes;
box_hull.planes = box_planes;
@ -84,7 +85,6 @@ PM_InitBoxHull (void)
}
/*
PM_HullForBox
@ -104,15 +104,11 @@ PM_HullForBox (vec3_t mins, vec3_t maxs)
return &box_hull;
}
/*
PM_HullPointContents
*/
int
PM_HullPointContents (hull_t *hull, int num, vec3_t p)
{
float d;
dclipnode_t *node;
float d;
mplane_t *plane;
while (num >= 0) {
@ -132,17 +128,14 @@ PM_HullPointContents (hull_t *hull, int num, vec3_t p)
return num;
}
/*
PM_PointContents
*/
int
PM_PointContents (vec3_t p)
{
float d;
dclipnode_t *node;
mplane_t *plane;
float d;
hull_t *hull;
int num;
mplane_t *plane;
hull = &pmove.physents[0].model->hulls[0];
@ -165,28 +158,20 @@ PM_PointContents (vec3_t p)
return num;
}
/*
LINE TESTING IN HULLS
*/
/* LINE TESTING IN HULLS */
// 1/32 epsilon to keep floating point happy
#define DIST_EPSILON (0.03125)
/*
PM_RecursiveHullCheck
*/
qboolean
PM_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
vec3_t p2, pmtrace_t *trace)
{
dclipnode_t *node;
float frac, midf, t1, t2;
int side, i;
mplane_t *plane;
float t1, t2;
float frac;
int i;
vec3_t mid;
int side;
float midf;
loc0:
// check for empty
@ -251,8 +236,8 @@ PM_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
if (PM_HullPointContents (hull, node->children[side ^ 1],
mid) != CONTENTS_SOLID) {
// go past the node
return PM_RecursiveHullCheck (hull, node->children[side ^ 1], midf, p2f,
mid, p2, trace);
return PM_RecursiveHullCheck (hull, node->children[side ^ 1], midf,
p2f, mid, p2, trace);
}
if (trace->allsolid)
@ -293,7 +278,6 @@ PM_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
return false;
}
/*
PM_TestPlayerPosition
@ -302,10 +286,10 @@ PM_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
qboolean
PM_TestPlayerPosition (vec3_t pos)
{
hull_t *hull;
int i;
physent_t *pe;
vec3_t mins, maxs, test;
hull_t *hull;
for (i = 0; i < pmove.numphysent; i++) {
pe = &pmove.physents[i];
@ -327,21 +311,17 @@ PM_TestPlayerPosition (vec3_t pos)
return true;
}
/*
PM_PlayerMove
*/
/* PM_PlayerMove */
pmtrace_t
PM_PlayerMove (vec3_t start, vec3_t end)
{
pmtrace_t trace, total;
vec3_t offset;
vec3_t start_l, end_l;
hull_t *hull;
int i;
physent_t *pe;
vec3_t mins, maxs;
pmtrace_t trace, total;
vec3_t maxs, mins, offset, start_l, end_l;
// fill in a default trace
// fill in a default trace
memset (&total, 0, sizeof (pmtrace_t));
total.fraction = 1;
@ -374,7 +354,7 @@ PM_PlayerMove (vec3_t start, vec3_t end)
trace.fraction = 1;
trace.allsolid = true;
// trace.startsolid = true;
// trace.startsolid = true;
VectorCopy (end, trace.endpos);
// trace a line through the apropriate clipping hull

View file

@ -39,7 +39,6 @@
#include <stdlib.h>
#include "QF/cmd.h"
#include "compat.h"
#include "QF/cvar.h"
#include "QF/draw.h"
#include "QF/msg.h"
@ -50,6 +49,7 @@
#include "bothdefs.h"
#include "cl_cam.h"
#include "client.h"
#include "compat.h"
#include "sbar.h"
int sb_updates; // if >= vid.numpages, no update needed
@ -88,6 +88,7 @@ static qboolean largegame = false;
cvar_t *cl_showscoresuid;
/*
Sbar_ShowTeamScores
@ -103,7 +104,6 @@ Sbar_ShowTeamScores (void)
sb_updates = 0;
}
/*
Sbar_DontShowTeamScores
@ -116,7 +116,6 @@ Sbar_DontShowTeamScores (void)
sb_updates = 0;
}
/*
Sbar_ShowScores
@ -132,7 +131,6 @@ Sbar_ShowScores (void)
sb_updates = 0;
}
/*
Sbar_DontShowScores
@ -145,14 +143,12 @@ Sbar_DontShowScores (void)
sb_updates = 0;
}
void
Sbar_Changed (void)
{
sb_updates = 0; // update next frame
}
void
Sbar_Init (void)
{
@ -249,7 +245,6 @@ Sbar_Init (void)
"show uid instead of ping on scores");
}
// drawing routines are reletive to the status bar location
void
Sbar_DrawPic (int x, int y, qpic_t *pic)
@ -257,7 +252,6 @@ Sbar_DrawPic (int x, int y, qpic_t *pic)
Draw_Pic (x, y + (vid.height - SBAR_HEIGHT), pic);
}
/*
Sbar_DrawSubPic
@ -271,7 +265,6 @@ Sbar_DrawSubPic (int x, int y, qpic_t *pic, int srcx, int srcy, int width,
height);
}
void
Sbar_DrawTransPic (int x, int y, qpic_t *pic)
{
@ -279,7 +272,6 @@ Sbar_DrawTransPic (int x, int y, qpic_t *pic)
pic);
}
/*
Sbar_DrawCharacter
@ -291,20 +283,17 @@ Sbar_DrawCharacter (int x, int y, int num)
Draw_Character (x + 4, y + vid.height - SBAR_HEIGHT, num);
}
void
Sbar_DrawString (int x, int y, char *str)
{
Draw_String (x, y + vid.height - SBAR_HEIGHT, str);
}
int
Sbar_itoa (int num, char *buf)
{
char *str;
int pow10;
int dig;
int dig, pow10;
str = buf;
@ -327,7 +316,6 @@ Sbar_itoa (int num, char *buf)
return str - buf;
}
void
Sbar_DrawNum (int x, int y, int num, int digits, int color)
{
@ -354,7 +342,6 @@ Sbar_DrawNum (int x, int y, int num, int digits, int color)
}
}
//ZOID: this should be MAX_CLIENTS, not MAX_SCOREBOARD!!
//int fragsort[MAX_SCOREBOARD];
int fragsort[MAX_CLIENTS];
@ -365,11 +352,11 @@ typedef struct {
int players;
int plow, phigh, ptotal;
} team_t;
team_t teams[MAX_CLIENTS];
int teamsort[MAX_CLIENTS];
int scoreboardteams;
void
Sbar_SortFrags (qboolean includespec)
{
@ -396,14 +383,12 @@ Sbar_SortFrags (qboolean includespec)
}
}
void
Sbar_SortTeams (void)
{
int i, j, k;
player_info_t *s;
int teamplay;
char t[16 + 1];
int teamplay, i, j, k;
player_info_t *s;
// request new ping times every two second
scoreboardteams = 0;
@ -463,14 +448,12 @@ Sbar_SortTeams (void)
}
}
int
Sbar_ColorForMap (int m)
{
return (bound (0, m, 13) * 16) + 8;
}
void
Sbar_SoloScoreboard (void)
{
@ -488,16 +471,13 @@ Sbar_SoloScoreboard (void)
Sbar_DrawString (184, 4, str);
}
void
Sbar_DrawInventory (void)
{
int i;
char num[6];
float time;
int flashon;
qboolean headsup;
qboolean hudswap;
int flashon, i;
qboolean headsup, hudswap;
headsup = !(cl_sbar->int_val || scr_viewsize->int_val < 100);
hudswap = cl_hudswap->int_val;
@ -522,8 +502,8 @@ Sbar_DrawInventory (void)
if (headsup) {
if (i || vid.height > 200)
Sbar_DrawSubPic ((hudswap) ? 0 : (vid.width - 24),
-68 - (7 - i) * 16, sb_weapons[flashon][i],
0, 0, 24, 16);
-68 - (7 - i) * 16,
sb_weapons[flashon][i], 0, 0, 24, 16);
} else
Sbar_DrawPic (i * 24, -16, sb_weapons[flashon][i]);
@ -536,7 +516,8 @@ Sbar_DrawInventory (void)
// ammo counts
for (i = 0; i < 4; i++) {
snprintf (num, sizeof (num), "%3i", min (cl.stats[STAT_SHELLS + i], 999));
snprintf (num, sizeof (num), "%3i", min (cl.stats[STAT_SHELLS + i],
999));
if (headsup) {
#define HUD_X(dist) ((hudswap) ? dist : (vid.width - (42 - dist)))
#define HUD_Y(n) (-24 - (4 - n) * 11)
@ -587,7 +568,6 @@ Sbar_DrawInventory (void)
}
}
void
Sbar_DrawFrags (void)
{
@ -642,7 +622,6 @@ Sbar_DrawFrags (void)
}
}
void
Sbar_DrawFace (void)
{
@ -679,7 +658,6 @@ Sbar_DrawFace (void)
Sbar_DrawPic (112, 0, sb_faces[f][anim]);
}
void
Sbar_DrawNormal (void)
{
@ -720,12 +698,11 @@ Sbar_DrawNormal (void)
Sbar_DrawNum (248, 0, cl.stats[STAT_AMMO], 3, cl.stats[STAT_AMMO] <= 10);
}
void
Sbar_Draw (int swap)
{
qboolean headsup;
char st[512];
qboolean headsup;
headsup = !(cl_sbar->int_val || scr_viewsize->int_val < 100);
if ((sb_updates >= vid.numpages) && !headsup)
@ -791,7 +768,6 @@ Sbar_Draw (int swap)
Sbar_MiniDeathmatchOverlay ();
}
void
Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
{
@ -818,7 +794,6 @@ Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
}
}
/*
Sbar_TeamOverlay
@ -828,14 +803,10 @@ Sbar_IntermissionNumber (int x, int y, int num, int digits, int color)
void
Sbar_TeamOverlay (void)
{
char num[12], team[5];
int pavg, plow, phigh, teamplay, i, k, l, x, y;
qpic_t *pic;
int i, k, l;
int x, y;
char num[12];
int teamplay;
char team[5];
team_t *tm;
int plow, phigh, pavg;
// request new ping times every two second
teamplay = atoi (Info_ValueForKey (cl.serverinfo, "teamplay"));
@ -913,7 +884,6 @@ Sbar_TeamOverlay (void)
Sbar_DeathmatchOverlay (y);
}
/*
Sbar_DeathmatchOverlay
@ -922,18 +892,11 @@ Sbar_TeamOverlay (void)
void
Sbar_DeathmatchOverlay (int start)
{
qpic_t *pic;
int i, k, l;
int top, bottom;
int x, y, f;
char num[12];
player_info_t *s;
int total;
int minutes;
int p;
int teamplay;
char team[5];
char num[12], team[5];
int minutes, teamplay, total, top, bottom, f, i, k, l, p, x, y;
int skip = 10;
player_info_t *s;
qpic_t *pic;
if (largegame)
skip = 8;
@ -972,7 +935,7 @@ Sbar_DeathmatchOverlay (int start)
else
Draw_String (x, y, " uid pl time frags team name");
y += 8;
// Draw_String ( x , y, "---- -- ---- ----- ---- ----------------");
// Draw_String ( x , y, "---- -- ---- ----- ---- ----------------");
Draw_String (x, y, "\x1d\x1e\x1e\x1f \x1d\x1f \x1d\x1e\x1e\x1f "
"\x1d\x1e\x1e\x1e\x1f \x1d\x1e\x1e\x1f \x1d\x1e\x1e"
"\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1e\x1f");
@ -1080,7 +1043,6 @@ Sbar_DeathmatchOverlay (int start)
largegame = true;
}
/*
Sbar_MiniDeathmatchOverlay
@ -1091,15 +1053,9 @@ Sbar_DeathmatchOverlay (int start)
void
Sbar_MiniDeathmatchOverlay (void)
{
int i, k;
int top, bottom;
int x, y, f;
char num[12];
int numlines, teamplay, top, bottom, f, i, k, x, y;
char name[16 + 1], num[12], team[5];
player_info_t *s;
int teamplay;
char team[5];
int numlines;
char name[16 + 1];
team_t *tm;
if (vid.width < 512 || !sb_lines)
@ -1222,7 +1178,6 @@ Sbar_MiniDeathmatchOverlay (void)
}
void
Sbar_IntermissionOverlay (void)
{
@ -1235,7 +1190,6 @@ Sbar_IntermissionOverlay (void)
Sbar_DeathmatchOverlay (0);
}
void
Sbar_FinaleOverlay (void)
{

View file

@ -36,7 +36,6 @@
# include <strings.h>
#endif
#include "compat.h"
#include "QF/console.h"
#include "QF/cvar.h"
#include "QF/hash.h"
@ -47,6 +46,7 @@
#include "QF/vfs.h"
#include "client.h"
#include "compat.h"
#define MAX_TEMP_SKINS 64 //XXX dynamic?

View file

@ -38,7 +38,6 @@
#include <errno.h>
#include "compat.h"
#include "QF/console.h"
#include "QF/cmd.h"
#include "QF/cvar.h"
@ -49,19 +48,24 @@
#include "bothdefs.h"
#include "client.h"
#include "compat.h"
extern cvar_t *skin;
cvar_t *cl_deadbodyfilter;
cvar_t *cl_gibfilter;
cvar_t *cl_parsesay;
cvar_t *cl_nofake;
static qboolean died = false, recorded_location = false;
static vec3_t death_location, last_recorded_location;
static vec3_t death_location, last_recorded_location;
cvar_t *cl_deadbodyfilter;
cvar_t *cl_gibfilter;
cvar_t *cl_parsesay;
cvar_t *cl_nofake;
extern cvar_t *skin;
void
Team_BestWeaponImpulse (void)
{
int best, i, imp, items;
extern int in_impulse;
items = cl.stats[STAT_ITEMS];
@ -73,38 +77,37 @@ Team_BestWeaponImpulse (void)
continue;
switch (imp) {
case 1:
if (items & IT_AXE)
best = 1;
break;
case 2:
if (items & IT_SHOTGUN && cl.stats[STAT_SHELLS] >= 1)
best = 2;
break;
case 3:
if (items & IT_SUPER_SHOTGUN && cl.stats[STAT_SHELLS] >= 2)
best = 3;
break;
case 4:
if (items & IT_NAILGUN && cl.stats[STAT_NAILS] >= 1)
best = 4;
break;
case 5:
if (items & IT_SUPER_NAILGUN && cl.stats[STAT_NAILS] >= 2)
best = 5;
break;
case 6:
if (items & IT_GRENADE_LAUNCHER && cl.stats[STAT_ROCKETS] >= 1)
best = 6;
break;
case 7:
if (items & IT_ROCKET_LAUNCHER && cl.stats[STAT_ROCKETS] >= 1)
best = 7;
break;
case 8:
if (items & IT_LIGHTNING && cl.stats[STAT_CELLS] >= 1)
best = 8;
case 1:
if (items & IT_AXE)
best = 1;
break;
case 2:
if (items & IT_SHOTGUN && cl.stats[STAT_SHELLS] >= 1)
best = 2;
break;
case 3:
if (items & IT_SUPER_SHOTGUN && cl.stats[STAT_SHELLS] >= 2)
best = 3;
break;
case 4:
if (items & IT_NAILGUN && cl.stats[STAT_NAILS] >= 1)
best = 4;
break;
case 5:
if (items & IT_SUPER_NAILGUN && cl.stats[STAT_NAILS] >= 2)
best = 5;
break;
case 6:
if (items & IT_GRENADE_LAUNCHER && cl.stats[STAT_ROCKETS] >= 1)
best = 6;
break;
case 7:
if (items & IT_ROCKET_LAUNCHER && cl.stats[STAT_ROCKETS] >= 1)
best = 7;
break;
case 8:
if (items & IT_LIGHTNING && cl.stats[STAT_CELLS] >= 1)
best = 8;
}
}
@ -116,10 +119,10 @@ Team_BestWeaponImpulse (void)
const char *
Team_ParseSay (const char *s)
{
static char buf[1024];
int i, bracket;
char c, chr, t2[128], t3[128];
const char *t1;
static char buf[1024];
int i, bracket;
static location_t *location = NULL;
if (!cl_parsesay->int_val)
@ -131,27 +134,27 @@ Team_ParseSay (const char *s)
if ((*s == '$') && (s[1] != '\0')) {
c = 0;
switch (s[1]) {
case '\\':
c = 13;
break; // fake message
case '[':
c = 0x90;
break; // colored brackets
case ']':
c = 0x91;
break;
case 'G':
c = 0x86;
break; // ocrana leds
case 'R':
c = 0x87;
break;
case 'Y':
c = 0x88;
break;
case 'B':
c = 0x89;
break;
case '\\':
c = 13;
break; // fake message
case '[':
c = 0x90;
break; // colored brackets
case ']':
c = 0x91;
break;
case 'G':
c = 0x86;
break; // ocrana leds
case 'R':
c = 0x87;
break;
case 'Y':
c = 0x88;
break;
case 'B':
c = 0x89;
break;
}
if (c) {
@ -174,80 +177,59 @@ Team_ParseSay (const char *s)
s += 2;
}
switch (chr) {
case '%':
t2[0] = '%';
t2[1] = 0;
t1 = t2;
break;
case 's':
bracket = 0;
t1 = skin->string;
break;
case 'd':
bracket = 0;
if (died) {
location = locs_find (death_location);
if (location) {
recorded_location = true;
VectorCopy (death_location, last_recorded_location);
t1 = location->name;
break;
}
}
goto location;
case 'r':
bracket = 0;
if (recorded_location) {
location = locs_find (last_recorded_location);
if (location) {
t1 = location->name;
break;
}
}
goto location;
case 'l':
location:
bracket = 0;
location = locs_find (cl.simorg);
case '%':
t2[0] = '%';
t2[1] = 0;
t1 = t2;
break;
case 's':
bracket = 0;
t1 = skin->string;
break;
case 'd':
bracket = 0;
if (died) {
location = locs_find (death_location);
if (location) {
recorded_location = true;
VectorCopy (cl.simorg, last_recorded_location);
VectorCopy (death_location, last_recorded_location);
t1 = location->name;
} else
snprintf (t2, sizeof (t2), "Unknown!\n");
break;
case 'a':
if (bracket) {
if (cl.stats[STAT_ARMOR] > 50)
bracket = 0;
break;
}
}
goto location;
case 'r':
bracket = 0;
if (recorded_location) {
location = locs_find (last_recorded_location);
if (location) {
t1 = location->name;
break;
}
}
goto location;
case 'l':
location:
bracket = 0;
location = locs_find (cl.simorg);
if (location) {
recorded_location = true;
VectorCopy (cl.simorg, last_recorded_location);
t1 = location->name;
} else
snprintf (t2, sizeof (t2), "Unknown!\n");
break;
case 'a':
if (bracket) {
if (cl.stats[STAT_ARMOR] > 50)
bracket = 0;
if (cl.stats[STAT_ITEMS] & IT_ARMOR3)
t3[0] = 'R' | 0x80;
else if (cl.stats[STAT_ITEMS] & IT_ARMOR2)
t3[0] = 'Y' | 0x80;
else if (cl.stats[STAT_ITEMS] & IT_ARMOR1)
t3[0] = 'G' | 0x80;
else {
t2[0] = 'N' | 0x80;
t2[1] = 'O' | 0x80;
t2[2] = 'N' | 0x80;
t2[3] = 'E' | 0x80;
t2[4] = '!' | 0x80;
}
snprintf (t2, sizeof (t2), "%sa:%i", t3,
cl.stats[STAT_ARMOR]);
} else
snprintf (t2, sizeof (t2), "%i", cl.stats[STAT_ARMOR]);
break;
case 'A':
bracket = 0;
if (cl.stats[STAT_ITEMS] & IT_ARMOR3)
t2[0] = 'R' | 0x80;
t3[0] = 'R' | 0x80;
else if (cl.stats[STAT_ITEMS] & IT_ARMOR2)
t2[0] = 'Y' | 0x80;
t3[0] = 'Y' | 0x80;
else if (cl.stats[STAT_ITEMS] & IT_ARMOR1)
t2[0] = 'G' | 0x80;
t3[0] = 'G' | 0x80;
else {
t2[0] = 'N' | 0x80;
t2[1] = 'O' | 0x80;
@ -255,18 +237,39 @@ Team_ParseSay (const char *s)
t2[3] = 'E' | 0x80;
t2[4] = '!' | 0x80;
}
break;
case 'h':
if (bracket) {
if (cl.stats[STAT_HEALTH] > 50)
bracket = 0;
snprintf (t2, sizeof (t2), "h:%i",
cl.stats[STAT_HEALTH]);
} else
snprintf (t2, sizeof (t2), "%i", cl.stats[STAT_HEALTH]);
break;
default:
bracket = 0;
snprintf (t2, sizeof (t2), "%sa:%i", t3,
cl.stats[STAT_ARMOR]);
} else
snprintf (t2, sizeof (t2), "%i", cl.stats[STAT_ARMOR]);
break;
case 'A':
bracket = 0;
if (cl.stats[STAT_ITEMS] & IT_ARMOR3)
t2[0] = 'R' | 0x80;
else if (cl.stats[STAT_ITEMS] & IT_ARMOR2)
t2[0] = 'Y' | 0x80;
else if (cl.stats[STAT_ITEMS] & IT_ARMOR1)
t2[0] = 'G' | 0x80;
else {
t2[0] = 'N' | 0x80;
t2[1] = 'O' | 0x80;
t2[2] = 'N' | 0x80;
t2[3] = 'E' | 0x80;
t2[4] = '!' | 0x80;
}
break;
case 'h':
if (bracket) {
if (cl.stats[STAT_HEALTH] > 50)
bracket = 0;
snprintf (t2, sizeof (t2), "h:%i",
cl.stats[STAT_HEALTH]);
} else
snprintf (t2, sizeof (t2), "%i", cl.stats[STAT_HEALTH]);
break;
default:
bracket = 0;
}
if (!t1) {
@ -317,11 +320,11 @@ Team_NewMap (void)
died = false;
recorded_location = false;
mapname = strdup(cl.worldmodel->name);
t2 = malloc(sizeof(cl.worldmodel->name));
mapname = strdup (cl.worldmodel->name);
t2 = malloc (sizeof(cl.worldmodel->name));
if (!mapname || !t2)
Sys_Error ("Can't duplicate mapname!");
map_to_loc(mapname,t2);
map_to_loc (mapname,t2);
t1 = strrchr (t2, '/');
if (!t1)
Sys_Error ("Can't find /!");
@ -335,38 +338,42 @@ Team_NewMap (void)
void
Team_Init_Cvars (void)
{
cl_deadbodyfilter =
Cvar_Get ("cl_deadbodyfilter", "0", CVAR_NONE, NULL,
"Hide dead player models");
cl_gibfilter = Cvar_Get ("cl_gibfilter", "0", CVAR_NONE, NULL, "Hide gibs");
cl_deadbodyfilter = Cvar_Get ("cl_deadbodyfilter", "0", CVAR_NONE, NULL,
"Hide dead player models");
cl_gibfilter = Cvar_Get ("cl_gibfilter", "0", CVAR_NONE, NULL,
"Hide gibs");
cl_parsesay = Cvar_Get ("cl_parsesay", "0", CVAR_NONE, NULL,
"Use .loc files to find your present location when you put %l in messages");
"Use .loc files to find your present location "
"when you put %l in messages");
cl_nofake = Cvar_Get ("cl_nofake", "0", CVAR_NONE, NULL,
"Unhide fake messages");
"Unhide fake messages");
}
/*
locs_loc
Location marker manipulation
locs_loc
Location marker manipulation
*/
void
locs_loc (void)
{
char locfile[MAX_OSPATH];
char *mapname;
const char *desc = NULL;
char locfile[MAX_OSPATH];
//FIXME checking needed to make sure you are actually in the game and a live.
// FIXME: need to check to ensure you are actually in the game and alive.
if (Cmd_Argc () == 1) {
Con_Printf ("loc <add|delete|rename|move|save|zsave> [<description>] :Modifies location data, add|rename take <description> parameter\n");
Con_Printf ("loc <add|delete|rename|move|save|zsave> [<description>] "
":Modifies location data, add|rename take <description> "
"parameter\n");
return;
}
if (Cmd_Argc () >= 3)
desc = Cmd_Args (2);
mapname = malloc(sizeof(cl.worldmodel->name));
mapname = malloc (sizeof(cl.worldmodel->name));
if (!mapname)
Sys_Error ("Can't duplicate mapname!");
map_to_loc(cl.worldmodel->name,mapname);
map_to_loc (cl.worldmodel->name,mapname);
snprintf (locfile, sizeof (locfile), "%s/%s", com_gamedir, mapname);
free(mapname);
@ -374,48 +381,52 @@ locs_loc (void)
if (Cmd_Argc () == 2) {
locs_save(locfile, false);
} else
Con_Printf("loc save :saves locs from memory into a .loc file\n");
Con_Printf ("loc save :saves locs from memory into a .loc file\n");
}
if (strcasecmp(Cmd_Argv(1),"zsave") == 0) {
if (Cmd_Argc () == 2) {
locs_save(locfile, true);
} else
Con_Printf("loc save :saves locs from memory into a .loc file\n");
Con_Printf ("loc save :saves locs from memory into a .loc file\n");
}
if (strcasecmp(Cmd_Argv(1),"add") == 0) {
if (Cmd_Argc () >= 3)
locs_mark(cl.simorg,desc);
else
Con_Printf("loc add <description> :marks the current location with the description and records the information into a loc file.\n");
Con_Printf ("loc add <description> :marks the current location "
"with the description and records the information "
"into a loc file.\n");
}
if (strcasecmp(Cmd_Argv(1),"rename") == 0) {
if (Cmd_Argc () >= 3)
locs_edit(cl.simorg,desc);
else
Con_Printf("loc rename <description> :changes the description of the nearest location marker\n");
Con_Printf ("loc rename <description> :changes the description of "
"the nearest location marker\n");
}
if (strcasecmp(Cmd_Argv(1),"delete") == 0) {
if (Cmd_Argc () == 2)
locs_del(cl.simorg);
else
Con_Printf("loc delete :removes nearest location marker\n");
Con_Printf ("loc delete :removes nearest location marker\n");
}
if (strcasecmp(Cmd_Argv(1),"move") == 0) {
if (Cmd_Argc () == 2)
locs_edit(cl.simorg,NULL);
else
Con_Printf("loc move :moves the nearest location marker to your current location\n");
Con_Printf ("loc move :moves the nearest location marker to your "
"current location\n");
}
}
void
Locs_Init (void)
{
Cmd_AddCommand ("loc", locs_loc, "Location marker editing commands: 'loc help' for more");
Cmd_AddCommand ("loc", locs_loc, "Location marker editing commands: 'loc "
"help' for more");
}

View file

@ -65,9 +65,7 @@ typedef struct {
int SV_HullPointContents (hull_t *hull, int num, vec3_t p);
/*
HULL BOXES
*/
/* HULL BOXES */
static hull_t box_hull;
static dclipnode_t box_clipnodes[6];
@ -83,8 +81,7 @@ static mplane_t box_planes[6];
void
SV_InitHull (hull_t *hull, dclipnode_t *clipnodes, mplane_t *planes)
{
int i;
int side;
int side, i;
hull->clipnodes = clipnodes;
hull->planes = planes;
@ -113,7 +110,6 @@ SV_InitBoxHull (void)
SV_InitHull (&box_hull, box_clipnodes, box_planes);
}
/*
SV_HullForBox
@ -133,7 +129,6 @@ SV_HullForBox (vec3_t mins, vec3_t maxs)
return &box_hull;
}
/*
SV_HullForEntity
@ -145,11 +140,10 @@ SV_HullForBox (vec3_t mins, vec3_t maxs)
hull_t *
SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
{
model_t *model;
vec3_t size;
vec3_t hullmins, hullmaxs;
hull_t *hull = 0;
int hull_index = 0;
model_t *model;
vec3_t hullmins, hullmaxs, size;
if ((sv_fields.rotated_bbox != -1
&& SVinteger (ent, rotated_bbox))
@ -196,21 +190,16 @@ SV_HullForEntity (edict_t *ent, vec3_t mins, vec3_t maxs, vec3_t offset)
return hull;
}
/*
ENTITY AREA CHECKING
*/
/* ENTITY AREA CHECKING */
areanode_t sv_areanodes[AREA_NODES];
int sv_numareanodes;
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 mins1, maxs1, mins2, maxs2, size;
anode = &sv_areanodes[sv_numareanodes];
sv_numareanodes++;
@ -244,7 +233,6 @@ SV_CreateAreaNode (int depth, vec3_t mins, vec3_t maxs)
return anode;
}
void
SV_ClearWorld (void)
{
@ -269,9 +257,9 @@ SV_UnlinkEdict (edict_t *ent)
void
SV_TouchLinks (edict_t *ent, areanode_t *node)
{
link_t *l, *next;
edict_t *touch;
int old_self, old_other;
link_t *l, *next;
// touch linked edicts
for (l = node->trigger_edicts.next; l != &node->trigger_edicts; l = next) {
@ -316,10 +304,9 @@ SV_TouchLinks (edict_t *ent, areanode_t *node)
void
SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
{
mplane_t *splitplane;
int leafnum, sides;
mleaf_t *leaf;
int sides;
int leafnum;
mplane_t *splitplane;
if (node->contents == CONTENTS_SOLID)
return;
@ -350,7 +337,6 @@ SV_FindTouchedLeafs (edict_t *ent, mnode_t *node)
SV_FindTouchedLeafs (ent, node->children[1]);
}
void
SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
{
@ -420,19 +406,15 @@ SV_LinkEdict (edict_t *ent, qboolean touch_triggers)
SV_TouchLinks (ent, sv_areanodes);
}
/*
POINT TESTING IN HULLS
*/
/* POINT TESTING IN HULLS */
#ifndef USE_INTEL_ASM
int
SV_HullPointContents (hull_t *hull, int num, vec3_t p)
{
float d;
dclipnode_t *node;
mplane_t *plane;
float d;
mplane_t *plane;
while (num >= 0) {
if (num < hull->firstclipnode || num > hull->lastclipnode)
@ -455,7 +437,6 @@ SV_HullPointContents (hull_t *hull, int num, vec3_t p)
}
#endif // !USE_INTEL_ASM
int
SV_PointContents (vec3_t p)
{
@ -467,14 +448,12 @@ SV_PointContents (vec3_t p)
return cont;
}
int
SV_TruePointContents (vec3_t p)
{
return SV_HullPointContents (&sv.worldmodel->hulls[0], 0, p);
}
/*
SV_TestEntityPosition
@ -498,27 +477,20 @@ SV_TestEntityPosition (edict_t *ent)
return NULL;
}
/*
LINE TESTING IN HULLS
*/
/* LINE TESTING IN HULLS */
// 1/32 epsilon to keep floating point happy
#define DIST_EPSILON (0.03125)
qboolean
SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
vec3_t p2, trace_t *trace)
{
dclipnode_t *node;
float frac, midf, t1, t2;
int side, i;
mplane_t *plane;
float t1, t2;
float frac;
int i;
vec3_t mid;
int side;
float midf;
// check for empty
if (num < 0) {
@ -631,7 +603,6 @@ SV_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
return false;
}
/*
SV_ClipMoveToEntity
@ -642,10 +613,9 @@ trace_t
SV_ClipMoveToEntity (edict_t *touched, edict_t *mover, vec3_t start,
vec3_t mins, vec3_t maxs, vec3_t end)
{
trace_t trace;
vec3_t offset;
vec3_t start_l, end_l;
hull_t *hull;
trace_t trace;
vec3_t offset, start_l, end_l;
// fill in a default trace
memset (&trace, 0, sizeof (trace_t));
@ -675,7 +645,6 @@ SV_ClipMoveToEntity (edict_t *touched, edict_t *mover, vec3_t start,
return trace;
}
/*
SV_ClipToLinks
@ -684,8 +653,8 @@ SV_ClipMoveToEntity (edict_t *touched, edict_t *mover, vec3_t start,
void
SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
{
link_t *l, *next;
edict_t *touch;
link_t *l, *next;
trace_t trace;
// touch linked edicts
@ -755,7 +724,6 @@ SV_ClipToLinks (areanode_t *node, moveclip_t * clip)
SV_ClipToLinks (node->children[1], clip);
}
void
SV_MoveBounds (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end,
vec3_t boxmins, vec3_t boxmaxs)
@ -779,13 +747,12 @@ SV_MoveBounds (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end,
#endif
}
trace_t
SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type,
edict_t *passedict)
{
moveclip_t clip;
int i;
moveclip_t clip;
memset (&clip, 0, sizeof (moveclip_t));
@ -823,11 +790,10 @@ SV_Move (vec3_t start, vec3_t mins, vec3_t maxs, vec3_t end, int type,
edict_t *
SV_TestPlayerPosition (edict_t *ent, vec3_t origin)
{
hull_t *hull;
edict_t *check;
vec3_t boxmins, boxmaxs;
vec3_t offset;
hull_t *hull;
int e;
vec3_t boxmins, boxmaxs, offset;
// check world first
hull = &sv.worldmodel->hulls[1];
@ -839,7 +805,8 @@ SV_TestPlayerPosition (edict_t *ent, vec3_t origin)
VectorAdd (origin, SVvector (ent, maxs), boxmaxs);
check = NEXT_EDICT (&sv_pr_state, sv.edicts);
for (e = 1; e < sv.num_edicts; e++, check = NEXT_EDICT (&sv_pr_state, check)) {
for (e = 1; e < sv.num_edicts; e++, check = NEXT_EDICT (&sv_pr_state,
check)) {
if (check->free)
continue;
if (check == ent)