1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 01:25:20 +02:00

Fix movement in random_input mode (#11592)

This commit is contained in:
NeroBurner
2021-09-05 19:58:50 +02:00
committed by GitHub
parent a3e32d81c5
commit 7f3401412e
2 changed files with 41 additions and 7 deletions

View File

@@ -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;
};