forked from Mirrorlandia_minetest/minetest
ANDROID: Do not limit situations where fast is enabled
Before this commit autofast for Android was ignored if the user was sneaking, digging or building. There is no reason for this and it impedes movement control
This commit is contained in:
parent
33a633a631
commit
99cf53c908
13
src/game.cpp
13
src/game.cpp
@ -2997,17 +2997,10 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
|
|||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
/* For Android, invert the meaning of holding down the fast button (i.e.
|
/* For Android, invert the meaning of holding down the fast button (i.e.
|
||||||
* holding down the fast button -- if there is one -- means walk), unless
|
* holding down the fast button -- if there is one -- means walk)
|
||||||
* performing an action, sneaking or jumping.
|
|
||||||
*/
|
*/
|
||||||
const u32 autofast_exludebits =
|
control.aux1 = control.aux1 ^ true;
|
||||||
(1U << 4) | (1U << 6) // jump, sneak
|
keypress_bits ^= ((u32)(1U << 5));
|
||||||
| (1U << 7) | (1U << 8); // left state, right state
|
|
||||||
|
|
||||||
if ((keypress_bits & autofast_exludebits) == 0) {
|
|
||||||
control.aux1 = control.aux1 ^ true;
|
|
||||||
keypress_bits ^= ((u32)(1U << 5));
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
client->setPlayerControl(control);
|
client->setPlayerControl(control);
|
||||||
|
Loading…
Reference in New Issue
Block a user