mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
mapgen tweaking
This commit is contained in:
parent
ea2d03e468
commit
25a7fabed8
9 changed files with 285 additions and 184 deletions
|
@ -585,15 +585,6 @@ inline bool isInArea(v3s16 p, v3s16 d)
|
|||
);
|
||||
}
|
||||
|
||||
inline s16 rangelim(s16 i, s16 min, s16 max)
|
||||
{
|
||||
if(i < min)
|
||||
return min;
|
||||
if(i > max)
|
||||
return max;
|
||||
return i;
|
||||
}
|
||||
|
||||
inline s16 rangelim(s16 i, s16 max)
|
||||
{
|
||||
if(i < 0)
|
||||
|
@ -603,6 +594,8 @@ inline s16 rangelim(s16 i, s16 max)
|
|||
return i;
|
||||
}
|
||||
|
||||
#define rangelim(d, min, max) ((d) < (min) ? (min) : ((d)>(max)?(max):(d)))
|
||||
|
||||
inline v3s16 arealim(v3s16 p, s16 d)
|
||||
{
|
||||
if(p.X < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue