From: havoc Date: Sat, 16 Jun 2007 23:45:13 +0000 (+0000) Subject: fix a bug with bounding box measurement when X-Git-Tag: xonotic-v0.1.0preview~3028 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=c147dee9f945efeb3f5e803e2c8e6b6250658506;p=xonotic%2Fdarkplaces.git fix a bug with bounding box measurement when sv_gameplayfix_findradiusdistancetobox is 0 git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7435 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/clvm_cmds.c b/clvm_cmds.c index 404de740..e3e89188 100644 --- a/clvm_cmds.c +++ b/clvm_cmds.c @@ -404,7 +404,7 @@ static void VM_CL_findradius (void) eorg[2] -= bound(ent->fields.client->mins[2], eorg[2], ent->fields.client->maxs[2]); } else - VectorMAMAM(1, eorg, 0.5f, ent->fields.client->mins, 0.5f, ent->fields.client->maxs, eorg); + VectorMAMAM(1, eorg, -0.5f, ent->fields.client->mins, -0.5f, ent->fields.client->maxs, eorg); if (DotProduct(eorg, eorg) < radius2) { ent->fields.client->chain = PRVM_EDICT_TO_PROG(chain); diff --git a/svvm_cmds.c b/svvm_cmds.c index 92b004dc..73467e0e 100644 --- a/svvm_cmds.c +++ b/svvm_cmds.c @@ -805,7 +805,7 @@ static void VM_SV_findradius (void) eorg[2] -= bound(ent->fields.server->mins[2], eorg[2], ent->fields.server->maxs[2]); } else - VectorMAMAM(1, eorg, 0.5f, ent->fields.server->mins, 0.5f, ent->fields.server->maxs, eorg); + VectorMAMAM(1, eorg, -0.5f, ent->fields.server->mins, -0.5f, ent->fields.server->maxs, eorg); if (DotProduct(eorg, eorg) < radius2) { ent->fields.server->chain = PRVM_EDICT_TO_PROG(chain);