]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fixed two bugs that caused a constant state of "player stuck" (one was that it always...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Feb 2007 03:36:26 +0000 (03:36 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 3 Feb 2007 03:36:26 +0000 (03:36 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6774 d7cf8633-e32d-0410-b094-e92efae38249

sv_phys.c

index dbd6b33e3b9877a479faef313035c4660fdffa1e..4cddc0a731a93df430d5e1630d63df73b7b93c40 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -90,7 +90,7 @@ static int SV_TestEntityPosition (prvm_edict_t *ent)
                return true;
        else
        {
-               if (sv.worldmodel->brushq1.hulls && !VectorCompare(ent->fields.server->mins, ent->fields.server->maxs))
+               if (sv.worldmodel->brushq1.numclipnodes && !VectorCompare(ent->fields.server->mins, ent->fields.server->maxs))
                {
                        // q1bsp/hlbsp use hulls and if the entity does not exactly match
                        // a hull size it is incorrectly tested, so this code tries to
@@ -99,9 +99,9 @@ static int SV_TestEntityPosition (prvm_edict_t *ent)
                        vec3_t v;
                        for (i = 0;i < 8;i++)
                        {
-                               v[0] = (i & 1) ? ent->fields.server->maxs[0] : ent->fields.server->mins[0];
-                               v[1] = (i & 2) ? ent->fields.server->maxs[1] : ent->fields.server->mins[1];
-                               v[2] = (i & 4) ? ent->fields.server->maxs[2] : ent->fields.server->mins[2];
+                               v[0] = ent->fields.server->origin[0] + (i & 1) ? ent->fields.server->maxs[0] : ent->fields.server->mins[0];
+                               v[1] = ent->fields.server->origin[1] + (i & 2) ? ent->fields.server->maxs[1] : ent->fields.server->mins[1];
+                               v[2] = ent->fields.server->origin[2] + (i & 4) ? ent->fields.server->maxs[2] : ent->fields.server->mins[2];
                                if (SV_PointSuperContents(v) & SUPERCONTENTS_SOLID)
                                        return true;
                        }