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

Method GetDesc

Source/Objects/envobject.cpp:1662–1677  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1660}
1661
1662void EnvObject::GetDesc(EntityDescription& desc) const {
1663 if (!attached_ || (attached_ && parent && parent->IsGroupDerived())) {
1664 // Save everything if part of a group
1665 Object::GetDesc(desc);
1666 } else {
1667 // Skip transform info if object is attached to character
1668 desc.AddString(EDF_NAME, GetName());
1669 desc.AddVec3(EDF_SCALE, GetScale());
1670 desc.AddEntityType(EDF_ENTITY_TYPE, GetType());
1671 desc.AddInt(EDF_ID, GetID());
1672 desc.AddScriptParams(EDF_SCRIPT_PARAMS, sp.GetParameterMap());
1673 }
1674 color_tint_component_.AddToDescription(desc);
1675 desc.AddString(EDF_FILE_PATH, obj_file);
1676 desc.AddBool(EDF_NO_NAVMESH, no_navmesh);
1677}
1678
1679MaterialRef EnvObject::GetMaterial(const vec3& pos, int* tri) {
1680 // return (*Materials::Instance()->ReturnRef(ofr->material_path));

Callers

nothing calls this directly

Calls 10

GetScaleFunction · 0.85
GetTypeFunction · 0.85
AddVec3Method · 0.80
AddEntityTypeMethod · 0.80
AddIntMethod · 0.80
AddScriptParamsMethod · 0.80
AddToDescriptionMethod · 0.80
AddBoolMethod · 0.80
IsGroupDerivedMethod · 0.45
AddStringMethod · 0.45

Tested by

no test coverage detected