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

Method execute

bwapi/BWScriptEmulator/Time_Jump.cpp:8–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6IMPLEMENT(Time_Jump);
7
8bool Time_Jump::execute(aithread &thread) const
9{
10 // Retrieve parameters
11 BYTE bTime;
12 WORD wOffset;
13 thread.readTuple( std::tie(bTime, wOffset) );
14
15 /// Set the new script offset
16 if ( Broodwar->elapsedTime() >= (bTime * 60) )
17 thread.setScriptOffset( wOffset );
18
19 // Save debug info and return
20 thread.saveDebug(Text::Green, this->getOpcode(), "%u p_%04X", bTime, wOffset);
21 return true;
22}

Callers

nothing calls this directly

Calls 5

setScriptOffsetMethod · 0.80
saveDebugMethod · 0.80
getOpcodeMethod · 0.80
readTupleMethod · 0.45
elapsedTimeMethod · 0.45

Tested by

no test coverage detected