diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-01-17 14:57:37 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-01-17 14:57:37 +0200 |
commit | 0fa0e0752a28eeb43195f2288c018d5c0b24520b (patch) | |
tree | 72c05dc4cd98663d92a6a312c6b8128c18791590 /src/client.h | |
parent | bd26be262d30eeb0ca818b634891704de4365893 (diff) | |
download | minetest-0fa0e0752a28eeb43195f2288c018d5c0b24520b.tar.gz minetest-0fa0e0752a28eeb43195f2288c018d5c0b24520b.tar.bz2 minetest-0fa0e0752a28eeb43195f2288c018d5c0b24520b.zip |
old water removed, some fixes here and there
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() |