forked from mirror/openmw-tes3mp
Add a run key
This commit is contained in:
parent
cbaf489eb6
commit
a8f0ce43a5
4 changed files with 17 additions and 0 deletions
|
@ -301,6 +301,11 @@ namespace MWInput
|
|||
else
|
||||
mPlayer.setUpDown (0);
|
||||
|
||||
if(actionIsActive(A_Run))
|
||||
mPlayer.setRunState(true);
|
||||
else
|
||||
mPlayer.setRunState(false);
|
||||
|
||||
if (mControlSwitch["playerviewswitch"]) {
|
||||
|
||||
// work around preview mode toggle when pressing Alt+Tab
|
||||
|
@ -690,6 +695,7 @@ namespace MWInput
|
|||
defaultKeyBindings[A_ToggleSpell] = OIS::KC_R;
|
||||
defaultKeyBindings[A_QuickKeysMenu] = OIS::KC_F1;
|
||||
defaultKeyBindings[A_Console] = OIS::KC_F2;
|
||||
defaultKeyBindings[A_Run] = OIS::KC_LSHIFT;
|
||||
defaultKeyBindings[A_Crouch] = OIS::KC_LCONTROL;
|
||||
defaultKeyBindings[A_AutoMove] = OIS::KC_Q;
|
||||
defaultKeyBindings[A_Jump] = OIS::KC_E;
|
||||
|
@ -756,6 +762,7 @@ namespace MWInput
|
|||
descriptions[A_ToggleWeapon] = "sReady_Weapon";
|
||||
descriptions[A_ToggleSpell] = "sReady_Magic";
|
||||
descriptions[A_Console] = "sConsoleTitle";
|
||||
descriptions[A_Run] = "sRun";
|
||||
descriptions[A_Crouch] = "sCrouch_Sneak";
|
||||
descriptions[A_AutoMove] = "sAuto_Run";
|
||||
descriptions[A_Jump] = "sJump";
|
||||
|
@ -804,6 +811,7 @@ namespace MWInput
|
|||
ret.push_back(A_MoveLeft);
|
||||
ret.push_back(A_MoveRight);
|
||||
ret.push_back(A_TogglePOV);
|
||||
ret.push_back(A_Run);
|
||||
ret.push_back(A_Crouch);
|
||||
ret.push_back(A_Activate);
|
||||
ret.push_back(A_ToggleWeapon);
|
||||
|
|
|
@ -239,6 +239,8 @@ namespace MWInput
|
|||
|
||||
A_ToggleHUD,
|
||||
|
||||
A_Run,
|
||||
|
||||
A_Last // Marker for the last item
|
||||
};
|
||||
};
|
||||
|
|
|
@ -71,6 +71,12 @@ namespace MWWorld
|
|||
MWWorld::Class::get (ptr).getMovementSettings (ptr).mUpDown = value;
|
||||
}
|
||||
|
||||
void Player::setRunState(bool run)
|
||||
{
|
||||
MWWorld::Ptr ptr = getPlayer();
|
||||
MWWorld::Class::get(ptr).setStance(ptr, MWWorld::Class::Run, run);
|
||||
}
|
||||
|
||||
void Player::toggleRunning()
|
||||
{
|
||||
MWWorld::Ptr ptr = getPlayer();
|
||||
|
|
|
@ -65,6 +65,7 @@ namespace MWWorld
|
|||
void setForwardBackward (int value);
|
||||
void setUpDown(int value);
|
||||
|
||||
void setRunState(bool run);
|
||||
void toggleRunning();
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue