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

Method refreshSelectionStates

bwapi/BWAPI/Source/BWAPI/GameInternals.cpp:80–97  ·  view source on GitHub ↗

---------------------------------------- REFRESH SELECTION STATES ----------------------------------------

Source from the content-addressed store, hash-verified

78 }
79 //---------------------------------------- REFRESH SELECTION STATES ----------------------------------------
80 void GameImpl::refreshSelectionStates()
81 {
82 for (UnitImpl* u : unitArray)
83 {
84 if (u) u->setSelected(false);
85 }
86
87 selectedUnitSet.clear();
88 for (int i = 0; i < BW::BWDATA::ClientSelectionCount && i < BW::MAX_SELECTION_COUNT; ++i)
89 {
90 BWAPI::UnitImpl *u = UnitImpl::BWUnitToBWAPIUnit(BW::BWDATA::ClientSelectionGroup[i]);
91 if (u)
92 {
93 u->setSelected(true);
94 selectedUnitSet.insert(u);
95 }
96 }
97 }
98 void GameImpl::dropPlayers()
99 {
100 for ( int i = 0; i < BW::PLAYABLE_PLAYER_COUNT; ++i )

Callers

nothing calls this directly

Calls 2

setSelectedMethod · 0.80
clearMethod · 0.45

Tested by

no test coverage detected