diff options
Diffstat (limited to 'src/client.h')
-rw-r--r-- | src/client.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/client.h b/src/client.h index b96ddcbcf..9110d33f8 100644 --- a/src/client.h +++ b/src/client.h @@ -201,15 +201,19 @@ public: { JMutexAutoLock envlock(m_env_mutex); assert(m_env.getMap().mapType() == MAPTYPE_CLIENT); - v3s16 blockpos = ((ClientMap&)m_env.getMap()).setTempMod(p, mod); - m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio()); + bool changed = false; + v3s16 blockpos = ((ClientMap&)m_env.getMap()).setTempMod(p, mod, &changed); + if(changed) + m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio()); } void clearTempMod(v3s16 p) { JMutexAutoLock envlock(m_env_mutex); assert(m_env.getMap().mapType() == MAPTYPE_CLIENT); - v3s16 blockpos = ((ClientMap&)m_env.getMap()).clearTempMod(p); - m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio()); + bool changed = false; + v3s16 blockpos = ((ClientMap&)m_env.getMap()).clearTempMod(p, &changed); + if(changed) + m_env.getMap().updateMeshes(blockpos, m_env.getDayNightRatio()); } float getAvgRtt() |