Radiant:
misc... * fix: mixed up 'Up' & 'Forward' mouse strafe options * mouse strafe options: old 'both' one with inverted forward, None fix: QE tool: alt + m1 + ctrl drag : verts weren't snapped (since not component mode) fix: QE tool face drag + ctrl: no snap fix: ctrl snap on drag + shift constrain to axis: excess snap on not dragged axis //some coord e-17
This commit is contained in:
parent
d079351041
commit
2455e50d72
|
|
@ -90,7 +90,7 @@ struct camwindow_globals_private_t
|
||||||
m_bCamDiscrete( true ),
|
m_bCamDiscrete( true ),
|
||||||
m_bCubicClipping( false ),
|
m_bCubicClipping( false ),
|
||||||
m_showStats( true ),
|
m_showStats( true ),
|
||||||
m_nStrafeMode( 0 ){
|
m_nStrafeMode( 3 ){
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
@ -142,6 +142,7 @@ struct camera_t
|
||||||
|
|
||||||
bool m_strafe; // true when in strafemode toggled by the ctrl-key
|
bool m_strafe; // true when in strafemode toggled by the ctrl-key
|
||||||
bool m_strafe_forward; // true when in strafemode by ctrl-key and shift is pressed for forward strafing
|
bool m_strafe_forward; // true when in strafemode by ctrl-key and shift is pressed for forward strafing
|
||||||
|
bool m_strafe_forward_invert; //silly option to invert forward strafing to support old fegs
|
||||||
|
|
||||||
unsigned int movementflags; // movement flags
|
unsigned int movementflags; // movement flags
|
||||||
Timer m_keycontrol_timer;
|
Timer m_keycontrol_timer;
|
||||||
|
|
@ -280,7 +281,7 @@ void Camera_FreeMove( camera_t& camera, int dx, int dy ){
|
||||||
|
|
||||||
camera.origin -= camera.vright * strafespeed * dx;
|
camera.origin -= camera.vright * strafespeed * dx;
|
||||||
if ( camera.m_strafe_forward ) {
|
if ( camera.m_strafe_forward ) {
|
||||||
camera.origin -= camera.vpn * strafespeed * dy;
|
camera.origin += camera.m_strafe_forward_invert ? ( camera.vpn * strafespeed * dy ) : ( -camera.vpn * strafespeed * dy );
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
camera.origin += camera.vup * strafespeed * dy;
|
camera.origin += camera.vup * strafespeed * dy;
|
||||||
|
|
@ -629,16 +630,12 @@ void Camera_motionDelta( int x, int y, unsigned int state, void* data ){
|
||||||
|
|
||||||
cam->m_mouseMove.motion_delta( x, y, state );
|
cam->m_mouseMove.motion_delta( x, y, state );
|
||||||
|
|
||||||
|
cam->m_strafe_forward_invert = false;
|
||||||
|
|
||||||
switch ( g_camwindow_globals_private.m_nStrafeMode )
|
switch ( g_camwindow_globals_private.m_nStrafeMode )
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0;
|
cam->m_strafe = false;
|
||||||
if ( cam->m_strafe ) {
|
|
||||||
cam->m_strafe_forward = ( state & GDK_SHIFT_MASK ) != 0;
|
|
||||||
}
|
|
||||||
else{
|
|
||||||
cam->m_strafe_forward = false;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0 && ( state & GDK_SHIFT_MASK ) == 0;
|
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0 && ( state & GDK_SHIFT_MASK ) == 0;
|
||||||
|
|
@ -648,9 +645,24 @@ void Camera_motionDelta( int x, int y, unsigned int state, void* data ){
|
||||||
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0 && ( state & GDK_SHIFT_MASK ) == 0;
|
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0 && ( state & GDK_SHIFT_MASK ) == 0;
|
||||||
cam->m_strafe_forward = cam->m_strafe;
|
cam->m_strafe_forward = cam->m_strafe;
|
||||||
break;
|
break;
|
||||||
|
case 4:
|
||||||
|
cam->m_strafe_forward_invert = true;
|
||||||
|
default:
|
||||||
|
cam->m_strafe = ( state & GDK_CONTROL_MASK ) != 0;
|
||||||
|
if ( cam->m_strafe ) {
|
||||||
|
cam->m_strafe_forward = ( state & GDK_SHIFT_MASK ) != 0;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
cam->m_strafe_forward = false;
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class CamWnd
|
class CamWnd
|
||||||
{
|
{
|
||||||
View m_view;
|
View m_view;
|
||||||
|
|
@ -1912,7 +1924,7 @@ void Camera_constructPreferences( PreferencesPage& page ){
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* strafe_mode[] = { "Both", "Forward", "Up" };
|
const char* strafe_mode[] = { "None", "Up", "Forward", "Both", "Both Inverted" };
|
||||||
|
|
||||||
page.appendCombo(
|
page.appendCombo(
|
||||||
"Strafe Mode",
|
"Strafe Mode",
|
||||||
|
|
|
||||||
|
|
@ -380,7 +380,7 @@ void Transform( const Matrix4& manip2object, const Matrix4& device2manip, const
|
||||||
Vector3 mins( m_bounds.origin - m_bounds.extents );
|
Vector3 mins( m_bounds.origin - m_bounds.extents );
|
||||||
//globalOutputStream() << "current: " << current << "\n";
|
//globalOutputStream() << "current: " << current << "\n";
|
||||||
for( std::size_t i = 0; i < 3; ++i ){
|
for( std::size_t i = 0; i < 3; ++i ){
|
||||||
if( current[i] != 0.f ){
|
if( fabs( current[i] ) > 0.000001f ){
|
||||||
float snapto1 = float_snapped( maxs[i] + current[i] , grid );
|
float snapto1 = float_snapped( maxs[i] + current[i] , grid );
|
||||||
float snapto2 = float_snapped( mins[i] + current[i] , grid );
|
float snapto2 = float_snapped( mins[i] + current[i] , grid );
|
||||||
|
|
||||||
|
|
@ -2639,6 +2639,7 @@ std::list<Selectable*>& best(){
|
||||||
};
|
};
|
||||||
|
|
||||||
bool g_bAltDragManipulatorResize = false;
|
bool g_bAltDragManipulatorResize = false;
|
||||||
|
bool g_bTmpComponentMode = false;
|
||||||
|
|
||||||
class DragManipulator : public Manipulator
|
class DragManipulator : public Manipulator
|
||||||
{
|
{
|
||||||
|
|
@ -2725,6 +2726,7 @@ void testSelect( const View& view, const Matrix4& pivot2world ){
|
||||||
{
|
{
|
||||||
( *i ).second->setSelected( true );
|
( *i ).second->setSelected( true );
|
||||||
}
|
}
|
||||||
|
g_bTmpComponentMode = m_selected;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setSelected( bool select ){
|
void setSelected( bool select ){
|
||||||
|
|
@ -3677,6 +3679,7 @@ void RadiantSelectionSystem::endMove(){
|
||||||
|
|
||||||
if ( Mode() == ePrimitive ) {
|
if ( Mode() == ePrimitive ) {
|
||||||
if ( ManipulatorMode() == eDrag ) {
|
if ( ManipulatorMode() == eDrag ) {
|
||||||
|
g_bTmpComponentMode = false;
|
||||||
if( g_bAltDragManipulatorResize ){
|
if( g_bAltDragManipulatorResize ){
|
||||||
Scene_SelectAll_Component( false, SelectionSystem::eVertex );
|
Scene_SelectAll_Component( false, SelectionSystem::eVertex );
|
||||||
}
|
}
|
||||||
|
|
@ -3923,7 +3926,7 @@ void RadiantSelectionSystem::setCustomPivotOrigin( Vector3& point ) const {
|
||||||
AABB RadiantSelectionSystem::getSelectionAABB() const {
|
AABB RadiantSelectionSystem::getSelectionAABB() const {
|
||||||
AABB bounds;
|
AABB bounds;
|
||||||
if ( !nothingSelected() ) {
|
if ( !nothingSelected() ) {
|
||||||
if ( Mode() == eComponent ) {
|
if ( Mode() == eComponent || g_bTmpComponentMode ) {
|
||||||
Scene_BoundsSelectedComponent( GlobalSceneGraph(), bounds );
|
Scene_BoundsSelectedComponent( GlobalSceneGraph(), bounds );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user