mirror of
https://github.com/minetest/minetest.git
synced 2025-03-06 20:48:40 +01:00
check y limits early
This commit is contained in:
parent
08fad862aa
commit
6e995972bb
1 changed files with 4 additions and 0 deletions
|
@ -126,6 +126,10 @@ bool Decoration::canPlaceDecoration(MMVManip *vm, v3s16 p)
|
|||
|
||||
void Decoration::placeDeco(Mapgen *mg, u32 blockseed, v3s16 nmin, v3s16 nmax)
|
||||
{
|
||||
// Skip if y ranges do not overlap
|
||||
if (nmax.Y < y_min || y_max < nmin.Y)
|
||||
return;
|
||||
|
||||
PcgRandom ps(blockseed + 53);
|
||||
int carea_size = nmax.X - nmin.X + 1;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue