mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-23 12:52:46 +00:00
Header/whitespace rampage continues.
This commit is contained in:
parent
f4fd3178f4
commit
b1c0bb7626
6 changed files with 306 additions and 461 deletions
|
@ -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
|
||||
//
|
||||
for (i = 0; i < numplanes; i++) {
|
||||
PM_ClipVelocity (original_velocity, planes[i], pmove.velocity, 1);
|
||||
for (j = 0; j < numplanes; j++)
|
||||
|
@ -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 (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])
|
||||
|
@ -349,11 +333,8 @@ PM_GroundMove (void)
|
|||
pmove.velocity[2] = downvel[2];
|
||||
|
||||
// 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;
|
||||
|
@ -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
|
||||
//
|
||||
for (i = 0; i < 3; i++)
|
||||
wishvel[i] =
|
||||
forward[i] * pmove.cmd.forwardmove + right[i] * pmove.cmd.sidemove;
|
||||
|
@ -505,11 +471,10 @@ 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]);
|
||||
// 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
|
||||
|
@ -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
|
||||
//
|
||||
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,17 +555,12 @@ 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
|
||||
|
@ -636,9 +589,7 @@ PM_CategorizePosition (void)
|
|||
}
|
||||
}
|
||||
|
||||
//
|
||||
// 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,10 +700,9 @@ 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);
|
||||
|
||||
|
@ -788,22 +730,16 @@ NudgePosition (void)
|
|||
// 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);
|
||||
}
|
||||
|
|
|
@ -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,19 +311,15 @@ 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
|
||||
memset (&total, 0, sizeof (pmtrace_t));
|
||||
|
|
|
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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?
|
||||
|
||||
|
|
|
@ -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"
|
||||
|
||||
static qboolean died = false, recorded_location = false;
|
||||
static vec3_t death_location, last_recorded_location;
|
||||
|
||||
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;
|
||||
|
||||
extern cvar_t *skin;
|
||||
|
||||
|
||||
void
|
||||
Team_BestWeaponImpulse (void)
|
||||
{
|
||||
int best, i, imp, items;
|
||||
|
||||
extern int in_impulse;
|
||||
|
||||
items = cl.stats[STAT_ITEMS];
|
||||
|
@ -104,7 +108,6 @@ Team_BestWeaponImpulse (void)
|
|||
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)
|
||||
|
@ -335,30 +338,34 @@ Team_NewMap (void)
|
|||
void
|
||||
Team_Init_Cvars (void)
|
||||
{
|
||||
cl_deadbodyfilter =
|
||||
Cvar_Get ("cl_deadbodyfilter", "0", CVAR_NONE, NULL,
|
||||
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_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");
|
||||
}
|
||||
|
||||
/*
|
||||
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)
|
||||
|
@ -388,14 +395,17 @@ locs_loc (void)
|
|||
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) {
|
||||
|
@ -409,13 +419,14 @@ locs_loc (void)
|
|||
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");
|
||||
}
|
||||
|
||||
|
|
|
@ -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,18 +406,14 @@ 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;
|
||||
float d;
|
||||
mplane_t *plane;
|
||||
|
||||
while (num >= 0) {
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue