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

pull/155/head
rubidium 13 years ago
parent b778cc61d1
commit aa333aeff2

@ -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…
Cancel
Save