1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-27 03:35:27 +00:00

Toggle now toggles, conventions...

This commit is contained in:
Star-Demon 2011-01-18 00:16:01 -05:00
parent 962b8c9781
commit 09023bb853
2 changed files with 15 additions and 10 deletions

View File

@ -143,8 +143,13 @@ namespace MWInput
void toggleAutoMove() void toggleAutoMove()
{ {
player.setmAutoMove(true); if (player.getmAutoMove() == false)
} {
player.setmAutoMove(true);
} else {
player.setmAutoMove(false);
}
}
void toggleWalking() void toggleWalking()
{ {
@ -291,26 +296,26 @@ namespace MWInput
//Poll and execute movement keys - will disable automove if pressed. //Poll and execute movement keys - will disable automove if pressed.
if(poller.isDown(A_MoveLeft)) if(poller.isDown(A_MoveLeft))
{ {
player.setmAutoMove(false); player.setAutoMove(false);
moveX -= speed; moveX -= speed;
} }
if(poller.isDown(A_MoveRight)) if(poller.isDown(A_MoveRight))
{ {
player.setmAutoMove(false); player.setAutoMove(false);
moveX += speed; moveX += speed;
} }
if(poller.isDown(A_MoveForward)) if(poller.isDown(A_MoveForward))
{ {
player.setmAutoMove(false); player.setAutoMove(false);
moveZ -= speed; moveZ -= speed;
} }
if(poller.isDown(A_MoveBackward)) if(poller.isDown(A_MoveBackward))
{ {
player.setmAutoMove(false); player.setAutoMove(false);
moveZ += speed; moveZ += speed;
} }

View File

@ -112,12 +112,12 @@ namespace MWWorld
mCollisionMode = !mCollisionMode; mCollisionMode = !mCollisionMode;
} }
bool getmAutoMove() bool getAutoMove()
{ {
return mAutoMove; return mAutoMove;
} }
void setmAutoMove(bool setMe) void setAutoMove(bool setMe)
{ {
mAutoMove = setMe; mAutoMove = setMe;
} }
@ -138,12 +138,12 @@ namespace MWWorld
} }
} }
bool getmisWalking() bool getisWalking()
{ {
return misWalking; return misWalking;
} }
void setmisWalking(bool setMe) void setisWalking(bool setMe)
{ {
misWalking = setMe; misWalking = setMe;
} }