Page 1 of 1

Extend 55: Line_SetBlocking

PostPosted: Fri Apr 20, 2018 12:06 pm
by XxMiltenXx
There is currently no way to alter other flags than the "Blocking flags" for lines via a line action (at least I couldn't find one for UDMF). So I hereby request this:

1. Extend 55: Line_SetBlocking to be able to alter some other line flags. I am especially interested in "ML_DONTDRAW" and "ML_SECRET". Others could be included as well, as long as they aren't "harmful" to the map (e.g. "ML_TWOSIDED" should be excluded).
The action function could then be renamed to 55: Line_SetFlags

2. Alternatively a new action function could be made which can alter the other flags but not the blocking ones. But considering that "Line_SetBlocking" already exists, this seems a little redundant to me.

In case of DIY. I was able to achieve this via the WorldLineActivated Event by checking for an activated Line that has action 55 and to be sure it doesn't edit wrong lines with that action, I set the 3rd unused argument of Line_SetBlocking to 1, however this is a little bit "hacky" and I'd like to have an official/better way.

Re: Extend 55: Line_SetBlocking

PostPosted: Sun Apr 22, 2018 1:12 pm
by Graf Zahl
The function is called "Line_SetBlocking", not "Line_SetFlags, so 1 is out.

Re: Extend 55: Line_SetBlocking

PostPosted: Mon Apr 23, 2018 9:15 am
by XxMiltenXx
Yeah, I thought so already, was just a suggestion.

Maybe a new Action could be made then instead.

Re: Extend 55: Line_SetBlocking

PostPosted: Thu May 03, 2018 1:51 pm
by Matt
A Line_SetFlags could be interesting. (And it seems like the sort of map thing that should be ACS territory and thus not a case of WFDSDIY)

Re: Extend 55: Line_SetBlocking

PostPosted: Thu May 17, 2018 1:21 am
by RockstarRaccoon
I think at this point line_setFlags would be a very welcome feature.

Re: Extend 55: Line_SetBlocking

PostPosted: Wed May 23, 2018 12:18 am
by RockstarRaccoon
So, I noticed that Line_SetBlocking uses some interesting code to translate user input into a different set of values.

Is there any reason other than it's a function which corners off the other flags? Would this be acceptable for another line special?
Code: Select allExpand view
// Line_SetFlags (id, setflags, clearflags)
   FLineIdIterator itr(arg0);
   int line;
   while ((line = itr.Next()) >= 0)
      level.lines[line].flags = (level.lines[line].flags & ~arg2) | arg1;

   return true;

Edit: If it's accepable...