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

Function edittextureslot

source/src/texture.cpp:1085–1101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1083COMMAND(deletetextureslot, "iss");
1084
1085void edittextureslot(int *n, char *scale, char *name) // edit slot parameters != ""
1086{
1087 string res = "";
1088 if(slots.inrange(*n))
1089 {
1090 Slot &s = slots[*n];
1091 if((*scale || *name) && !noteditmode("edittextureslot") && !multiplayer("edittextureslot"))
1092 { // change attributes
1093 float newscale = atof(scale);
1094 _texture(s, *scale ? &newscale : NULL, *name ? name : NULL);
1095 unsavededits++;
1096 hdr.flags |= MHF_AUTOMAPCONFIG; // requires automapcfg
1097 }
1098 formatstring(res)("%s \"%s\"", floatstr(s.orgscale, true), s.name);
1099 }
1100 result(res);
1101}
1102COMMAND(edittextureslot, "iss");
1103
1104void gettextureorigin(char *fname)

Callers

nothing calls this directly

Calls 6

noteditmodeFunction · 0.85
multiplayerFunction · 0.85
_textureFunction · 0.85
floatstrFunction · 0.85
resultFunction · 0.85
inrangeMethod · 0.80

Tested by

no test coverage detected