Extend 55: Line_SetBlocking

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Extend 55: Line_SetBlocking

Re: Extend 55: Line_SetBlocking

by RockstarRaccoon » Tue May 22, 2018 11:18 pm

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 all

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

Re: Extend 55: Line_SetBlocking

by RockstarRaccoon » Thu May 17, 2018 12:21 am

I think at this point line_setFlags would be a very welcome feature.

Re: Extend 55: Line_SetBlocking

by Matt » Thu May 03, 2018 12: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)

Re: Extend 55: Line_SetBlocking

by XxMiltenXx » Mon Apr 23, 2018 8:15 am

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

Maybe a new Action could be made then instead.

Re: Extend 55: Line_SetBlocking

by Graf Zahl » Sun Apr 22, 2018 12:12 pm

The function is called "Line_SetBlocking", not "Line_SetFlags, so 1 is out.

Extend 55: Line_SetBlocking

by XxMiltenXx » Fri Apr 20, 2018 11:06 am

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.

Top