File diff r25580:d0577e21a282 → r25581:5936e883c43f
src/order_backup.cpp
Show inline comments
 
@@ -189,25 +189,25 @@ CommandCost CmdClearOrderBackup(TileInde
 
	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 it's not for our chosen tile either, ignore it. */
 
		if (t != INVALID_TILE && t != ob->tile) continue;
 

	
 
		if (from_gui) {
 
			/* 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, user, CMD_CLEAR_ORDER_BACKUP, nullptr, nullptr, true, false);
 
			DoCommandPInternal(ob->tile, 0, user, CMD_CLEAR_ORDER_BACKUP, nullptr, {}, 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. */
 
			delete ob;
 
		}
 
	}
 
}
 

	
 
/**
 
 * Clear the group of all backups having this group ID.
 
 * @param group The group to clear.
 
 */