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

Method execute

bwapi/BWScriptEmulator/Create_Unit.cpp:9–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7Create_Unit create_unit_impl(AISCRIPT::Enum::CREATE_UNIT);
8
9bool Create_Unit::execute(aithread &thread) const
10{
11 if ( this->getOpcode() == Enum::CREATE_NUKE )
12 {
13 // Do nothing/Debug (Can't be emulated)
14 thread.saveDebug(Text::Green, this->getOpcode());
15 }
16 else if ( this->getOpcode() == Enum::CREATE_UNIT )
17 {
18 // Params
19 WORD wUnitType, x, y;
20 thread.readTuple( std::tie(wUnitType, x, y) );
21
22 // Do nothing/Debug (Can't be emulated)
23 thread.saveDebug(Text::Green, this->getOpcode(), "%s %u %u", AISCRIPT::getUnitName(wUnitType), x, y);
24 }
25
26 return true;
27}

Callers

nothing calls this directly

Calls 4

getUnitNameFunction · 0.85
getOpcodeMethod · 0.80
saveDebugMethod · 0.80
readTupleMethod · 0.45

Tested by

no test coverage detected