From: havoc Date: Tue, 21 Oct 2003 12:21:26 +0000 (+0000) Subject: physics code no longer uses allsolid (mainly of concern to q3bsp which rarely set... X-Git-Tag: xonotic-v0.1.0preview~6299 X-Git-Url: https://de.git.xonotic.org/?a=commitdiff_plain;h=168e698298ba31a1d0c53fff93a7156229c42183;p=xonotic%2Fdarkplaces.git physics code no longer uses allsolid (mainly of concern to q3bsp which rarely set it), only startsolid (allsolid is of course kept for QC compatibility, as non-functional as it may be), and I reenabled movement when in solid (so objects can move out of obstacles they managed to end up inside) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3598 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/sv_move.c b/sv_move.c index 6feab85d..9fc5b31d 100644 --- a/sv_move.c +++ b/sv_move.c @@ -161,14 +161,11 @@ qboolean SV_movestep (edict_t *ent, vec3_t move, qboolean relink) trace = SV_Move (neworg, ent->v->mins, ent->v->maxs, end, MOVE_NORMAL, ent); - if (trace.allsolid) - return false; - if (trace.startsolid) { neworg[2] -= sv_stepheight.value; trace = SV_Move (neworg, ent->v->mins, ent->v->maxs, end, MOVE_NORMAL, ent); - if (trace.allsolid || trace.startsolid) + if (trace.startsolid) return false; } if (trace.fraction == 1) diff --git a/sv_phys.c b/sv_phys.c index 37b1ae5f..fd52653a 100644 --- a/sv_phys.c +++ b/sv_phys.c @@ -248,13 +248,15 @@ int SV_FlyMove (edict_t *ent, float time, float *stepnormal) trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, end, MOVE_NORMAL, ent); //Con_Printf("trace %f %f %f : %f : %f %f %f\n", trace.endpos[0], trace.endpos[1], trace.endpos[2], trace.fraction, trace.plane.normal[0], trace.plane.normal[1], trace.plane.normal[2]); - if (trace.allsolid) + /* + if (trace.startsolid) { // LordHavoc: note: this code is what makes entities stick in place if embedded in another object (which can be the world) // entity is trapped in another solid VectorClear(ent->v->velocity); return 3; } + */ if (trace.fraction > 0) { @@ -341,13 +343,15 @@ int SV_FlyMove (edict_t *ent, float time, float *stepnormal) trace = SV_Move (ent->v->origin, ent->v->mins, ent->v->maxs, end, MOVE_NORMAL, ent); - if (trace.allsolid) + /* + if (trace.startsolid) { // LordHavoc: note: this code is what makes entities stick in place if embedded in another object (which can be the world) // entity is trapped in another solid VectorClear(ent->v->velocity); return 3; } + */ if (trace.fraction > 0) { diff --git a/sv_user.c b/sv_user.c index 372b09bd..a5645629 100644 --- a/sv_user.c +++ b/sv_user.c @@ -66,7 +66,7 @@ void SV_SetIdealPitch (void) tr = SV_Move (top, vec3_origin, vec3_origin, bottom, MOVE_NOMONSTERS, sv_player); // if looking at a wall, leave ideal the way is was - if (tr.allsolid) + if (tr.startsolid) return; // near a dropoff