MCPcopy Create free account
hub / github.com/assaultcube/AC / mapmodelslotusage

Function mapmodelslotusage

source/src/rendermodel.cpp:161–166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

159});
160
161void mapmodelslotusage(int *n) // returns all entity indices that contain a mapmodel of slot n
162{
163 string res = "";
164 loopv(ents) if(ents[i].type == MAPMODEL && ents[i].attr2 == *n) concatformatstring(res, "%s%d", i ? " " : "", i);
165 result(*res ? res : (mapmodels.inrange(*n) && (mapmodels[*n].flags & MMF_REQUIRED) ? " " : res));
166}
167COMMAND(mapmodelslotusage, "i");
168
169void deletemapmodelslot(int *n, char *opt) // delete mapmodel slot - only if unused or "purge" is specified

Callers

nothing calls this directly

Calls 4

concatformatstringFunction · 0.85
resultFunction · 0.85
inrangeMethod · 0.80
loopvFunction · 0.70

Tested by

no test coverage detected