add command and keybind for tag clips

edittagclip type

  Sets tag clip type of all selected cubes.

  type can be numeric 0, 64 or 128 or keyword "none", "clip", or "plclip"

DOCREF edittagclip
This commit is contained in:
ac-stef
2016-08-26 16:45:37 +02:00
parent b7d797d73c
commit fdb683e406
4 changed files with 24 additions and 1 deletions
+11
View File
@@ -976,6 +976,17 @@ void edittag(int *tag)
}
COMMAND(edittag, "i");
void edittagclip(char *tag)
{
int nt = ((int) strtol(tag, NULL, 0)) & TAGANYCLIP;
if(tolower(*tag) == 'n') nt = 0; // "none", "nil, "nop"
else if(!strncasecmp(tag, "pl", 2)) nt = TAGPLCLIP; // "playerclip", "plclip", "pl"
else if(isalpha(*tag)) nt = TAGCLIP; // "clip", "all", "full", "hippo"
EDITSELMP;
loopselsxy(s->tag = (s->tag & TAGTRIGGERMASK) | nt);
}
COMMAND(edittagclip, "s");
void newent(char *what, float *a1, float *a2, float *a3, float *a4)
{
EDITSEL;