From 07e8057ae2c7dde4410c07287df051670255a439 Mon Sep 17 00:00:00 2001 From: divverent Date: Sun, 26 Apr 2009 19:13:10 +0000 Subject: [PATCH] make -minmax work git-svn-id: svn://svn.icculus.org/netradiant/trunk@336 61c419a2-8eb2-4b30-bcec-8cead039b335 --- tools/quake3/q3map2/main.c | 25 ++++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/tools/quake3/q3map2/main.c b/tools/quake3/q3map2/main.c index 73c92c60..4a646ffa 100644 --- a/tools/quake3/q3map2/main.c +++ b/tools/quake3/q3map2/main.c @@ -279,11 +279,11 @@ static void MiniMapSharpen(int y) } } -void MiniMapMakeMinsMaxs() +void MiniMapMakeMinsMaxs(vec3_t mins_in, vec3_t maxs_in) { vec3_t mins, maxs, extend; - VectorCopy(minimap.model->mins, mins); - VectorCopy(minimap.model->maxs, maxs); + VectorCopy(mins_in, mins); + VectorCopy(maxs_in, maxs); // line compatible to nexuiz mapinfo Sys_Printf("size %f %f %f %f %f %f\n", mins[0], mins[1], mins[2], maxs[0], maxs[1], maxs[2]); @@ -396,6 +396,7 @@ int MiniMapBSPMain( int argc, char **argv ) float *q; int x, y; int i; + vec3_t mins, maxs; /* arg checking */ if( argc < 2 ) @@ -414,8 +415,8 @@ int MiniMapBSPMain( int argc, char **argv ) LoadBSPFile( source ); minimap.model = &bspModels[0]; - MiniMapMakeMinsMaxs(); - + VectorCopy(minimap.model->mins, mins); + VectorCopy(minimap.model->maxs, maxs); *minimapFilename = 0; minimapSharpen = 1; minimap.width = minimap.height = 512; @@ -466,17 +467,19 @@ int MiniMapBSPMain( int argc, char **argv ) } else if( !strcmp( argv[ i ], "-minmax" ) && i < (argc - 7) ) { - minimap.mins[0] = atof(argv[i + 1]); - minimap.mins[1] = atof(argv[i + 2]); - minimap.mins[2] = atof(argv[i + 3]); - minimap.size[0] = atof(argv[i + 4]) - minimap.mins[0]; - minimap.size[1] = atof(argv[i + 5]) - minimap.mins[1]; - minimap.size[2] = atof(argv[i + 6]) - minimap.mins[2]; + mins[0] = atof(argv[i + 1]); + mins[1] = atof(argv[i + 2]); + mins[2] = atof(argv[i + 3]); + maxs[0] = atof(argv[i + 4]); + maxs[1] = atof(argv[i + 5]); + maxs[2] = atof(argv[i + 6]); i += 6; Sys_Printf( "Map mins/maxs overridden\n" ); } } + MiniMapMakeMinsMaxs(mins, maxs); + if(!*minimapFilename) { ExtractFileBase(source, basename); -- 2.39.2