diff --git a/nq/source/sv_phys.c b/nq/source/sv_phys.c index e95e3c714..e65cf4f88 100644 --- a/nq/source/sv_phys.c +++ b/nq/source/sv_phys.c @@ -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 + } + } } /* diff --git a/nq/source/world.c b/nq/source/world.c index 7a1f024ac..2ae9aa700 100644 --- a/nq/source/world.c +++ b/nq/source/world.c @@ -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;