forked from teamnwah/openmw-tes3coop
use float for the mouse position tracking, should be more accurate for sensitivity multipliers != 1
This commit is contained in:
parent
67577c6192
commit
f9efd543e4
2 changed files with 7 additions and 7 deletions
|
@ -378,12 +378,12 @@ namespace MWInput
|
||||||
|
|
||||||
// We keep track of our own mouse position, so that moving the mouse while in
|
// We keep track of our own mouse position, so that moving the mouse while in
|
||||||
// game mode does not move the position of the GUI cursor
|
// game mode does not move the position of the GUI cursor
|
||||||
mMouseX += arg.state.X.rel * mUISensitivity;
|
mMouseX += float(arg.state.X.rel) * mUISensitivity;
|
||||||
mMouseY += arg.state.Y.rel * mUISensitivity * mUIYMultiplier;
|
mMouseY += float(arg.state.Y.rel) * mUISensitivity * mUIYMultiplier;
|
||||||
mMouseX = std::max(0, std::min(mMouseX, viewSize.width));
|
mMouseX = std::max(0.f, std::min(mMouseX, float(viewSize.width)));
|
||||||
mMouseY = std::max(0, std::min(mMouseY, viewSize.height));
|
mMouseY = std::max(0.f, std::min(mMouseY, float(viewSize.height)));
|
||||||
|
|
||||||
MyGUI::InputManager::getInstance().injectMouseMove(mMouseX, mMouseY, arg.state.Z.abs);
|
MyGUI::InputManager::getInstance().injectMouseMove( int(mMouseX), int(mMouseY), arg.state.Z.abs);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mMouseLookEnabled)
|
if (mMouseLookEnabled)
|
||||||
|
|
|
@ -143,8 +143,8 @@ namespace MWInput
|
||||||
bool mMouseLookEnabled;
|
bool mMouseLookEnabled;
|
||||||
bool mGuiCursorEnabled;
|
bool mGuiCursorEnabled;
|
||||||
|
|
||||||
int mMouseX;
|
float mMouseX;
|
||||||
int mMouseY;
|
float mMouseY;
|
||||||
|
|
||||||
std::map<std::string, bool> mControlSwitch;
|
std::map<std::string, bool> mControlSwitch;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue