From 24f460fd92925f7f17f5235a13124be986e831d4 Mon Sep 17 00:00:00 2001 From: havoc Date: Tue, 17 Apr 2012 21:29:58 +0000 Subject: [PATCH] fix two bugs introduced in r11402 that broke dm6 teleporters and many 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 | 7 +++++-- world.c | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/sv_phys.c b/sv_phys.c index f05cad8c..4e7d2765 100644 --- 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 ffa54d19..87f901bf 100644 --- 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 -- 2.39.2