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

Method die

bwapi/BWAPI/Source/BWAPI/UnitImpl.cpp:144–165  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142 }
143
144 void UnitImpl::die()
145 {
146 index = 0xFFFF;
147 userSelected = false;
148 isAlive = false;
149 wasAlive = false;
150 wasCompleted = false;
151 wasAccessible = false;
152 wasVisible = false;
153 nukeDetected = false;
154 lastType = UnitTypes::Unknown;
155 lastPlayer = nullptr;
156 this->clientInfo.clear();
157 this->interfaceEvents.clear();
158
159 updateInternalData();
160
161 //set pointers to null so we don't read information from unit table anymore
162 getOriginalRawData = nullptr;
163
164 updateData();
165 }
166
167 /* canAccess returns true if the AI module is allowed to access the unit.
168 If the unit is visible, returns true.

Callers 1

updateMethod · 0.80

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected