Allows ETF ladders to work properly with QW player physics.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1959 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2006-02-12 04:47:10 +00:00
parent 4068fdf967
commit f2c0995cfc
2 changed files with 23 additions and 0 deletions

View file

@ -504,6 +504,10 @@ typedef struct
#define SURF_FLOWING 0x40 // scroll towards angle
#define SURF_NODRAW 0x80 // don't bother referencing the texture
#define SURF_NODRAW 0x80 // don't bother referencing the texture
#define Q3SURF_LADDER 0x8 //wee
// content masks
#define MASK_ALL (-1)
#define MASK_SOLID (Q2CONTENTS_SOLID|Q2CONTENTS_WINDOW)

View file

@ -726,6 +726,25 @@ void PM_CategorizePosition (void)
//are we on a ladder?
#ifdef Q2BSPS
if (pmove.physents[0].model->fromgame == fg_quake3)
{
trace_t t;
vec3_t flatforward, fwd1;
flatforward[0] = forward[0];
flatforward[1] = forward[1];
flatforward[2] = 0;
VectorNormalize (flatforward);
VectorMA (pmove.origin, 24, flatforward, fwd1);
t = CM_BoxTrace(pmove.physents[0].model, pmove.origin, fwd1, player_mins, player_maxs, MASK_PLAYERSOLID);
if (t.surface->flags & Q3SURF_LADDER)
{
pmove.onladder = true;
pmove.onground = false; // too steep
}
}
if (cont & FTECONTENTS_LADDER && pmove.physents[0].model->fromgame == fg_quake2)
{
trace_t t;