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

Method onSendText

bwapi/BWAPI/Source/BWAPI/GameEvents.cpp:294–308  ·  view source on GitHub ↗

---------------------------------------------- ON SEND TEXT ----------------------------------------------

Source from the content-addressed store, hash-verified

292 }
293 //---------------------------------------------- ON SEND TEXT ----------------------------------------------
294 void GameImpl::onSendText(const std::string &text)
295 {
296 if ( text.empty() ) return;
297
298 if ( !parseText(text) )
299 {
300 if ( externalModuleConnected )
301 {
302 events.push_back(Event::SendText());
303 events.back().setText(text.c_str());
304 }
305 else if( isFlagEnabled(BWAPI::Flag::UserInput) )
306 sendText("%s", text.c_str());
307 }
308 }
309 //---------------------------------------------- ON RECV TEXT ----------------------------------------------
310 void GameImpl::onReceiveText(int playerId, const std::string &text)
311 {

Callers 2

updateMethod · 0.45
SendClientEventMethod · 0.45

Calls 2

setTextMethod · 0.80
c_strMethod · 0.80

Tested by

no test coverage detected