fixed tab problem

This commit is contained in:
Marc Zinnschlag 2011-01-18 15:20:36 +01:00
parent 246544806a
commit 36cb10572a
2 changed files with 57 additions and 64 deletions

View file

@ -143,17 +143,17 @@ namespace MWInput
void toggleAutoMove()
{
if (player.getAutoMove() == false)
{
player.setAutoMove(true);
} else {
player.setAutoMove(false);
}
}
if (player.getAutoMove() == false)
{
player.setAutoMove(true);
} else {
player.setAutoMove(false);
}
}
void toggleWalking()
{
player.setisWalking(true);
player.setisWalking(true);
}
// Exit program now button (which is disabled in GUI mode)
@ -296,14 +296,13 @@ namespace MWInput
//Poll and execute movement keys - will disable automove if pressed.
if(poller.isDown(A_MoveLeft))
{
player.setAutoMove(false);
player.setAutoMove(false);
moveX -= speed;
}
if(poller.isDown(A_MoveRight))
{
player.setAutoMove(false);
player.setAutoMove(false);
moveX += speed;
}
@ -311,13 +310,13 @@ namespace MWInput
{
player.setAutoMove(false);
moveZ -= speed;
}
}
if(poller.isDown(A_MoveBackward))
{
player.setAutoMove(false);
moveZ += speed;
}
player.setAutoMove(false);
moveZ += speed;
}
// TODO: These should be enabled for floating modes (like

View file

@ -31,8 +31,8 @@ namespace MWWorld
ESM::Class *mClass;
bool mCollisionMode;
bool mAutoMove;
bool misWalking; //Testing...
bool mAutoMove;
bool misWalking;//Testing...
public:
@ -112,44 +112,38 @@ namespace MWWorld
mCollisionMode = !mCollisionMode;
}
bool getAutoMove()
bool getAutoMove()
{
return mAutoMove;
}
return mAutoMove;
}
void setAutoMove(bool setMe)
{
mAutoMove = setMe;
}
//NOTE: we don't have speed being calculated yet, so for now this function only requires a frame duration.
/// <param name="duration">float value representing time since last call</param>
void executeAutoMove(float duration)
void setAutoMove(bool setMe)
{
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
moveRel(X_Val, Y_Val, Z_Val);
//else go forward at walk speed.
}
}
mAutoMove = setMe;
}
bool getisWalking()
{
return misWalking;
}
//NOTE: we don't have speed being calculated yet, so for now this function only requires a frame duration.
/// <param name="duration">float value representing time since last call</param>
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)
{
moveRel(X_Val, Y_Val, Z_Val);
}
}
void setisWalking(bool setMe)
{
misWalking = setMe;
}
bool getisWalking()
{
return misWalking;
}
};
void setisWalking(bool setMe)
{
misWalking = setMe;
}
};
}
#endif