1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-27 17:28:41 +00:00

Cavegen: Merge instances of repetitive surface level-finding code

This commit is contained in:
kwolekr 2016-05-10 13:35:39 -04:00
parent a605d69092
commit 68b1cd8d1b
2 changed files with 47 additions and 55 deletions

View file

@ -71,6 +71,9 @@ public:
void makeCave(v3s16 nmin, v3s16 nmax, int max_stone_height);
void makeTunnel(bool dirswitch);
void carveRoute(v3f vec, float f, bool randomize_xz);
private:
inline bool isPosAboveSurface(v3s16 p);
};
/*
@ -140,6 +143,8 @@ public:
private:
void makeTunnel(bool dirswitch);
void carveRoute(v3f vec, float f, bool randomize_xz, bool tunnel_above_ground);
inline s16 getSurfaceFromHeightmap(v3s16 p);
};
#endif