mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-10 03:51:18 +00:00
make -minmax work
git-svn-id: svn://svn.icculus.org/netradiant/trunk@336 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
parent
bde58c1edd
commit
f701f2e268
1 changed files with 14 additions and 11 deletions
|
@ -307,11 +307,11 @@ static void MiniMapSharpen(int y)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void MiniMapMakeMinsMaxs()
|
void MiniMapMakeMinsMaxs(vec3_t mins_in, vec3_t maxs_in)
|
||||||
{
|
{
|
||||||
vec3_t mins, maxs, extend;
|
vec3_t mins, maxs, extend;
|
||||||
VectorCopy(minimap.model->mins, mins);
|
VectorCopy(mins_in, mins);
|
||||||
VectorCopy(minimap.model->maxs, maxs);
|
VectorCopy(maxs_in, maxs);
|
||||||
|
|
||||||
// line compatible to nexuiz mapinfo
|
// 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]);
|
Sys_Printf("size %f %f %f %f %f %f\n", mins[0], mins[1], mins[2], maxs[0], maxs[1], maxs[2]);
|
||||||
|
@ -424,6 +424,7 @@ int MiniMapBSPMain( int argc, char **argv )
|
||||||
float *q;
|
float *q;
|
||||||
int x, y;
|
int x, y;
|
||||||
int i;
|
int i;
|
||||||
|
vec3_t mins, maxs;
|
||||||
|
|
||||||
/* arg checking */
|
/* arg checking */
|
||||||
if( argc < 2 )
|
if( argc < 2 )
|
||||||
|
@ -442,8 +443,8 @@ int MiniMapBSPMain( int argc, char **argv )
|
||||||
LoadBSPFile( source );
|
LoadBSPFile( source );
|
||||||
|
|
||||||
minimap.model = &bspModels[0];
|
minimap.model = &bspModels[0];
|
||||||
MiniMapMakeMinsMaxs();
|
VectorCopy(minimap.model->mins, mins);
|
||||||
|
VectorCopy(minimap.model->maxs, maxs);
|
||||||
*minimapFilename = 0;
|
*minimapFilename = 0;
|
||||||
minimapSharpen = 1;
|
minimapSharpen = 1;
|
||||||
minimap.width = minimap.height = 512;
|
minimap.width = minimap.height = 512;
|
||||||
|
@ -494,17 +495,19 @@ int MiniMapBSPMain( int argc, char **argv )
|
||||||
}
|
}
|
||||||
else if( !strcmp( argv[ i ], "-minmax" ) && i < (argc - 7) )
|
else if( !strcmp( argv[ i ], "-minmax" ) && i < (argc - 7) )
|
||||||
{
|
{
|
||||||
minimap.mins[0] = atof(argv[i + 1]);
|
mins[0] = atof(argv[i + 1]);
|
||||||
minimap.mins[1] = atof(argv[i + 2]);
|
mins[1] = atof(argv[i + 2]);
|
||||||
minimap.mins[2] = atof(argv[i + 3]);
|
mins[2] = atof(argv[i + 3]);
|
||||||
minimap.size[0] = atof(argv[i + 4]) - minimap.mins[0];
|
maxs[0] = atof(argv[i + 4]);
|
||||||
minimap.size[1] = atof(argv[i + 5]) - minimap.mins[1];
|
maxs[1] = atof(argv[i + 5]);
|
||||||
minimap.size[2] = atof(argv[i + 6]) - minimap.mins[2];
|
maxs[2] = atof(argv[i + 6]);
|
||||||
i += 6;
|
i += 6;
|
||||||
Sys_Printf( "Map mins/maxs overridden\n" );
|
Sys_Printf( "Map mins/maxs overridden\n" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MiniMapMakeMinsMaxs(mins, maxs);
|
||||||
|
|
||||||
if(!*minimapFilename)
|
if(!*minimapFilename)
|
||||||
{
|
{
|
||||||
ExtractFileBase(source, basename);
|
ExtractFileBase(source, basename);
|
||||||
|
|
Loading…
Reference in a new issue