mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-19 13:41:11 +00:00
(svn r22066) -Fix [FS#4502]: building a statue did not check whether the object pool is full
This commit is contained in:
parent
2d4d43d00c
commit
ece59dc0d1
@ -2530,6 +2530,8 @@ static bool SearchTileForStatue(TileIndex tile, void *user_data)
|
||||
*/
|
||||
static CommandCost TownActionBuildStatue(Town *t, DoCommandFlag flags)
|
||||
{
|
||||
if (!Object::CanAllocateItem()) return_cmd_error(STR_ERROR_TOO_MANY_OBJECTS);
|
||||
|
||||
TileIndex tile = t->xy;
|
||||
if (CircularTileSearch(&tile, 9, SearchTileForStatue, NULL)) {
|
||||
if (flags & DC_EXEC) {
|
||||
|
Loading…
Reference in New Issue
Block a user