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

More AutoMove, now including walking - ready for a look and then test

This commit is contained in:
Star-Demon 2011-01-16 11:05:03 -05:00
parent 5aec3815fd
commit 1a56ef9a67
2 changed files with 13 additions and 5 deletions

View File

@ -287,7 +287,7 @@ namespace MWInput
float moveX = 0, moveY = 0, moveZ = 0;
//execute Automove - condition checked in function
player.executeAutoMove((float)evt.timeSinceLastEvent);
player.executeAutoMove((float)evt.timeSinceLastEvent); //or since last frame?
//Poll and execute movement keys - will disable automove if pressed.
if(poller.isDown(A_MoveLeft))

View File

@ -125,13 +125,21 @@ namespace MWWorld
}
/// <param name="duration">float value representing time since last call</param>
void executeAutoMove(float duration)
void executeAutoMove(float duration) //call by value for MoveZ makes this harder.
{
if (this.mAutoMove == true)
{
//No code insight! ARGH!
//Z...? Forward is Z? /boggle
//player.setspeedZ() = speed * duration * -1;
//TODO: Make player go.
/*Access moveZ, access walking/running speed, -1 is for correct direction,
otherwise you end up running backwards - not a bad idea for a future feature, actually...*/
/*
if (this.misWalking == false)
{
//inputmanager.moveZ = 300 * duration * -1;
} else {
//inputmanager.moveZ = 100 * duration * -1;
}
*/
}
}