From 87a3682c46d561de0d16e7ed3ba7aca5e11ddc1b Mon Sep 17 00:00:00 2001 From: Garux Date: Sun, 10 Jul 2022 18:54:46 +0300 Subject: [PATCH] -scale: fix bspNodes & bspLeafs precision --- tools/quake3/q3map2/convert_bsp.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/quake3/q3map2/convert_bsp.cpp b/tools/quake3/q3map2/convert_bsp.cpp index bff8b1de..e2b337f9 100644 --- a/tools/quake3/q3map2/convert_bsp.cpp +++ b/tools/quake3/q3map2/convert_bsp.cpp @@ -458,15 +458,15 @@ int ScaleBSPMain( Args& args ){ /* scale nodes */ for ( bspNode_t& node : bspNodes ) { - node.minmax.mins *= scale; - node.minmax.maxs *= scale; + node.minmax.mins = scale * node.minmax.mins; // this multiplication order to calculate in floats + node.minmax.maxs = scale * node.minmax.maxs; } /* scale leafs */ for ( bspLeaf_t& leaf : bspLeafs ) { - leaf.minmax.mins *= scale; - leaf.minmax.maxs *= scale; + leaf.minmax.mins = scale * leaf.minmax.mins; + leaf.minmax.maxs = scale * leaf.minmax.maxs; } if ( texscale ) {