Extend 55: Line_SetBlocking

Remember, just because you request it, that doesn't mean you'll get it.

Moderator: Developers

Extend 55: Line_SetBlocking

Postby XxMiltenXx » Fri Apr 20, 2018 12:06 pm

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.
XxMiltenXx
 
Joined: 08 Jan 2014

Re: Extend 55: Line_SetBlocking

Postby Graf Zahl » Sun Apr 22, 2018 1:12 pm

The function is called "Line_SetBlocking", not "Line_SetFlags, so 1 is out.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: Extend 55: Line_SetBlocking

Postby XxMiltenXx » Mon Apr 23, 2018 9:15 am

Yeah, I thought so already, was just a suggestion.

Maybe a new Action could be made then instead.
XxMiltenXx
 
Joined: 08 Jan 2014

Re: Extend 55: Line_SetBlocking

Postby Matt » Thu May 03, 2018 1:51 pm

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)
User avatar
Matt
Putting the XD into *xdeath since 2007
 
Joined: 04 Jan 2004
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia

Re: Extend 55: Line_SetBlocking

Postby RockstarRaccoon » Thu May 17, 2018 1:21 am

I think at this point line_setFlags would be a very welcome feature.
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016

Re: Extend 55: Line_SetBlocking

Postby RockstarRaccoon » Wed May 23, 2018 12:18 am

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
FUNC(LS_Line_SetFlags)
// 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...
https://github.com/coelckers/gzdoom/pull/487
User avatar
RockstarRaccoon
Totally Babies
 
Joined: 31 Jul 2016


Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 1 guest