(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.

This commit is contained in:
yexo
2009-05-26 21:59:49 +00:00
parent aa62ec0a1f
commit 0d56cfabfa
17 changed files with 88 additions and 53 deletions

View File

@@ -558,10 +558,11 @@ CommandCost CmdRenameVehicle(TileIndex tile, DoCommandFlag flags, uint32 p1, uin
*/
CommandCost CmdChangeServiceInt(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
{
uint16 serv_int = GetServiceIntervalClamped(p2); // Double check the service interval from the user-input
Vehicle *v = Vehicle::GetIfValid(p1);
if (v == NULL || !CheckOwnership(v->owner)) return CMD_ERROR;
if (serv_int != p2 || v == NULL || !CheckOwnership(v->owner)) return CMD_ERROR;
uint16 serv_int = GetServiceIntervalClamped(p2, v->owner); // Double check the service interval from the user-input
if (serv_int != p2) return CMD_ERROR;
if (flags & DC_EXEC) {
v->service_interval = serv_int;