diff options
author | rubidium <rubidium@openttd.org> | 2010-12-07 20:45:11 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2010-12-07 20:45:11 +0000 |
commit | 0f2402306ccae50a26c8453d524363637b904128 (patch) | |
tree | 3e1b4dad2f4bd3ea302f1ce5cbf41177714127cd | |
parent | 249d21d3de87f77c5cbd859b5367b98db31917a5 (diff) | |
download | openttd-0f2402306ccae50a26c8453d524363637b904128.tar.xz |
(svn r21424) -Fix: CMD_CLEAR_ORDER_BACKUP might not get executed when the user pressed the shift key
-rw-r--r-- | src/order_backup.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/order_backup.cpp b/src/order_backup.cpp index 25ee0045f..ef615e2ae 100644 --- a/src/order_backup.cpp +++ b/src/order_backup.cpp @@ -165,7 +165,10 @@ CommandCost CmdClearOrderBackup(TileIndex tile, DoCommandFlag flags, uint32 p1, if (t != INVALID_TILE && t != ob->tile) continue; if (from_gui) { - DoCommandP(ob->tile, 0, 0, CMD_CLEAR_ORDER_BACKUP); + /* We need to circumvent the "prevention" from this command being executed + * while the game is paused, so use the internal method. Nor do we want + * this command to get its cost estimated when shift is pressed. */ + DoCommandPInternal(ob->tile, 0, 0, CMD_CLEAR_ORDER_BACKUP, NULL, NULL, true, false); } else { /* The command came from the game logic, i.e. the clearing of a tile. * In that case we have no need to actually sync this, just do it. */ |