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

Method GetDesc

Source/Objects/group.cpp:127–140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

125}
126
127void Group::GetDesc(EntityDescription& desc) const {
128 Object::GetDesc(desc);
129 desc.AddInt(EDF_VERSION, 1);
130 for (const auto& i : children) {
131 Object* obj = i.direct_ptr;
132 if (obj) {
133 if (obj == this) {
134 FatalError("Error", "Group %d: GetDesc() including copy of itself", GetID());
135 }
136 desc.children.resize(desc.children.size() + 1);
137 obj->GetDesc(desc.children.back());
138 }
139 }
140}
141
142void Group::InitRelMats() {
143 for (auto& i : children) {

Callers 3

SavePrefabMethod · 0.45
DuplicateObjectMethod · 0.45

Calls 5

AddIntMethod · 0.80
FatalErrorFunction · 0.50
resizeMethod · 0.45
sizeMethod · 0.45
backMethod · 0.45

Tested by

no test coverage detected