(svn r11244) -Fix: trees can now be planted on bare land without making it grassy (Csaboka)
-Fix: planting tree in desert doesn't make it grassy for the first tile-cycle (Csaboka) -Fix: when a tree dies in desert, it no longer becomes a snowy tile for the first tile-cycle (Csaboka)
This commit is contained in:
@@ -76,6 +76,7 @@
|
||||
#include "water_map.h"
|
||||
#include "industry_map.h"
|
||||
#include "unmovable_map.h"
|
||||
#include "tree_map.h"
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
@@ -2196,6 +2197,19 @@ bool AfterLoadGame()
|
||||
}
|
||||
}
|
||||
|
||||
/* Before version 81, the density of grass was always stored as zero, and
|
||||
* grassy trees were always drawn fully grassy. Furthermore, trees on rough
|
||||
* land used to have zero density, now they have full density. Therefore,
|
||||
* make all grassy/rough land trees have a density of 3. */
|
||||
if (CheckSavegameVersion(81)) {
|
||||
for (TileIndex t = 0; t < map_size; t++) {
|
||||
if (GetTileType(t) == MP_TREES) {
|
||||
TreeGround groundType = GetTreeGround(t);
|
||||
if (groundType != TREE_GROUND_SNOW_DESERT) SetTreeGroundDensity(t, groundType, 3);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user