(svn r16300) -Codechange: reduce usage of Vehicle::AllocateList

This commit is contained in:
smatz
2009-05-13 19:26:47 +00:00
parent 2bc5189ad5
commit 0274886ae1
2 changed files with 6 additions and 12 deletions

View File

@@ -361,7 +361,7 @@ CommandCost CmdCloneVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uint
veh_counter++;
} while ((v = v->Next()) != NULL);
if (!Vehicle::AllocateList(NULL, veh_counter)) {
if (!Vehicle::CanAllocateItem(veh_counter)) {
return_cmd_error(STR_ERROR_TOO_MANY_VEHICLES_IN_GAME);
}
}