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

Method onFrame

bwapi/BWScriptEmulator/BWScriptEmulator.cpp:66–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

64}
65
66void BWScriptEmulator::onFrame()
67{
68 if ( bw->isReplay() )
69 return;
70
71 UpdateScripts();
72
73 Unitset myUnits( self->getUnits() );
74 for ( auto u : myUnits)
75 {
76 if ( !u->exists() ) continue;
77
78 UnitWrap uw = u;
79 uw.EmulateOrder();
80
81 Broodwar->drawTextMap(u->getPosition(), " %s", Order(uw.GetUnitOrder()).c_str() );
82 }
83
84 Unitset allUnits( Broodwar->getAllUnits() );
85 for ( auto u : allUnits)
86 Broodwar->drawTextMap(u->getPosition(), "\n %s", u->getOrder().c_str());
87
88}
89
90void BWScriptEmulator::onSendText(std::string text)
91{

Callers

nothing calls this directly

Calls 11

UpdateScriptsFunction · 0.85
EmulateOrderMethod · 0.80
drawTextMapMethod · 0.80
c_strMethod · 0.80
GetUnitOrderMethod · 0.80
OrderEnum · 0.50
isReplayMethod · 0.45
getUnitsMethod · 0.45
existsMethod · 0.45
getPositionMethod · 0.45
getOrderMethod · 0.45

Tested by

no test coverage detected