From 09023bb85321aa7daa90de998ad68b84ae9210e8 Mon Sep 17 00:00:00 2001 From: Star-Demon Date: Tue, 18 Jan 2011 00:16:01 -0500 Subject: [PATCH] Toggle now toggles, conventions... --- apps/openmw/mwinput/inputmanager.cpp | 17 +++++++++++------ apps/openmw/mwworld/player.hpp | 8 ++++---- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/apps/openmw/mwinput/inputmanager.cpp b/apps/openmw/mwinput/inputmanager.cpp index 15e3ba1c0..64904d08f 100644 --- a/apps/openmw/mwinput/inputmanager.cpp +++ b/apps/openmw/mwinput/inputmanager.cpp @@ -143,8 +143,13 @@ namespace MWInput void toggleAutoMove() { - player.setmAutoMove(true); - } + if (player.getmAutoMove() == false) + { + player.setmAutoMove(true); + } else { + player.setmAutoMove(false); + } + } void toggleWalking() { @@ -291,26 +296,26 @@ namespace MWInput //Poll and execute movement keys - will disable automove if pressed. if(poller.isDown(A_MoveLeft)) { - player.setmAutoMove(false); + player.setAutoMove(false); moveX -= speed; } if(poller.isDown(A_MoveRight)) { - player.setmAutoMove(false); + player.setAutoMove(false); moveX += speed; } if(poller.isDown(A_MoveForward)) { - player.setmAutoMove(false); + player.setAutoMove(false); moveZ -= speed; } if(poller.isDown(A_MoveBackward)) { - player.setmAutoMove(false); + player.setAutoMove(false); moveZ += speed; } diff --git a/apps/openmw/mwworld/player.hpp b/apps/openmw/mwworld/player.hpp index 335c602ce..e46bda486 100644 --- a/apps/openmw/mwworld/player.hpp +++ b/apps/openmw/mwworld/player.hpp @@ -112,12 +112,12 @@ namespace MWWorld mCollisionMode = !mCollisionMode; } - bool getmAutoMove() + bool getAutoMove() { return mAutoMove; } - void setmAutoMove(bool setMe) + void setAutoMove(bool setMe) { mAutoMove = setMe; } @@ -138,12 +138,12 @@ namespace MWWorld } } - bool getmisWalking() + bool getisWalking() { return misWalking; } - void setmisWalking(bool setMe) + void setisWalking(bool setMe) { misWalking = setMe; }