------------------------------------------- CAN RIGHT CLICK POSITION -----------------------------------
| 1915 | } |
| 1916 | //------------------------------------------- CAN RIGHT CLICK POSITION ----------------------------------- |
| 1917 | static inline bool canRightClickPosition(Unit thisUnit, bool checkCommandibility) |
| 1918 | { |
| 1919 | if ( !checkCommandibility ) |
| 1920 | Broodwar->setLastError(); |
| 1921 | else if ( !canCommand(thisUnit) ) |
| 1922 | return false; |
| 1923 | |
| 1924 | if ( !thisUnit->getType().isBuilding() && !thisUnit->isInterruptible() ) |
| 1925 | return Broodwar->setLastError(Errors::Unit_Busy); |
| 1926 | if ( !canMove(thisUnit, false) && !canSetRallyPosition(thisUnit, false) ) |
| 1927 | return Broodwar->setLastError(Errors::Incompatible_State); |
| 1928 | |
| 1929 | return true; |
| 1930 | } |
| 1931 | static inline bool canRightClickPositionGrouped(Unit thisUnit, bool checkCommandibilityGrouped, bool checkCommandibility) |
| 1932 | { |
| 1933 | if ( !checkCommandibility ) |
no test coverage detected