diff options
-rw-r--r-- | src/mapgen/mg_schematic.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mapgen/mg_schematic.cpp b/src/mapgen/mg_schematic.cpp index 653bad4fe..848a43626 100644 --- a/src/mapgen/mg_schematic.cpp +++ b/src/mapgen/mg_schematic.cpp @@ -598,8 +598,9 @@ void Schematic::applyProbabilities(v3s16 p0, } for (size_t i = 0; i != splist->size(); i++) { - s16 y = (*splist)[i].first - p0.Y; - slice_probs[y] = (*splist)[i].second; + s16 slice = (*splist)[i].first; + if (slice < size.Y) + slice_probs[slice] = (*splist)[i].second; } } |