mirror of
https://github.com/TES3MP/TES3MP.git
synced 2025-09-30 16:45:17 -04:00
More formatting changes
This commit is contained in:
parent
b575712cb1
commit
0455f48d02
@ -138,7 +138,7 @@ namespace MWInput
|
|||||||
{
|
{
|
||||||
triedToMove = true;
|
triedToMove = true;
|
||||||
player.setAutoMove (false);
|
player.setAutoMove (false);
|
||||||
player.setForwardBackward((yAxis - 0.5f) * 2 * -1);
|
player.setForwardBackward((0.5f - yAxis) * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (triedToMove)
|
if (triedToMove)
|
||||||
@ -316,7 +316,6 @@ namespace MWInput
|
|||||||
{
|
{
|
||||||
// Presumption of GUI mode will be removed in the future.
|
// Presumption of GUI mode will be removed in the future.
|
||||||
// MyGUI KeyCodes *may* change.
|
// MyGUI KeyCodes *may* change.
|
||||||
|
|
||||||
MyGUI::KeyCode key = MyGUI::KeyCode::None;
|
MyGUI::KeyCode key = MyGUI::KeyCode::None;
|
||||||
switch (arg.button)
|
switch (arg.button)
|
||||||
{
|
{
|
||||||
|
@ -90,8 +90,8 @@ namespace MWInput
|
|||||||
|
|
||||||
if (mMouseLookEnabled && !mControlsDisabled)
|
if (mMouseLookEnabled && !mControlsDisabled)
|
||||||
{
|
{
|
||||||
float x = arg.xrel * mCameraSensitivity * (1.0f/256.f) * (mInvertX ? -1 : 1);
|
float x = arg.xrel * mCameraSensitivity * (mInvertX ? -1 : 1) / 256.f;
|
||||||
float y = arg.yrel * mCameraSensitivity * (1.0f/256.f) * (mInvertY ? -1 : 1) * mCameraYMultiplier;
|
float y = arg.yrel * mCameraSensitivity * (mInvertY ? -1 : 1) * mCameraYMultiplier / 256.f;
|
||||||
|
|
||||||
float rot[3];
|
float rot[3];
|
||||||
rot[0] = -y;
|
rot[0] = -y;
|
||||||
@ -182,9 +182,9 @@ namespace MWInput
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
float rot[3];
|
float rot[3];
|
||||||
rot[0] = yAxis * (dt * 100.0f) * 10.0f * mCameraSensitivity * (1.0f/256.f) * (mInvertY ? -1 : 1) * mCameraYMultiplier;
|
rot[0] = yAxis * dt * 1000.0f * mCameraSensitivity * (mInvertY ? -1 : 1) * mCameraYMultiplier / 256.f;
|
||||||
rot[1] = 0.0f;
|
rot[1] = 0.0f;
|
||||||
rot[2] = xAxis * (dt * 100.0f) * 10.0f * mCameraSensitivity * (1.0f/256.f) * (mInvertX ? -1 : 1);
|
rot[2] = xAxis * dt * 1000.0f * mCameraSensitivity * (mInvertX ? -1 : 1) / 256.f;
|
||||||
|
|
||||||
// Only actually turn player when we're not in vanity mode
|
// Only actually turn player when we're not in vanity mode
|
||||||
if (!MWBase::Environment::get().getWorld()->vanityRotateCamera(rot) && MWBase::Environment::get().getInputManager()->getControlSwitch("playercontrols"))
|
if (!MWBase::Environment::get().getWorld()->vanityRotateCamera(rot) && MWBase::Environment::get().getInputManager()->getControlSwitch("playercontrols"))
|
||||||
|
@ -109,7 +109,6 @@ namespace MWInput
|
|||||||
if (Settings::Manager::getBool("enable gyroscope", "Input"))
|
if (Settings::Manager::getBool("enable gyroscope", "Input"))
|
||||||
{
|
{
|
||||||
int numSensors = SDL_NumSensors();
|
int numSensors = SDL_NumSensors();
|
||||||
|
|
||||||
for (int i = 0; i < numSensors; ++i)
|
for (int i = 0; i < numSensors; ++i)
|
||||||
{
|
{
|
||||||
if (SDL_SensorGetDeviceType(i) == SDL_SENSOR_GYRO)
|
if (SDL_SensorGetDeviceType(i) == SDL_SENSOR_GYRO)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user