]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
fix two bugs introduced in r11402 that broke dm6 teleporters and many
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 17 Apr 2012 21:29:58 +0000 (21:29 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Tue, 17 Apr 2012 21:29:58 +0000 (21:29 +0000)
other triggers (was using overly padded mins and maxs)

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

sv_phys.c
world.c

index f05cad8c84d3b086c71998a9a295479bbb434ea5..4e7d276552760cd41e10565a93f0d5b399de1c41 100644 (file)
--- a/sv_phys.c
+++ b/sv_phys.c
@@ -723,8 +723,11 @@ int SV_EntitiesInBox(const vec3_t mins, const vec3_t maxs, int maxedicts, prvm_e
        vec3_t paddedmins, paddedmaxs;
        if (maxedicts < 1 || resultedicts == NULL)
                return 0;
-       VectorSet(paddedmins, mins[0] - 10, mins[1] - 10, mins[2] - 1);
-       VectorSet(paddedmaxs, maxs[0] + 10, maxs[1] + 10, maxs[2] + 1);
+       // LordHavoc: discovered this actually causes its own bugs (dm6 teleporters being too close to info_teleport_destination)
+       //VectorSet(paddedmins, mins[0] - 10, mins[1] - 10, mins[2] - 1);
+       //VectorSet(paddedmaxs, maxs[0] + 10, maxs[1] + 10, maxs[2] + 1);
+       VectorCopy(mins, paddedmins);
+       VectorCopy(maxs, paddedmaxs);
        if (sv_areadebug.integer)
        {
                int numresultedicts = 0;
diff --git a/world.c b/world.c
index ffa54d19992c93da7afebab69af2745fdf611ae1..87f901bfbd6ad2eb832bcc8ae09105cf14dd16ce 100644 (file)
--- a/world.c
+++ b/world.c
@@ -185,8 +185,11 @@ int World_EntitiesInBox(world_t *world, const vec3_t requestmins, const vec3_t r
        vec3_t paddedmins, paddedmaxs;
        int igrid[3], igridmins[3], igridmaxs[3];
 
-       VectorSet(paddedmins, requestmins[0] - 1.0f, requestmins[1] - 1.0f, requestmins[2] - 1.0f);
-       VectorSet(paddedmaxs, requestmaxs[0] + 1.0f, requestmaxs[1] + 1.0f, requestmaxs[2] + 1.0f);
+       // LordHavoc: discovered this actually causes its own bugs (dm6 teleporters being too close to info_teleport_destination)
+       //VectorSet(paddedmins, requestmins[0] - 1.0f, requestmins[1] - 1.0f, requestmins[2] - 1.0f);
+       //VectorSet(paddedmaxs, requestmaxs[0] + 1.0f, requestmaxs[1] + 1.0f, requestmaxs[2] + 1.0f);
+       VectorCopy(requestmins, paddedmins);
+       VectorCopy(requestmaxs, paddedmaxs);
 
        // FIXME: if areagrid_marknumber wraps, all entities need their
        // ent->priv.server->areagridmarknumber reset