]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/sandbox/sandbox.qc
Simplify maths for most vlen cases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / sandbox / sandbox.qc
index 6b97a28f1da092aee3465c5c1f7084492b08fe3e..2dffb42f89680e5382551472ae9691335a00d967 100644 (file)
@@ -108,7 +108,7 @@ entity sandbox_ObjectEdit_Get(float permissions)
        // Attached objects are SOLID_NOT and do not get traced.
 
        crosshair_trace_plusvisibletriggers(self);
-       if(vlen(self.origin - trace_ent.origin) > autocvar_g_sandbox_editor_distance_edit)
+       if(vdist(self.origin - trace_ent.origin, >, autocvar_g_sandbox_editor_distance_edit))
                return world; // out of trace range
        if(trace_ent.classname != "object")
                return world; // entity is not an object