forked from teamnwah/openmw-tes3coop
fixed tab problem
This commit is contained in:
parent
246544806a
commit
36cb10572a
2 changed files with 57 additions and 64 deletions
|
@ -143,17 +143,17 @@ namespace MWInput
|
||||||
|
|
||||||
void toggleAutoMove()
|
void toggleAutoMove()
|
||||||
{
|
{
|
||||||
if (player.getAutoMove() == false)
|
if (player.getAutoMove() == false)
|
||||||
{
|
{
|
||||||
player.setAutoMove(true);
|
player.setAutoMove(true);
|
||||||
} else {
|
} else {
|
||||||
player.setAutoMove(false);
|
player.setAutoMove(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void toggleWalking()
|
void toggleWalking()
|
||||||
{
|
{
|
||||||
player.setisWalking(true);
|
player.setisWalking(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Exit program now button (which is disabled in GUI mode)
|
// 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.
|
//Poll and execute movement keys - will disable automove if pressed.
|
||||||
if(poller.isDown(A_MoveLeft))
|
if(poller.isDown(A_MoveLeft))
|
||||||
{
|
{
|
||||||
player.setAutoMove(false);
|
player.setAutoMove(false);
|
||||||
moveX -= speed;
|
moveX -= speed;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(poller.isDown(A_MoveRight))
|
if(poller.isDown(A_MoveRight))
|
||||||
{
|
{
|
||||||
player.setAutoMove(false);
|
player.setAutoMove(false);
|
||||||
moveX += speed;
|
moveX += speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -311,13 +310,13 @@ namespace MWInput
|
||||||
{
|
{
|
||||||
player.setAutoMove(false);
|
player.setAutoMove(false);
|
||||||
moveZ -= speed;
|
moveZ -= speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(poller.isDown(A_MoveBackward))
|
if(poller.isDown(A_MoveBackward))
|
||||||
{
|
{
|
||||||
player.setAutoMove(false);
|
player.setAutoMove(false);
|
||||||
moveZ += speed;
|
moveZ += speed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// TODO: These should be enabled for floating modes (like
|
// TODO: These should be enabled for floating modes (like
|
||||||
|
|
|
@ -31,8 +31,8 @@ namespace MWWorld
|
||||||
ESM::Class *mClass;
|
ESM::Class *mClass;
|
||||||
bool mCollisionMode;
|
bool mCollisionMode;
|
||||||
|
|
||||||
bool mAutoMove;
|
bool mAutoMove;
|
||||||
bool misWalking; //Testing...
|
bool misWalking;//Testing...
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@ -112,44 +112,38 @@ namespace MWWorld
|
||||||
mCollisionMode = !mCollisionMode;
|
mCollisionMode = !mCollisionMode;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool getAutoMove()
|
bool getAutoMove()
|
||||||
{
|
{
|
||||||
return mAutoMove;
|
return mAutoMove;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setAutoMove(bool setMe)
|
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)
|
|
||||||
{
|
{
|
||||||
float X_Val = 0.0f;
|
mAutoMove = setMe;
|
||||||
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.
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool getisWalking()
|
//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>
|
||||||
return misWalking;
|
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)
|
bool getisWalking()
|
||||||
{
|
{
|
||||||
misWalking = setMe;
|
return misWalking;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void setisWalking(bool setMe)
|
||||||
|
{
|
||||||
};
|
misWalking = setMe;
|
||||||
|
}
|
||||||
|
};
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue