MCPcopy Create free account
hub / github.com/bwapi/bwapi / canRightClickPosition

Function canRightClickPosition

bwapi/Shared/Templates.h:1917–1930  ·  view source on GitHub ↗

------------------------------------------- CAN RIGHT CLICK POSITION -----------------------------------

Source from the content-addressed store, hash-verified

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 )

Callers 3

canRightClickFunction · 0.85
canIssueCommandTypeFunction · 0.85
canRightClickPositionMethod · 0.85

Calls 7

canCommandFunction · 0.85
canMoveFunction · 0.85
canSetRallyPositionFunction · 0.85
setLastErrorMethod · 0.80
isBuildingMethod · 0.80
isInterruptibleMethod · 0.80
getTypeMethod · 0.45

Tested by

no test coverage detected