diff options
author | madmaxoft <github@xoft.cz> | 2014-02-23 16:30:49 +0100 |
---|---|---|
committer | madmaxoft <github@xoft.cz> | 2014-02-24 09:34:37 +0100 |
commit | 728e3c68b61e68d4cb73071cf04b44d268742aca (patch) | |
tree | e104a53c1a1a1a3e913a87a34618b8f8b5610b5e | |
parent | Merge pull request #716 from Howaner/BreakFix (diff) | |
download | cuberite-728e3c68b61e68d4cb73071cf04b44d268742aca.tar cuberite-728e3c68b61e68d4cb73071cf04b44d268742aca.tar.gz cuberite-728e3c68b61e68d4cb73071cf04b44d268742aca.tar.bz2 cuberite-728e3c68b61e68d4cb73071cf04b44d268742aca.tar.lz cuberite-728e3c68b61e68d4cb73071cf04b44d268742aca.tar.xz cuberite-728e3c68b61e68d4cb73071cf04b44d268742aca.tar.zst cuberite-728e3c68b61e68d4cb73071cf04b44d268742aca.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkMap.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/ChunkMap.cpp b/src/ChunkMap.cpp index fbb8706e0..b5795fbaf 100644 --- a/src/ChunkMap.cpp +++ b/src/ChunkMap.cpp @@ -805,6 +805,10 @@ void cChunkMap::WakeUpSimulators(int a_BlockX, int a_BlockY, int a_BlockZ) /// Wakes up the simulators for the specified area of blocks void cChunkMap::WakeUpSimulatorsInArea(int a_MinBlockX, int a_MaxBlockX, int a_MinBlockY, int a_MaxBlockY, int a_MinBlockZ, int a_MaxBlockZ) { + // Limit the Y coords: + a_MinBlockY = std::max(a_MinBlockY, 0); + a_MaxBlockY = std::min(a_MaxBlockY, cChunkDef::Height - 1); + cSimulatorManager * SimMgr = m_World->GetSimulatorManager(); int MinChunkX, MinChunkZ, MaxChunkX, MaxChunkZ; cChunkDef::BlockToChunk(a_MinBlockX, a_MinBlockZ, MinChunkX, MinChunkZ); |