Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HUD: Update selection mesh every frame #12270

Merged
merged 2 commits into from
May 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/client/game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3093,10 +3093,12 @@ void Game::processPlayerInteraction(f32 dtime, bool show_hud)
!runData.btn_down_for_dig,
camera_offset);

if (pointed != runData.pointed_old) {
if (pointed != runData.pointed_old)
infostream << "Pointing at " << pointed.dump() << std::endl;
hud->updateSelectionMesh(camera_offset);
}

// Note that updating the selection mesh every frame is not particularly efficient,
// but the halo rendering code is already inefficient so there's no point in optimizing it here
hud->updateSelectionMesh(camera_offset);
appgurueu marked this conversation as resolved.
Show resolved Hide resolved

// Allow digging again if button is not pressed
if (runData.digging_blocked && !isKeyDown(KeyType::DIG))
Expand Down