Extend 55: Line_SetBlocking

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

Moderator: GZDoom Developers

XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

Extend 55: Line_SetBlocking

Post 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.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Extend 55: Line_SetBlocking

Post by Graf Zahl »

The function is called "Line_SetBlocking", not "Line_SetFlags, so 1 is out.
XxMiltenXx
Posts: 219
Joined: Wed Jan 08, 2014 8:40 am
Graphics Processor: nVidia with Vulkan support
Location: Germany

Re: Extend 55: Line_SetBlocking

Post by XxMiltenXx »

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

Maybe a new Action could be made then instead.
User avatar
Matt
Posts: 9696
Joined: Sun Jan 04, 2004 5:37 pm
Preferred Pronouns: They/Them
Operating System Version (Optional): Debian Bullseye
Location: Gotham City SAR, Wyld-Lands of the Lotus People, Dominionist PetroConfederacy of Saudi Canadia
Contact:

Re: Extend 55: Line_SetBlocking

Post 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)
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Extend 55: Line_SetBlocking

Post by RockstarRaccoon »

I think at this point line_setFlags would be a very welcome feature.
User avatar
RockstarRaccoon
Posts: 598
Joined: Sun Jul 31, 2016 2:43 pm

Re: Extend 55: Line_SetBlocking

Post 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 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
Post Reply

Return to “Feature Suggestions [GZDoom]”