(svn r6304) -Codechange r6295: Use !! instead of (bool) in commands to send vehicles to depots

This commit is contained in:
bjarni
2006-09-02 09:35:03 +00:00
parent 609ffadf70
commit 14e8615cf2
4 changed files with 4 additions and 4 deletions

View File

@@ -1020,7 +1020,7 @@ int32 CmdSendShipToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
/* If the current orders are already goto-depot */
if (v->current_order.type == OT_GOTO_DEPOT) {
if ((p2 & DEPOT_SERVICE) == (bool)HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
if (!!(p2 & DEPOT_SERVICE) == HASBIT(v->current_order.flags, OFB_HALT_IN_DEPOT)) {
/* We called with a different DEPOT_SERVICE setting.
* Now we change the setting to apply the new one and let the vehicle head for the same depot.
* Note: the if is (true for requesting service == true for ordered to stop in depot) */