(svn r22066) -Fix [FS#4502]: building a statue did not check whether the object pool is full

This commit is contained in:
rubidium 2011-02-12 18:45:05 +00:00
parent 2d4d43d00c
commit ece59dc0d1

View File

@ -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) {