mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 18:13:46 +01:00
TouchControls: Fix outdated player controls in TOSERVER_INTERACT
This commit is contained in:
parent
ecf535ee83
commit
9e198fc22c
@ -3351,6 +3351,10 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud)
|
|||||||
if (g_touchscreengui) {
|
if (g_touchscreengui) {
|
||||||
auto mode = selected_def.touch_interaction.getMode(pointed.type);
|
auto mode = selected_def.touch_interaction.getMode(pointed.type);
|
||||||
g_touchscreengui->applyContextControls(mode);
|
g_touchscreengui->applyContextControls(mode);
|
||||||
|
// applyContextControls may change dig/place input.
|
||||||
|
// Update again so that TOSERVER_INTERACT packets have the correct controls set.
|
||||||
|
player->control.dig = isKeyDown(KeyType::DIG);
|
||||||
|
player->control.place = isKeyDown(KeyType::PLACE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Note that updating the selection mesh every frame is not particularly efficient,
|
// Note that updating the selection mesh every frame is not particularly efficient,
|
||||||
|
Loading…
Reference in New Issue
Block a user