fixed a stupid bug in SV_PushMove that made it ignore the first entity in the move box
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 Apr 2005 01:12:46 +0000 (01:12 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 Apr 2005 01:12:46 +0000 (01:12 +0000)
fixed a rotation check in SV_PushMove so that it would detect roll rotations without pitch/yaw

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@5200 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index 8d2dfb0..fa0101f 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -677,7 +677,7 @@ void SV_PushMove (edict_t *pusher, float movetime)
        num_moved = 0;
 
        numcheckentities = SV_EntitiesInBox(mins, maxs, MAX_EDICTS, checkentities);
-       for (e = 1;e < numcheckentities;e++)
+       for (e = 0;e < numcheckentities;e++)
        {
                check = checkentities[e];
                if (check->v->movetype == MOVETYPE_PUSH
@@ -692,7 +692,7 @@ void SV_PushMove (edict_t *pusher, float movetime)
                        if (!SV_ClipMoveToEntity(pusher, check->v->origin, check->v->mins, check->v->maxs, check->v->origin).startsolid)
                                continue;
 
-               if (forward[0] != 1) // quick way to check if any rotation is used
+               if (forward[0] != 1 || left[1] != 1) // quick way to check if any rotation is used
                {
                        VectorSubtract (check->v->origin, pusher->v->origin, org);
                        org2[0] = DotProduct (org, forward);