diff options
author | Perttu Ahola <celeron55@gmail.com> | 2011-04-02 20:55:22 +0300 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2011-04-02 20:55:22 +0300 |
commit | bc66bb2d409f13554bdcec7386766af82a343cad (patch) | |
tree | 37376d220e421db8d567c2624fe977355fe6f832 /src/mapblock.h | |
parent | 2990f5d90bd556684c07d60872a707e649bd71ee (diff) | |
download | minetest-bc66bb2d409f13554bdcec7386766af82a343cad.tar.gz minetest-bc66bb2d409f13554bdcec7386766af82a343cad.tar.bz2 minetest-bc66bb2d409f13554bdcec7386766af82a343cad.zip |
Mapgen is better now. Not a lot, but a bit!
Diffstat (limited to 'src/mapblock.h')
-rw-r--r-- | src/mapblock.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/src/mapblock.h b/src/mapblock.h index 02c072895..97129bd34 100644 --- a/src/mapblock.h +++ b/src/mapblock.h @@ -244,6 +244,17 @@ public: return m_lighting_expired; } + bool isFullyGenerated() + { + return !m_not_fully_generated; + } + + void setFullyGenerated(bool b) + { + setChangedFlag(); + m_not_fully_generated = !b; + } + bool isValid() { if(m_lighting_expired) @@ -655,12 +666,28 @@ private: // Whether day and night lighting differs bool m_day_night_differs; + /* + Whether everything that is mainly located on this block has + been added to the world. + + While this is false, a block can still be changed a bit when + stuff is added to the neighboring blocks that extends to this + one. + + When this is false on every one of a 3x3x3 chunk of blocks, the + central one will not be changed by the map generator in the + future. + + TODO: Save in file + */ + bool m_not_fully_generated; + MapBlockObjectList m_objects; // Object spawning stuff float m_spawn_timer; -#ifndef SERVER +#ifndef SERVER // Only on client /* Set to true if the mesh has been ordered to be updated sometime in the background. |