summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-19 21:47:14 +0000
committerrubidium <rubidium@openttd.org>2007-05-19 21:47:14 +0000
commit821c0acf4d534ecd69f718734df4bb64ad369f93 (patch)
tree0db3b81a7fd8b2632985d1c5e58fabfe683a2e14
parent6ef7915e6e741164e66a56fd3e8a7e8a43601ade (diff)
downloadopenttd-821c0acf4d534ecd69f718734df4bb64ad369f93.tar.xz
(svn r9882) -Fix (r9874): the "default group" is also a valid group in some cases.
-rw-r--r--src/group_cmd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp
index b44e92fbe..72032e0c7 100644
--- a/src/group_cmd.cpp
+++ b/src/group_cmd.cpp
@@ -181,7 +181,7 @@ int32 CmdAddVehicleGroup(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
{
GroupID new_g = p1;
- if (!IsValidVehicleID(p2) || !IsValidGroupID(new_g)) return CMD_ERROR;
+ if (!IsValidVehicleID(p2) || (!IsValidGroupID(new_g) && !IsDefaultGroupID(new_g))) return CMD_ERROR;
Vehicle *v = GetVehicle(p2);
if (v->owner != _current_player || (v->type == VEH_TRAIN && !IsFrontEngine(v))) return CMD_ERROR;