summaryrefslogtreecommitdiff
path: root/train_cmd.c
diff options
context:
space:
mode:
Diffstat (limited to 'train_cmd.c')
-rw-r--r--train_cmd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/train_cmd.c b/train_cmd.c
index 2a7693fc0..6d571bb25 100644
--- a/train_cmd.c
+++ b/train_cmd.c
@@ -1478,8 +1478,10 @@ int32 CmdTrainGotoDepot(int x, int y, uint32 flags, uint32 p1, uint32 p2)
return 0;
}
-/* p1 = vehicle
- * p2 = new service int
+/** Change the service interval for trains.
+ * @param x,y unused
+ * @param p1 vehicle ID that is being service-interval-changed
+ * @param p2 new service interval (0 - 65536)
*/
int32 CmdChangeTrainServiceInt(int x, int y, uint32 flags, uint32 p1, uint32 p2)
{
@@ -1489,8 +1491,7 @@ int32 CmdChangeTrainServiceInt(int x, int y, uint32 flags, uint32 p1, uint32 p2)
v = GetVehicle(p1);
- if (v->type != VEH_Train || !CheckOwnership(v->owner))
- return CMD_ERROR;
+ if (v->type != VEH_Train || !CheckOwnership(v->owner)) return CMD_ERROR;
if (flags & DC_EXEC) {
v->service_interval = (uint16)p2;