aboutsummaryrefslogtreecommitdiff
path: root/src/client/inputhandler.h
diff options
context:
space:
mode:
authorNeroBurner <pyro4hell@gmail.com>2021-09-05 19:58:50 +0200
committerGitHub <noreply@github.com>2021-09-05 19:58:50 +0200
commit7f3401412eedc2a54b161f892b29d0a109b3a07b (patch)
tree4f7a84384633ea3949a320a2ce0c1c444b9a610f /src/client/inputhandler.h
parenta3e32d81c5292c304b85efeeb3cf2227d6ddf191 (diff)
downloaddragonfireclient-7f3401412eedc2a54b161f892b29d0a109b3a07b.tar.xz
Fix movement in random_input mode (#11592)
Diffstat (limited to 'src/client/inputhandler.h')
-rw-r--r--src/client/inputhandler.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/client/inputhandler.h b/src/client/inputhandler.h
index 76e3c7b5b..e630b860e 100644
--- a/src/client/inputhandler.h
+++ b/src/client/inputhandler.h
@@ -393,8 +393,8 @@ public:
virtual bool wasKeyPressed(GameKeyType k) { return false; }
virtual bool wasKeyReleased(GameKeyType k) { return false; }
virtual bool cancelPressed() { return false; }
- virtual float getMovementSpeed() {return 0.0f;}
- virtual float getMovementDirection() {return 0.0f;}
+ virtual float getMovementSpeed() { return movementSpeed; }
+ virtual float getMovementDirection() { return movementDirection; }
virtual v2s32 getMousePos() { return mousepos; }
virtual void setMousePos(s32 x, s32 y) { mousepos = v2s32(x, y); }
@@ -408,4 +408,6 @@ private:
KeyList keydown;
v2s32 mousepos;
v2s32 mousespeed;
+ float movementSpeed;
+ float movementDirection;
};