diff options
author | rubidium <rubidium@openttd.org> | 2009-12-13 22:17:12 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2009-12-13 22:17:12 +0000 |
commit | c2ec2e2db3f632ed6e52f83403e9d689a80b9b14 (patch) | |
tree | 58cf907ebe3c07611bb5f5ca2a9f42a937edc2db /src/group_cmd.cpp | |
parent | 8b9a2218de1e291f3de5702c0ad2ddfdb1acb000 (diff) | |
download | openttd-c2ec2e2db3f632ed6e52f83403e9d689a80b9b14.tar.xz |
(svn r18494) -Fix (r18474): crash when moving non-engine to new free wagon chain and group count was off when moving a front engine within the same train and the new front isn't an engine.
Diffstat (limited to 'src/group_cmd.cpp')
-rw-r--r-- | src/group_cmd.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp index 59b799d9e..63e8f99fe 100644 --- a/src/group_cmd.cpp +++ b/src/group_cmd.cpp @@ -373,7 +373,7 @@ void SetTrainGroupID(Train *v, GroupID new_g) { if (!Group::IsValidID(new_g) && !IsDefaultGroupID(new_g)) return; - assert(v->IsFrontEngine()); + assert(v->IsFrontEngine() || IsDefaultGroupID(new_g)); for (Vehicle *u = v; u != NULL; u = u->Next()) { if (u->IsEngineCountable()) UpdateNumEngineGroup(u->engine_type, u->group_id, new_g); |