void CTWController::ScreenEdgeMove(float3 move) { if(mouse->lasty<gu->screeny/3){ camera->rot.y-=move.x*gu->lastFrameTime*0.5f*200; move.x=0; } KeyMove(move); }
void idUsercmdGenLocal::MakeCurrent( void ) { idVec3 oldAngles; int i; oldAngles = viewangles; if ( !Inhibited() ) { // update toggled key states toggled_crouch.SetKeyState( ButtonState( UB_DOWN ), in_toggleCrouch.GetBool() ); toggled_run.SetKeyState( ButtonState( UB_SPEED ), in_toggleRun.GetBool() && idAsyncNetwork::IsActive() ); toggled_zoom.SetKeyState( ButtonState( UB_ZOOM ), in_toggleZoom.GetBool() ); // keyboard angle adjustment AdjustAngles(); // set button bits CmdButtons(); // get basic movement from keyboard KeyMove(); // get basic movement from mouse MouseMove(); // get basic movement from joystick JoystickMove(); // check to make sure the angles haven't wrapped if ( viewangles[PITCH] - oldAngles[PITCH] > 90 ) { viewangles[PITCH] = oldAngles[PITCH] + 90; } else if ( oldAngles[PITCH] - viewangles[PITCH] > 90 ) { viewangles[PITCH] = oldAngles[PITCH] - 90; } } else { mouseDx = 0; mouseDy = 0; } for ( i = 0; i < 3; i++ ) { cmd.angles[i] = ANGLE2SHORT(viewangles[i]); } cmd.mx = continuousMouseX; cmd.my = continuousMouseY; flags = cmd.flags; impulse = cmd.impulse; }
void COverheadController::ScreenEdgeMove(float3 move) { KeyMove(move); }
void CFPSController::ScreenEdgeMove(float3 move) { KeyMove(move); }