summaryrefslogtreecommitdiff
path: root/src/group_cmd.cpp
diff options
context:
space:
mode:
authorsmatz <smatz@openttd.org>2009-07-13 16:35:22 +0000
committersmatz <smatz@openttd.org>2009-07-13 16:35:22 +0000
commit868c21cbcc3b04e4e6649417ff94763a82c7d8b5 (patch)
tree5b5c1b451eff9b600077da230411e02dd09ec514 /src/group_cmd.cpp
parentbb9fee178da65f6b606e6853821f15a26c1ab3eb (diff)
downloadopenttd-868c21cbcc3b04e4e6649417ff94763a82c7d8b5.tar.xz
(svn r16813) -Codechange: make IsEngineCountable() member of Vehicle
Diffstat (limited to 'src/group_cmd.cpp')
-rw-r--r--src/group_cmd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp
index bd4905268..7ef41258b 100644
--- a/src/group_cmd.cpp
+++ b/src/group_cmd.cpp
@@ -215,7 +215,7 @@ CommandCost CmdAddVehicleGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, u
case VEH_ROAD:
case VEH_SHIP:
case VEH_AIRCRAFT:
- if (IsEngineCountable(v)) UpdateNumEngineGroup(v->engine_type, v->group_id, new_g);
+ if (v->IsEngineCountable()) UpdateNumEngineGroup(v->engine_type, v->group_id, new_g);
v->group_id = new_g;
break;
}
@@ -349,7 +349,7 @@ void SetTrainGroupID(Train *v, GroupID new_g)
assert(v->IsFrontEngine());
for (Vehicle *u = v; u != NULL; u = u->Next()) {
- if (IsEngineCountable(u)) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g);
+ if (u->IsEngineCountable()) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g);
u->group_id = new_g;
}
@@ -372,7 +372,7 @@ void UpdateTrainGroupID(Train *v)
GroupID new_g = v->IsFrontEngine() ? v->group_id : (GroupID)DEFAULT_GROUP;
for (Vehicle *u = v; u != NULL; u = u->Next()) {
- if (IsEngineCountable(u)) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g);
+ if (u->IsEngineCountable()) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g);
u->group_id = new_g;
}