forked from teamnwah/openmw-tes3coop
Sneak State, Bound Sneak and AutoMove, began outlining AutoMove
This commit is contained in:
parent
d4dccc0b54
commit
3ab4a4487f
3 changed files with 15 additions and 2 deletions
|
@ -60,6 +60,7 @@ namespace MWInput
|
||||||
A_CycleSpellRight,
|
A_CycleSpellRight,
|
||||||
A_CycleWeaponLeft,//Cycling through weapons
|
A_CycleWeaponLeft,//Cycling through weapons
|
||||||
A_CycleWeaponRight,
|
A_CycleWeaponRight,
|
||||||
|
A_ToggleSneak, //Toggles Sneak, add Push-Sneak later
|
||||||
|
|
||||||
A_QuickSave,
|
A_QuickSave,
|
||||||
A_QuickLoad,
|
A_QuickLoad,
|
||||||
|
@ -213,6 +214,7 @@ namespace MWInput
|
||||||
**********************************/
|
**********************************/
|
||||||
|
|
||||||
// Key bindings for keypress events
|
// Key bindings for keypress events
|
||||||
|
// NOTE: These keys do not require constant polling - use in conjuction with variables in loops.
|
||||||
|
|
||||||
disp->bind(A_Quit, KC_Q);
|
disp->bind(A_Quit, KC_Q);
|
||||||
disp->bind(A_Quit, KC_ESCAPE);
|
disp->bind(A_Quit, KC_ESCAPE);
|
||||||
|
@ -220,8 +222,11 @@ namespace MWInput
|
||||||
disp->bind(A_Inventory, KC_I);
|
disp->bind(A_Inventory, KC_I);
|
||||||
disp->bind(A_Console, KC_F1);
|
disp->bind(A_Console, KC_F1);
|
||||||
disp->bind(A_Activate, KC_SPACE);
|
disp->bind(A_Activate, KC_SPACE);
|
||||||
|
disp->bind(A_AutoMove, KC_Z);
|
||||||
|
disp->bind(A_ToggleSneak, KC_X);
|
||||||
|
|
||||||
// Key bindings for polled keys
|
// Key bindings for polled keys
|
||||||
|
// NOTE: These keys are constantly being polled. Only add keys that must be checked each frame.
|
||||||
|
|
||||||
// Arrow keys
|
// Arrow keys
|
||||||
poller.bind(A_MoveLeft, KC_LEFT);
|
poller.bind(A_MoveLeft, KC_LEFT);
|
||||||
|
@ -260,6 +265,14 @@ namespace MWInput
|
||||||
float speed = 300 * evt.timeSinceLastFrame;
|
float speed = 300 * evt.timeSinceLastFrame;
|
||||||
float moveX = 0, moveY = 0, moveZ = 0;
|
float moveX = 0, moveY = 0, moveZ = 0;
|
||||||
|
|
||||||
|
|
||||||
|
//TODO: Where should I put bool isAutoMoving; ?
|
||||||
|
//AUTO-MOVE condition
|
||||||
|
//Check Automove Toggle.
|
||||||
|
//If true...apply current MoveType speed to current direction
|
||||||
|
|
||||||
|
//If any other movement key is pressed, Toggle automove.
|
||||||
|
|
||||||
if(poller.isDown(A_MoveLeft)) moveX -= speed;
|
if(poller.isDown(A_MoveLeft)) moveX -= speed;
|
||||||
if(poller.isDown(A_MoveRight)) moveX += speed;
|
if(poller.isDown(A_MoveRight)) moveX += speed;
|
||||||
if(poller.isDown(A_MoveForward)) moveZ -= speed;
|
if(poller.isDown(A_MoveForward)) moveZ -= speed;
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 12e5c8d704b959c78a62931b2360d18092b82c3d
|
Subproject commit 7345f2307f3ce6682a4044b98a811fac2cb7c4f0
|
|
@ -1 +1 @@
|
||||||
Subproject commit 7185eab18c29a0a5e03e44690d6bd8ece7e3792b
|
Subproject commit 377e7d71ceea5a1ca166b8df9a03a5b68df83bc5
|
Loading…
Reference in a new issue