Add command flag to disable shift-key estimate mode in DoCommandP

This commit is contained in:
Jonathan G Rennison
2022-09-14 21:42:39 +01:00
parent ece0a43146
commit 5cb6d2240a
2 changed files with 2 additions and 0 deletions

View File

@@ -881,6 +881,7 @@ bool DoCommandPEx(TileIndex tile, uint32 p1, uint32 p2, uint64 p3, uint32 cmd, C
bool estimate_only = _shift_pressed && IsLocalCompany() &&
!_generating_world &&
!(cmd & CMD_NETWORK_COMMAND) &&
!(cmd & CMD_NO_SHIFT_ESTIMATE) &&
!(GetCommandFlags(cmd) & CMD_NO_EST);
/* We're only sending the command, so don't do

View File

@@ -510,6 +510,7 @@ DECLARE_ENUM_AS_BIT_SET(DoCommandFlag)
*/
enum FlaggedCommands {
CMD_NETWORK_COMMAND = 0x0100, ///< execute the command without sending it on the network
CMD_NO_SHIFT_ESTIMATE = 0x0200, ///< do not check shift key state for whether to estimate command
CMD_FLAGS_MASK = 0xFF00, ///< mask for all command flags
CMD_ID_MASK = 0x00FF, ///< mask for the command ID
};