Changeset - r16682:c4afe0af8523
[Not reviewed]
master
0 1 0
rubidium - 13 years ago 2010-12-07 20:45:11
rubidium@openttd.org
(svn r21424) -Fix: CMD_CLEAR_ORDER_BACKUP might not get executed when the user pressed the shift key
1 file changed with 4 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/order_backup.cpp
Show inline comments
 
@@ -165,7 +165,10 @@ CommandCost CmdClearOrderBackup(TileInde
 
		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. */
0 comments (0 inline, 0 general)