diff options
author | Carsten Weisse <[email protected]> | 2005-01-21 00:46:54 +0000 |
---|---|---|
committer | Carsten Weisse <[email protected]> | 2005-01-21 00:46:54 +0000 |
commit | 43c64e697f5bd0d89b5b8b5fcf7a601b606d7b51 (patch) | |
tree | 3b516738fd592d46c0b330f6b760a7a42af6ec7e /src/jake2/qcommon | |
parent | d08bda0a87e7416db8ae72946693baa85b6e57dd (diff) |
use Vec3Cache for recusive function (a lot of garbage); number 1 (profiling game mode)
Diffstat (limited to 'src/jake2/qcommon')
-rw-r--r-- | src/jake2/qcommon/CM.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/jake2/qcommon/CM.java b/src/jake2/qcommon/CM.java index ded74fd..77feda3 100644 --- a/src/jake2/qcommon/CM.java +++ b/src/jake2/qcommon/CM.java @@ -19,7 +19,7 @@ */ // Created on 02.01.2004 by RST. -// $Id: CM.java,v 1.8 2005-01-14 21:15:34 cawe Exp $ +// $Id: CM.java,v 1.9 2005-01-21 00:46:54 cawe Exp $ package jake2.qcommon; import jake2.Defines; @@ -1400,7 +1400,6 @@ public class CM { float frac, frac2; float idist; int i; - float[] mid = { 0, 0, 0 }; int side; float midf; @@ -1469,6 +1468,8 @@ public class CM { frac = 1; midf = p1f + (p2f - p1f) * frac; + float[] mid = Vec3Cache.get(); + for (i = 0; i < 3; i++) mid[i] = p1[i] + frac * (p2[i] - p1[i]); @@ -1485,6 +1486,7 @@ public class CM { mid[i] = p1[i] + frac2 * (p2[i] - p1[i]); CM_RecursiveHullCheck(node.children[side ^ 1], midf, p2f, mid, p2); + Vec3Cache.release(); } //====================================================================== |