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

Function _SNetReceiveMessage

bwapi/BWAPI/Source/Detours.cpp:373–382  ·  view source on GitHub ↗

----------------------------------------------- RECEIVE TEXT -----------------------------------------------

Source from the content-addressed store, hash-verified

371
372//----------------------------------------------- RECEIVE TEXT -----------------------------------------------
373BOOL __stdcall _SNetReceiveMessage(int *senderplayerid, char **data, int *databytes)
374{
375 auto SNetReceiveMessageProc = _SNetReceiveMessageOld ? _SNetReceiveMessageOld : &SNetReceiveMessage;
376 BOOL rval = SNetReceiveMessageProc(senderplayerid, data, databytes);
377
378 if ( rval && *databytes > 2 && (*data)[0] == 0)
379 BWAPI::BroodwarImpl.onReceiveText(*senderplayerid, std::string((char*)&(*data)[2]) );
380
381 return rval;
382}
383
384//----------------------------------------------- DRAW HOOK --------------------------------------------------
385void __stdcall DrawHook(BW::Bitmap *pSurface, BW::bounds *pBounds)

Callers

nothing calls this directly

Calls 1

onReceiveTextMethod · 0.45

Tested by

no test coverage detected