|
|
|
@ -209,17 +209,17 @@ namespace MWInput
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
float rot[3];
|
|
|
|
|
rot[0] = yAxis * dt * 1000.0f * mCameraSensitivity * (mInvertY ? -1 : 1) * mCameraYMultiplier / 256.f;
|
|
|
|
|
rot[0] = -yAxis * dt * 1000.0f * mCameraSensitivity * (mInvertY ? -1 : 1) * mCameraYMultiplier / 256.f;
|
|
|
|
|
rot[1] = 0.0f;
|
|
|
|
|
rot[2] = xAxis * dt * 1000.0f * mCameraSensitivity * (mInvertX ? -1 : 1) / 256.f;
|
|
|
|
|
rot[2] = -xAxis * dt * 1000.0f * mCameraSensitivity * (mInvertX ? -1 : 1) / 256.f;
|
|
|
|
|
|
|
|
|
|
// Only actually turn player when we're not in vanity mode
|
|
|
|
|
bool controls = MWBase::Environment::get().getInputManager()->getControlSwitch("playercontrols");
|
|
|
|
|
if (!MWBase::Environment::get().getWorld()->vanityRotateCamera(rot) && controls)
|
|
|
|
|
{
|
|
|
|
|
MWWorld::Player& player = MWBase::Environment::get().getWorld()->getPlayer();
|
|
|
|
|
player.yaw(rot[2]);
|
|
|
|
|
player.pitch(rot[0]);
|
|
|
|
|
player.yaw(-rot[2]);
|
|
|
|
|
player.pitch(-rot[0]);
|
|
|
|
|
}
|
|
|
|
|
else if (!controls)
|
|
|
|
|
MWBase::Environment::get().getWorld()->disableDeferredPreviewRotation();
|
|
|
|
|