Add command flag to disable shift-key estimate mode in DoCommandP
This commit is contained in:
@@ -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
|
||||
|
@@ -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
|
||||
};
|
||||
|
Reference in New Issue
Block a user