From 1a56ef9a676212385c9c7438428ae53343068e31 Mon Sep 17 00:00:00 2001 From: Star-Demon Date: Sun, 16 Jan 2011 11:05:03 -0500 Subject: [PATCH] More AutoMove, now including walking - ready for a look and then test --- apps/openmw/mwinput/inputmanager.cpp | 2 +- apps/openmw/mwworld/player.hpp | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/apps/openmw/mwinput/inputmanager.cpp b/apps/openmw/mwinput/inputmanager.cpp index 159c0a26d1..4fc8e3af43 100644 --- a/apps/openmw/mwinput/inputmanager.cpp +++ b/apps/openmw/mwinput/inputmanager.cpp @@ -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)) diff --git a/apps/openmw/mwworld/player.hpp b/apps/openmw/mwworld/player.hpp index 7a9bf20b19..d576a45ae3 100644 --- a/apps/openmw/mwworld/player.hpp +++ b/apps/openmw/mwworld/player.hpp @@ -125,13 +125,21 @@ namespace MWWorld } /// float value representing time since last call - 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; + } + */ } }