-bool CListener::OnMouseMove( unsigned int nFlags, double x, double y )
-{
- SetViewType( g_pXYWndWrapper->GetViewType() );
-
- if( m_bLeftMBPressed && oldValid && g_iEditMode == 0 ) {
- vec3_t click, delta;
-
- g_pXYWndWrapper->SnapToGrid( (int)x, (int)y, click );
-
- switch( m_vt ) {
- case XY:
- VectorSet( delta, click[0] - old_x, click[1] - old_y, 0 );
- old_x = click[0]; old_y = click[1];
- break;
- case XZ:
- VectorSet( delta, click[0] - old_x, 0, click[2] - old_y );
- old_x = click[0]; old_y = click[2];
- break;
- case YZ:
- VectorSet( delta, 0, click[1] - old_x, click[2] - old_y );
- old_x = click[1]; old_y = click[2];
- break;
- }
-
- if( g_iActiveTarget < 0 )
- GetCurrentCam()->GetCam()->getPositionObj()->updateSelection( delta[0], delta[1], delta[2] );
- else
- GetCurrentCam()->GetCam()->getActiveTarget(g_iActiveTarget)->updateSelection( delta[0], delta[1], delta[2] );
+bool CListener::OnMouseMove( unsigned int nFlags, double x, double y ){
+ SetViewType( g_pXYWndWrapper->GetViewType() );
+
+ if ( m_bLeftMBPressed && oldValid && g_iEditMode == 0 ) {
+ vec3_t click, delta;
+
+ g_pXYWndWrapper->SnapToGrid( (int)x, (int)y, click );
+
+ switch ( m_vt ) {
+ case XY:
+ VectorSet( delta, click[0] - old_x, click[1] - old_y, 0 );
+ old_x = click[0]; old_y = click[1];
+ break;
+ case XZ:
+ VectorSet( delta, click[0] - old_x, 0, click[2] - old_y );
+ old_x = click[0]; old_y = click[2];
+ break;
+ case YZ:
+ VectorSet( delta, 0, click[1] - old_x, click[2] - old_y );
+ old_x = click[1]; old_y = click[2];
+ break;
+ }
+
+ if ( g_iActiveTarget < 0 ) {
+ GetCurrentCam()->GetCam()->getPositionObj()->updateSelection( delta[0], delta[1], delta[2] );
+ }
+ else{
+ GetCurrentCam()->GetCam()->getActiveTarget( g_iActiveTarget )->updateSelection( delta[0], delta[1], delta[2] );
+ }