MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / ASSendGlobalMessage

Function ASSendGlobalMessage

Source/Scripting/angelscript/asfuncs.cpp:5592–5604  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5590}
5591
5592static void ASSendGlobalMessage(std::string msg) {
5593 SceneGraph* s = Engine::Instance()->GetSceneGraph();
5594 if (s) {
5595 s->SendScriptMessageToAllObjects(msg);
5596 s->level->Message(msg);
5597 }
5598
5599 ScriptableCampaign* sc = Engine::Instance()->GetCurrentCampaign();
5600
5601 if (sc) {
5602 sc->ReceiveMessage(msg);
5603 }
5604}
5605
5606void AttachMessages(ASContext* context) {
5607 context->RegisterGlobalFunction("void SendMessage(int target, int type, vec3 vec_a, vec3 vec_b)", asFUNCTION(ASSendMessage), asCALL_CDECL);

Callers

nothing calls this directly

Calls 5

GetCurrentCampaignMethod · 0.80
GetSceneGraphMethod · 0.45
MessageMethod · 0.45
ReceiveMessageMethod · 0.45

Tested by

no test coverage detected