mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-03-28 20:06:41 +00:00
implemented enable/disable player looking switch
This commit is contained in:
parent
a2d87d5f5b
commit
1511eb3549
1 changed files with 12 additions and 5 deletions
|
@ -424,9 +424,10 @@ private:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Start mouse-looking again. TODO: This should also allow
|
// Start mouse-looking again if allowed.
|
||||||
// for other ways to disable mouselook, like paralyzation.
|
if (mControlSwitch["playerlooking"]) {
|
||||||
mouse->enable();
|
mouse->enable();
|
||||||
|
}
|
||||||
|
|
||||||
// Disable GUI events
|
// Disable GUI events
|
||||||
guiEvents->enabled = false;
|
guiEvents->enabled = false;
|
||||||
|
@ -439,13 +440,19 @@ private:
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/// \note 7 switches at all, if-else is relevant
|
/// \note 7 switches at all, if-else is relevant
|
||||||
if (sw == "playercontrols") {
|
if (sw == "playercontrols" && !value) {
|
||||||
player.setLeftRight(0);
|
player.setLeftRight(0);
|
||||||
player.setForwardBackward(0);
|
player.setForwardBackward(0);
|
||||||
player.setAutoMove(false);
|
player.setAutoMove(false);
|
||||||
} else if (sw == "playerjumping") {
|
} else if (sw == "playerjumping" && !value) {
|
||||||
/// \fixme maybe crouching at this time
|
/// \fixme maybe crouching at this time
|
||||||
player.setUpDown(0);
|
player.setUpDown(0);
|
||||||
|
} else if (sw == "playerlooking") {
|
||||||
|
if (value) {
|
||||||
|
mouse->enable();
|
||||||
|
} else {
|
||||||
|
mouse->disable();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
mControlSwitch[sw] = value;
|
mControlSwitch[sw] = value;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue