* preferences->Grid->Max grid coordinate: how much big grid to render (visual aid for games with small world)
known minor issues: preference change to smaller value doesn't trigger 2d view origin, scale constraints evaluation (ok after doing manually) preference change during region mode resets grid region size
This commit is contained in:
@@ -86,6 +86,7 @@
|
||||
#include "brushmodule.h"
|
||||
#include "brush.h"
|
||||
#include "patch.h"
|
||||
#include "grid.h"
|
||||
|
||||
class NameObserver
|
||||
{
|
||||
@@ -398,11 +399,6 @@ void Map_SetWorldspawn( Map& map, scene::Node* node ){
|
||||
}
|
||||
|
||||
|
||||
// TTimo
|
||||
// need that in a variable, will have to tweak depending on the game
|
||||
float g_MaxWorldCoord = 64 * 1024;
|
||||
float g_MinWorldCoord = -64 * 1024;
|
||||
|
||||
void AddRegionBrushes( void );
|
||||
void RemoveRegionBrushes( void );
|
||||
|
||||
@@ -1474,8 +1470,12 @@ bool g_region_active = false;
|
||||
BoolExportCaller g_region_caller( g_region_active );
|
||||
ToggleItem g_region_item( g_region_caller );
|
||||
|
||||
Vector3 g_region_mins( g_MinWorldCoord, g_MinWorldCoord, g_MinWorldCoord );
|
||||
Vector3 g_region_maxs( g_MaxWorldCoord, g_MaxWorldCoord, g_MaxWorldCoord );
|
||||
Vector3 g_region_mins;
|
||||
Vector3 g_region_maxs;
|
||||
void Region_defaultMinMax(){
|
||||
g_region_maxs[0] = g_region_maxs[1] = g_region_maxs[2] = GetMaxGridCoord();
|
||||
g_region_mins[0] = g_region_mins[1] = g_region_mins[2] = -GetMaxGridCoord();
|
||||
}
|
||||
|
||||
scene::Node* region_sides[6];
|
||||
scene::Node* region_startpoint = 0;
|
||||
@@ -1590,8 +1590,7 @@ void Map_RegionOff(){
|
||||
g_region_active = false;
|
||||
g_region_item.update();
|
||||
|
||||
g_region_maxs[0] = g_region_maxs[1] = g_region_maxs[2] = g_MaxWorldCoord - 64;
|
||||
g_region_mins[0] = g_region_mins[1] = g_region_mins[2] = g_MinWorldCoord + 64;
|
||||
Region_defaultMinMax();
|
||||
|
||||
Scene_Exclude_All( false );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user