mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
TouchControls: Fix outdated player controls in TOSERVER_INTERACT
This commit is contained in:
parent
322a9c2f74
commit
eae9a70385
1 changed files with 4 additions and 0 deletions
|
@ -3358,6 +3358,10 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud)
|
||||||
if (g_touchcontrols) {
|
if (g_touchcontrols) {
|
||||||
auto mode = selected_def.touch_interaction.getMode(pointed.type);
|
auto mode = selected_def.touch_interaction.getMode(pointed.type);
|
||||||
g_touchcontrols->applyContextControls(mode);
|
g_touchcontrols->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…
Add table
Add a link
Reference in a new issue