src/ship_cmd.cpp
changeset 6173 c6cf6600a82c
parent 6109 2361013ddd68
child 6195 b90cf92697b9
equal deleted inserted replaced
6172:df973b5f6190 6173:c6cf6600a82c
   833 	if (!IsTileOwner(tile, _current_player)) return CMD_ERROR;
   833 	if (!IsTileOwner(tile, _current_player)) return CMD_ERROR;
   834 
   834 
   835 	v = AllocateVehicle();
   835 	v = AllocateVehicle();
   836 	unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_Ship);
   836 	unit_num = HASBIT(p2, 0) ? 0 : GetFreeUnitNumber(VEH_Ship);
   837 
   837 
   838 	if (v == NULL || IsOrderPoolFull() || unit_num > _patches.max_ships)
   838 	if (v == NULL || unit_num > _patches.max_ships)
   839 		return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
   839 		return_cmd_error(STR_00E1_TOO_MANY_VEHICLES_IN_GAME);
   840 
   840 
   841 	if (flags & DC_EXEC) {
   841 	if (flags & DC_EXEC) {
   842 		int x;
   842 		int x;
   843 		int y;
   843 		int y;