summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJonathan G Rennison <j.g.rennison@gmail.com>2021-12-06 18:30:46 +0000
committerMichael Lutz <michi@icosahedron.de>2021-12-19 16:53:10 +0100
commite08a6e2014233abab22ca9a4991e3e21140241dc (patch)
tree96738ab69c3e1eb4378ccf2fd7f934fe9c6ac0dc /src
parente890e7db76b49976209675c0bf652c25e52cad94 (diff)
downloadopenttd-e08a6e2014233abab22ca9a4991e3e21140241dc.tar.xz
Fix #9735: Fix OrderBackup::Reset in non-GUI case
Diffstat (limited to 'src')
-rw-r--r--src/order_backup.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/order_backup.cpp b/src/order_backup.cpp
index 5e634d695..4e21130c2 100644
--- a/src/order_backup.cpp
+++ b/src/order_backup.cpp
@@ -189,8 +189,8 @@ CommandCost CmdClearOrderBackup(DoCommandFlag flags, TileIndex tile, ClientID us
uint32 user = _networking && !_network_server ? _network_own_client_id : CLIENT_ID_SERVER;
for (OrderBackup *ob : OrderBackup::Iterate()) {
- /* If it's not a backup of us, ignore it. */
- if (ob->user != user) continue;
+ /* If this is a GUI action, and it's not a backup of us, ignore it. */
+ if (from_gui && ob->user != user) continue;
/* If it's not for our chosen tile either, ignore it. */
if (t != INVALID_TILE && t != ob->tile) continue;