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

Function SetDescID

Source/XML/level_loader.cpp:285–293  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

283}
284
285static void SetDescID(EntityDescription* desc, int id) {
286 EntityDescriptionField* edf = desc->GetEditableField(EDF_ID);
287 if (edf) {
288 edf->data.clear();
289 edf->WriteInt(id);
290 } else {
291 LOGE << "EDF_ID object returned is NULL, unexpected behaviour" << std::endl;
292 }
293}
294
295static void FixDuplicateIDs(EntityDescriptionList* desc_list, bool has_terrain) {
296 std::vector<IDAndType> id_used;

Callers 1

FixDuplicateIDsFunction · 0.85

Calls 3

GetEditableFieldMethod · 0.80
clearMethod · 0.45
WriteIntMethod · 0.45

Tested by

no test coverage detected