Skip to content

Instantly share code, notes, and snippets.

@kahrl
Created September 7, 2014 20:17
Show Gist options
  • Save kahrl/4ee8911c341f7158343c to your computer and use it in GitHub Desktop.
Save kahrl/4ee8911c341f7158343c to your computer and use it in GitHub Desktop.
diff --git a/src/client.cpp b/src/client.cpp
index 8a64b9c..d083374 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -2477,9 +2477,11 @@ int Client::getCrackLevel()
void Client::setHighlighted(v3s16 pos, bool node_highlighted)
{
- m_node_highlighted = node_highlighted;
- addUpdateMeshTaskForNode(m_highlighted_pos, false, true);
+ v3s16 old_highlighted_pos = m_highlighted_pos;
m_highlighted_pos = pos;
+ m_node_highlighted = node_highlighted;
+
+ addUpdateMeshTaskForNode(old_highlighted_pos, false, true);
addUpdateMeshTaskForNode(m_highlighted_pos, false, true);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment