MCPcopy Index your code
hub / github.com/assaultcube/AC / getmapmodelattributes

Function getmapmodelattributes

source/src/rendermodel.cpp:430–446  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430void getmapmodelattributes(char *name, char *attr)
431{
432 const char *res = NULL;
433 mapmodelattributes **ap = mdlregistry.access(name), *a = ap ? *ap : NULL;
434 if(a)
435 {
436 int i = getlistindex(attr, mdlattrnames, true, MMA_NUM);
437 if(i < MMA_NUM) res = a->n[i];
438 else
439 {
440 string s = "";
441 loopi(MMA_NUM) if(a->n[i]) concatformatstring(s, " %s:\"%s\"", mdlattrnames[i], a->n[i]);
442 conoutf("%s:%s", a->name, *s ? s : " <no attributes set>");
443 }
444 }
445 result(res ? res : "");
446}
447COMMAND(getmapmodelattributes, "ss");
448
449void updatemapmodeldependencies()

Callers

nothing calls this directly

Calls 6

getlistindexFunction · 0.85
concatformatstringFunction · 0.85
resultFunction · 0.85
accessMethod · 0.80
loopiFunction · 0.70
conoutfFunction · 0.70

Tested by

no test coverage detected