mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-28 23:02:31 +00:00
revert my sticky corners fix. sticky corsers are better than getting suck so
it's impossible to move.
This commit is contained in:
parent
604e398e66
commit
549bbbdb1b
1 changed files with 8 additions and 13 deletions
|
@ -232,9 +232,13 @@ PM_RecursiveHullCheck (hull_t *hull, int num, float p1f, float p2f, vec3_t p1,
|
||||||
num = node->children[1];
|
num = node->children[1];
|
||||||
goto loc0;
|
goto loc0;
|
||||||
}
|
}
|
||||||
|
// put the crosspoint DIST_EPSILON pixels on the near side so that both
|
||||||
|
// p1 and mid are on the same side of the plane
|
||||||
side = (t1 < 0);
|
side = (t1 < 0);
|
||||||
frac = bound (0, t1 / (t1 - t2), 1);
|
if (side)
|
||||||
|
frac = bound (0, (t1 + DIST_EPSILON) / (t1 - t2), 1);
|
||||||
|
else
|
||||||
|
frac = bound (0, (t1 - DIST_EPSILON) / (t1 - t2), 1);
|
||||||
|
|
||||||
midf = p1f + (p2f - p1f) * frac;
|
midf = p1f + (p2f - p1f) * frac;
|
||||||
for (i = 0; i < 3; i++)
|
for (i = 0; i < 3; i++)
|
||||||
|
@ -364,6 +368,7 @@ PM_PlayerMove (vec3_t start, vec3_t end)
|
||||||
hull = PM_HullForBox (mins, maxs);
|
hull = PM_HullForBox (mins, maxs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// PM_HullForEntity (ent, mins, maxs, offset);
|
||||||
VectorCopy (pe->origin, offset);
|
VectorCopy (pe->origin, offset);
|
||||||
|
|
||||||
VectorSubtract (start, offset, start_l);
|
VectorSubtract (start, offset, start_l);
|
||||||
|
@ -374,6 +379,7 @@ PM_PlayerMove (vec3_t start, vec3_t end)
|
||||||
|
|
||||||
trace.fraction = 1;
|
trace.fraction = 1;
|
||||||
trace.allsolid = true;
|
trace.allsolid = true;
|
||||||
|
// trace.startsolid = true;
|
||||||
VectorCopy (end, trace.endpos);
|
VectorCopy (end, trace.endpos);
|
||||||
|
|
||||||
// trace a line through the apropriate clipping hull
|
// trace a line through the apropriate clipping hull
|
||||||
|
@ -394,17 +400,6 @@ PM_PlayerMove (vec3_t start, vec3_t end)
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
/* if the fraction and endpos are not brought in a bit, the player cannot
|
|
||||||
slide along a wall */
|
|
||||||
if (total.fraction && total.fraction < 1.0) {
|
|
||||||
vec3_t v;
|
|
||||||
float l, f;
|
|
||||||
VectorSubtract (total.endpos, start, v);
|
|
||||||
l = VectorNormalize (v);
|
|
||||||
f = l - DIST_EPSILON;
|
|
||||||
VectorMA (start, f, v, total.endpos);
|
|
||||||
total.fraction *= f/l;
|
|
||||||
}
|
|
||||||
|
|
||||||
return total;
|
return total;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue