(svn r20539) -Codechange: make order backups more self-contained.

This commit is contained in:
rubidium
2010-08-18 15:15:59 +00:00
parent a65345d7ed
commit 38ca44594f
14 changed files with 270 additions and 143 deletions

View File

@@ -23,6 +23,7 @@
#include "string_func.h"
#include "company_func.h"
#include "core/pool_func.hpp"
#include "order_backup.h"
#include "table/strings.h"
@@ -126,7 +127,7 @@ CommandCost CmdDeleteGroup(TileIndex tile, DoCommandFlag flags, uint32 p1, uint3
}
/* Update backupped orders if needed */
if (_backup_orders_data.group == g->index) _backup_orders_data.group = DEFAULT_GROUP;
OrderBackup::ClearGroup(g->index);
/* If we set an autoreplace for the group we delete, remove it. */
if (_current_company < MAX_COMPANIES) {