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

Method ChildLost

Source/Objects/movementobject.cpp:4786–4802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4784}
4785
4786void MovementObject::ChildLost(Object* obj) {
4787 Online* online = Online::Instance();
4788
4789 if (rigged_object_.get()) {
4790 for (int i = 0, len = rigged_object_->children.size(); i < len; ++i) {
4791 if (rigged_object_->children[i].direct_ptr == obj) {
4792 rigged_object_->children.erase(rigged_object_->children.begin() + i);
4793 if (online->IsActive()) {
4794 online->Send<OnlineMessages::AttachToMessage>(GetID(), obj->GetID(), 0, false, false);
4795 }
4796
4797 break;
4798 }
4799 }
4800 Serialize(rigged_object_->children, env_object_attach_data);
4801 }
4802}
4803
4804RiggedObject* MovementObject::rigged_object() {
4805 return rigged_object_.get();

Callers

nothing calls this directly

Calls 7

SerializeFunction · 0.85
getMethod · 0.45
sizeMethod · 0.45
eraseMethod · 0.45
beginMethod · 0.45
IsActiveMethod · 0.45
GetIDMethod · 0.45

Tested by

no test coverage detected