Codechange: Handle SnowTile state separately from ClearGround.

This removes the need for ClearGround to pretend that CLEAR_SNOW exists.
This commit is contained in:
Peter Nelson
2025-02-20 19:21:39 +00:00
committed by Peter Nelson
parent 02a1f59a6c
commit 3cf9b15959
7 changed files with 36 additions and 37 deletions

View File

@@ -2387,7 +2387,7 @@ bool AfterLoadGame()
if (IsSavegameVersionBefore(SLV_135)) {
for (auto t : Map::Iterate()) {
if (IsTileType(t, MP_CLEAR)) {
if (GetRawClearGround(t) == CLEAR_SNOW) {
if (GetClearGround(t) == CLEAR_SNOW) { // CLEAR_SNOW becomes CLEAR_GRASS with IsSnowTile() set.
SetClearGroundDensity(t, CLEAR_GRASS, GetClearDensity(t));
SetBit(t.m3(), 4);
} else {