summaryrefslogtreecommitdiff
path: root/src/ship_cmd.cpp
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2009-05-26 21:59:49 +0000
committeryexo <yexo@openttd.org>2009-05-26 21:59:49 +0000
commit0d56cfabfa6b6553f02a701d3ec3d92cc7067b63 (patch)
treecbedc97360c42339860d6b03483900a203cf2ec3 /src/ship_cmd.cpp
parentaa62ec0a1f7cc2416e0397eeccc90156d27b8b44 (diff)
downloadopenttd-0d56cfabfa6b6553f02a701d3ec3d92cc7067b63.tar.xz
(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.
Diffstat (limited to 'src/ship_cmd.cpp')
-rw-r--r--src/ship_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp
index 0e947eccd..c2c5a72cd 100644
--- a/src/ship_cmd.cpp
+++ b/src/ship_cmd.cpp
@@ -127,7 +127,7 @@ static const Depot *FindClosestShipDepot(const Vehicle *v)
static void CheckIfShipNeedsService(Vehicle *v)
{
- if (_settings_game.vehicle.servint_ships == 0 || !v->NeedsAutomaticServicing()) return;
+ if (Company::Get(v->owner)->settings.vehicle.servint_ships == 0 || !v->NeedsAutomaticServicing()) return;
if (v->IsInDepot()) {
VehicleServiceInDepot(v);
return;
@@ -805,7 +805,7 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
v->name = NULL;
v->state = TRACK_BIT_DEPOT;
- v->service_interval = _settings_game.vehicle.servint_ships;
+ v->service_interval = Company::Get(_current_company)->settings.vehicle.servint_ships;
v->date_of_last_service = _date;
v->build_year = _cur_year;
v->cur_image = SPR_IMG_QUERY;