aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mapblock.cpp3
-rw-r--r--src/mapblock.h12
-rw-r--r--src/server.cpp2
3 files changed, 11 insertions, 6 deletions
diff --git a/src/mapblock.cpp b/src/mapblock.cpp
index 44ca75ff0..6613f388a 100644
--- a/src/mapblock.cpp
+++ b/src/mapblock.cpp
@@ -441,7 +441,8 @@ void MapBlock::stepObjects(float dtime, bool server, u32 daynight_ratio)
*/
m_objects.step(dtime, server, daynight_ratio);
- setChangedFlag();
+ //setChangedFlag();
+ raiseModified(MOD_STATE_WRITE_AT_UNLOAD);
}
diff --git a/src/mapblock.h b/src/mapblock.h
index 741c306eb..368290065 100644
--- a/src/mapblock.h
+++ b/src/mapblock.h
@@ -225,8 +225,10 @@ public:
void setLightingExpired(bool expired)
{
- m_lighting_expired = expired;
- raiseModified(MOD_STATE_WRITE_NEEDED);
+ if(expired != m_lighting_expired){
+ m_lighting_expired = expired;
+ raiseModified(MOD_STATE_WRITE_NEEDED);
+ }
}
bool getLightingExpired()
{
@@ -239,8 +241,10 @@ public:
}
void setGenerated(bool b)
{
- raiseModified(MOD_STATE_WRITE_NEEDED);
- m_generated = b;
+ if(b != m_generated){
+ raiseModified(MOD_STATE_WRITE_NEEDED);
+ m_generated = b;
+ }
}
bool isValid()
diff --git a/src/server.cpp b/src/server.cpp
index 44889d67e..c95c724cb 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -897,7 +897,7 @@ void RemoteClient::SendObjectData(
{
block->stepObjects(dtime, true, server->m_env.getDayNightRatio());
stepped_blocks.insert(p, true);
- block->setChangedFlag();
+ //block->setChangedFlag();
}
// Skip block if there are no objects