* focus all 2D views on map load, selection by q3map2, NextLeakSpot, selection by brush/entity number

This commit is contained in:
Garux
2019-08-23 14:40:45 +03:00
parent 446e1148a5
commit 15cf9d0b55
2 changed files with 24 additions and 28 deletions

View File

@@ -489,8 +489,9 @@ void FocusViews( const Vector3& point, float angle ){
angles[CAMERA_YAW] = angle;
Camera_setAngles( camwnd, angles );
XYWnd* xywnd = g_pParentWnd->GetXYWnd();
xywnd->SetOrigin( point );
g_pParentWnd->forEachXYWnd( [&point]( XYWnd* xywnd ){
xywnd->SetOrigin( point );
} );
}
#include "stringio.h"
@@ -2154,7 +2155,9 @@ void SelectBrush( int entitynum, int brushnum ){
Selectable* selectable = Instance_getSelectable( *instance );
ASSERT_MESSAGE( selectable != 0, "SelectBrush: path not selectable" );
selectable->setSelected( true );
g_pParentWnd->GetXYWnd()->SetOrigin( instance->worldAABB().origin );
g_pParentWnd->forEachXYWnd( [instance]( XYWnd* xywnd ){
xywnd->SetOrigin( instance->worldAABB().origin );
} );
}
}