mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-20 09:21:09 +00:00
Revert "make droptofloor continue the trace if it starts solid"
This reverts commit 10232acdfe
.
The problem was really in the trace code, but it got fixed by "accident"
when I had similar problems in hipnotic a couple of years later. Now to
figure out just what the trace could really should be doing.
This commit is contained in:
parent
31640dd1b9
commit
c2af7896bd
3 changed files with 11 additions and 18 deletions
|
@ -51,8 +51,6 @@ typedef struct trace_s {
|
|||
struct edict_s *ent; // entity the surface is on
|
||||
} trace_t;
|
||||
|
||||
// 1/32 epsilon to keep floating point happy
|
||||
#define DIST_EPSILON (0.03125)
|
||||
|
||||
#define MOVE_NORMAL 0
|
||||
#define MOVE_NOMONSTERS 1
|
||||
|
|
|
@ -49,6 +49,9 @@ static __attribute__ ((used)) const char rcsid[] =
|
|||
|
||||
/* LINE TESTING IN HULLS */
|
||||
|
||||
// 1/32 epsilon to keep floating point happy
|
||||
#define DIST_EPSILON (0.03125)
|
||||
|
||||
typedef struct {
|
||||
vec3_t end;
|
||||
int side;
|
||||
|
|
|
@ -849,23 +849,15 @@ PF_droptofloor (progs_t *pr)
|
|||
trace = SV_Move (SVvector (ent, origin), SVvector (ent, mins),
|
||||
SVvector (ent, maxs), end, false, ent);
|
||||
|
||||
R_FLOAT (pr) = 0;
|
||||
if (trace.fraction == 1 || trace.allsolid)
|
||||
return;
|
||||
if (trace.startsolid) {
|
||||
vec3_t org;
|
||||
VectorCopy (trace.endpos, org);
|
||||
org[2] -= 2 * DIST_EPSILON;
|
||||
trace = SV_Move (org, SVvector (ent, mins), SVvector (ent, maxs), end,
|
||||
false, ent);
|
||||
if (trace.fraction == 1 || trace.allsolid)
|
||||
return;
|
||||
if (trace.fraction == 1 || trace.allsolid) {
|
||||
R_FLOAT (pr) = 0;
|
||||
} else {
|
||||
VectorCopy (trace.endpos, SVvector (ent, origin));
|
||||
SV_LinkEdict (ent, false);
|
||||
SVfloat (ent, flags) = (int) SVfloat (ent, flags) | FL_ONGROUND;
|
||||
SVentity (ent, groundentity) = EDICT_TO_PROG (pr, trace.ent);
|
||||
R_FLOAT (pr) = 1;
|
||||
}
|
||||
VectorCopy (trace.endpos, SVvector (ent, origin));
|
||||
SV_LinkEdict (ent, false);
|
||||
SVfloat (ent, flags) = (int) SVfloat (ent, flags) | FL_ONGROUND;
|
||||
SVentity (ent, groundentity) = EDICT_TO_PROG (pr, trace.ent);
|
||||
R_FLOAT (pr) = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue