summaryrefslogtreecommitdiff
path: root/src/group_cmd.cpp
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2008-02-27 21:46:57 +0000
committerglx <glx@openttd.org>2008-02-27 21:46:57 +0000
commit459fd42e1d8586b80be7adc4f07044c0265c80d4 (patch)
treed50859c17e044259f64f82a82eb4e823029d060c /src/group_cmd.cpp
parent6aea2454c8eaf4119348a0b59deee5c644e5aa76 (diff)
downloadopenttd-459fd42e1d8586b80be7adc4f07044c0265c80d4.tar.xz
(svn r12296) -Fix [FS#1549]: restore timetable from backupped orders and add group ID to the backup
Diffstat (limited to 'src/group_cmd.cpp')
-rw-r--r--src/group_cmd.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/group_cmd.cpp b/src/group_cmd.cpp
index c1698bbe4..84aa0b39e 100644
--- a/src/group_cmd.cpp
+++ b/src/group_cmd.cpp
@@ -134,6 +134,9 @@ CommandCost CmdDeleteGroup(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (v->group_id == g->index && v->type == g->vehicle_type) v->group_id = DEFAULT_GROUP;
}
+ /* Update backupped orders if needed */
+ if (_backup_orders_data.group == g->index) _backup_orders_data.group = DEFAULT_GROUP;
+
/* If we set an autoreplace for the group we delete, remove it. */
if (_current_player < MAX_PLAYERS) {
Player *p;