Cache animated tile speed, use btree map for animated tiles

This commit is contained in:
Jonathan G Rennison
2020-11-24 19:02:38 +00:00
parent 72a7ae25e8
commit 2ad446369d
23 changed files with 267 additions and 56 deletions

View File

@@ -662,6 +662,14 @@ void AnimateNewHouseConstruction(TileIndex tile)
}
}
uint8 GetNewHouseTileAnimationSpeed(TileIndex tile)
{
const HouseSpec *hs = HouseSpec::Get(GetHouseType(tile));
if (hs == nullptr) return 0;
return HouseAnimationBase::GetAnimationSpeed(hs);
}
/**
* Check if GRF allows a given house to be constructed (callback 17)
* @param house_id house type