]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix a bug with bounding box measurement when
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 16 Jun 2007 23:45:13 +0000 (23:45 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 16 Jun 2007 23:45:13 +0000 (23:45 +0000)
sv_gameplayfix_findradiusdistancetobox is 0

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

clvm_cmds.c
svvm_cmds.c

index 404de740d142674c7ce82d44c9fe107e15562973..e3e8918852c4de63b9fb862b669e85bb48e1213f 100644 (file)
@@ -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);
index 92b004dc66e4bf264762a578f4882dfa02c7a05e..73467e0e9dde3d2c2c514d070d35200ebc135b91 100644 (file)
@@ -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);