| 1012 | } |
| 1013 | |
| 1014 | void textureslotusage(int *n) // returns all mapmodel entity indices that use a certain texture to skin the model |
| 1015 | // if the texture is used in map geometry, at least a space is returned |
| 1016 | // if the texture is unused, an empty string is returned |
| 1017 | { |
| 1018 | string res = ""; |
| 1019 | loopv(ents) if(ents[i].type == MAPMODEL && ents[i].attr4 == *n) concatformatstring(res, "%s%d", i ? " " : "", i); |
| 1020 | if(!*res) |
| 1021 | { // not used to skin a mapmodel: check world usage... |
| 1022 | if(testworldtexusage(*n)) copystring(res, " "); |
| 1023 | } |
| 1024 | result(res); |
| 1025 | } |
| 1026 | COMMAND(textureslotusage, "i"); |
| 1027 | |
| 1028 | void deletetextureslot(int *n, char *opt, char *_replace) // delete texture slot - only if unused or "purge" is specified |
nothing calls this directly
no test coverage detected