mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-19 07:20:50 +00:00
Make very tiny movements no-ops.
This affects pushers in their think code. This makes NQ a little more like QW, but doesn't really seem to change much.
This commit is contained in:
parent
9bd4bbee52
commit
89ec14e0fc
2 changed files with 12 additions and 3 deletions
|
@ -411,7 +411,7 @@ SV_PushEntity (edict_t *ent, vec3_t push)
|
|||
}
|
||||
|
||||
static qboolean
|
||||
SV_Push (edict_t *pusher, vec3_t tmove, vec3_t amove)
|
||||
SV_Push (edict_t *pusher, const vec3_t tmove, const vec3_t amove)
|
||||
{
|
||||
float solid_save;
|
||||
int num_moved, i, e;
|
||||
|
@ -566,6 +566,8 @@ static void
|
|||
SV_Physics_Pusher (edict_t *ent)
|
||||
{
|
||||
float movetime, oldltime, thinktime;
|
||||
float l;
|
||||
vec3_t oldorg, move;
|
||||
|
||||
oldltime = SVfloat (ent, ltime);
|
||||
|
||||
|
@ -583,13 +585,20 @@ SV_Physics_Pusher (edict_t *ent)
|
|||
}
|
||||
|
||||
if (thinktime > oldltime && thinktime <= SVfloat (ent, ltime)) {
|
||||
VectorCopy (SVvector (ent, origin), oldorg);
|
||||
SVfloat (ent, nextthink) = 0;
|
||||
*sv_globals.time = sv.time;
|
||||
sv_pr_think (ent);
|
||||
if (ent->free)
|
||||
return;
|
||||
}
|
||||
VectorSubtract (SVvector (ent, origin), oldorg, move);
|
||||
|
||||
l = VectorLength (move);
|
||||
if (l > (1.0 / 64.0)) {
|
||||
VectorCopy (oldorg, SVvector (ent, origin));
|
||||
SV_Push (ent, move, vec3_origin); //FIXME angle
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -645,7 +645,7 @@ SV_ClipMoveToEntity (edict_t *touched, const vec3_t start,
|
|||
// trace a line through the apropriate clipping hull
|
||||
MOD_TraceLine (hull, hull->firstclipnode, start_l, end_l, &trace);
|
||||
|
||||
// fix trace up by the rotation and offset
|
||||
// fix up trace by the rotation and offset
|
||||
if (trace.fraction != 1) {
|
||||
if (rot) {
|
||||
vec_t t;
|
||||
|
|
Loading…
Reference in a new issue