1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-21 20:05:45 +02:00

Revert all commits up to (including) a704c04f

This commit is contained in:
kwolekr
2015-03-07 16:16:25 -05:00
parent ffdf8dedb7
commit 32352e90da
173 changed files with 8751 additions and 11138 deletions

View File

@@ -41,8 +41,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
const char *GenElementManager::ELEMENT_TITLE = "element";
static const s16 INVALID_HEIGHT = MAP_GENERATION_LIMIT + 1;
FlagDesc flagdesc_mapgen[] = {
{"trees", MG_TREES},
{"caves", MG_CAVES},
@@ -157,12 +155,6 @@ s16 Mapgen::findGroundLevel(v2s16 p2d, s16 ymin, s16 ymax)
}
void Mapgen::initHeightMap(s16 *dest, size_t len)
{
for (size_t i = 0; i < len; i++)
dest[i] = INVALID_HEIGHT;
}
void Mapgen::updateHeightmap(v3s16 nmin, v3s16 nmax)
{
if (!heightmap)
@@ -174,13 +166,11 @@ void Mapgen::updateHeightmap(v3s16 nmin, v3s16 nmax)
for (s16 x = nmin.X; x <= nmax.X; x++, index++) {
s16 y = findGroundLevel(v2s16(x, z), nmin.Y, nmax.Y);
if (heightmap[index] != INVALID_HEIGHT) {
// if the values found are out of range, trust the old heightmap
if (y == nmax.Y && heightmap[index] > nmax.Y)
continue;
if (y == nmin.Y - 1 && heightmap[index] < nmin.Y)
continue;
}
// if the values found are out of range, trust the old heightmap
if (y == nmax.Y && heightmap[index] > nmax.Y)
continue;
if (y == nmin.Y - 1 && heightmap[index] < nmin.Y)
continue;
heightmap[index] = y;
}
@@ -427,8 +417,9 @@ void GenerateNotifier::getEvents(
std::map<std::string, std::vector<v3s16> > &event_map,
bool peek_events)
{
for (std::vector<GenNotifyEvent>::iterator it = m_notify_events.begin();
it != m_notify_events.end(); ++it) {
std::list<GenNotifyEvent>::iterator it;
for (it = m_notify_events.begin(); it != m_notify_events.end(); ++it) {
GenNotifyEvent &gn = *it;
std::string name = (gn.type == GENNOTIFY_DECORATION) ?
"decoration#"+ itos(gn.id) :