diff --git a/apps/openmw/mwinput/inputmanager.cpp b/apps/openmw/mwinput/inputmanager.cpp index cd2c46715..15e3ba1c0 100644 --- a/apps/openmw/mwinput/inputmanager.cpp +++ b/apps/openmw/mwinput/inputmanager.cpp @@ -281,7 +281,7 @@ namespace MWInput if(windows.isGuiMode()) return true; float speed = 300 * evt.timeSinceLastFrame; //placeholder player speed? - float TESTwalkSpeed = 100 * evt.timeSinceLastFrame; //How about another? + //float TESTwalkSpeed = 100 * evt.timeSinceLastFrame; //How about another? float moveX = 0, moveY = 0, moveZ = 0; @@ -291,51 +291,28 @@ namespace MWInput //Poll and execute movement keys - will disable automove if pressed. if(poller.isDown(A_MoveLeft)) { - if (player.getmisWalking() == false) - { - player.setmAutoMove(false); - moveX -= speed; - } else { - player.setmAutoMove(false); - moveX -= TESTwalkSpeed; - } + player.setmAutoMove(false); + moveX -= speed; + } if(poller.isDown(A_MoveRight)) { - if (player.getmisWalking() == false) - { - player.setmAutoMove(false); - moveX += speed; - } else { - player.setmAutoMove(false); - moveX += TESTwalkSpeed; - } + player.setmAutoMove(false); + moveX += speed; } if(poller.isDown(A_MoveForward)) { - if (player.getmisWalking() == false) - { - player.setmAutoMove(false); - moveZ -= speed; - } else { - player.setmAutoMove(false); - moveZ -= TESTwalkSpeed; + player.setmAutoMove(false); + moveZ -= speed; } - } if(poller.isDown(A_MoveBackward)) { - if (player.getmisWalking() == false) - { - player.setmAutoMove(false); - moveZ += speed; - } else { - player.setmAutoMove(false); - moveZ += TESTwalkSpeed; - } - } + player.setmAutoMove(false); + moveZ += speed; + } // TODO: These should be enabled for floating modes (like diff --git a/apps/openmw/mwworld/player.hpp b/apps/openmw/mwworld/player.hpp index fc2597d89..335c602ce 100644 --- a/apps/openmw/mwworld/player.hpp +++ b/apps/openmw/mwworld/player.hpp @@ -126,11 +126,14 @@ namespace MWWorld /// float value representing time since last call void executeAutoMove(float duration) { + float X_Val = 0.0f; + float Y_Val = 0.0f; + float Z_Val = 300.0f * duration * -1.0f; if (mAutoMove == true) { //if player is running //Make player go at full speed - //player.moveRel(0, 0, (300*duration*-1)); + moveRel(X_Val, Y_Val, Z_Val); //else go forward at walk speed. } }