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

Method SendScriptMessageToAllObjects

Source/Main/scenegraph.cpp:1640–1651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1638}
1639
1640void SceneGraph::SendScriptMessageToAllObjects(std::string& msg) {
1641 // For consistency, I'm going to also make this a simple loop in case the same iterator problems affect
1642 // This function as well.
1643 for (unsigned int i = 0; i < objects_.size(); i++) {
1644 Object* obj = objects_[i];
1645 if (obj) {
1646 obj->ReceiveObjectMessage(OBJECT_MSG::SCRIPT, &msg);
1647 } else {
1648 LOGE << "One of the objects is NULL when trying to SendScriptMessageToAllObjects." << std::endl;
1649 }
1650 }
1651}
1652
1653std::vector<MovementObject*> SceneGraph::GetControlledMovementObjects() {
1654 std::vector<MovementObject*> controlled_objects;

Callers 2

DrawImGuiFunction · 0.80
ASSendGlobalMessageFunction · 0.80

Calls 2

sizeMethod · 0.45
ReceiveObjectMessageMethod · 0.45

Tested by

no test coverage detected