line_align(floor|ceiling) only aligns in one dimension

Moderator: GZDoom Developers

User avatar
TOGoS
Posts: 131
Joined: Sat Nov 22, 2003 12:33 am
Location: Wisconsin

line_align(floor|ceiling) only aligns in one dimension

Post by TOGoS »

line_align(floor|ceiling) only aligns in one dimension.
Illustration:

Image

I would expect it to act as in 'how do i do this', but instead of aligning the flat *to* and *along* the line, it only aligns the flat *to* the line. I don't know if this is a bug or not, but it severely limits the usefulness of line_align(floor|ceiling), and I don't see how the current behavior is useful
User avatar
Xaser
 
 
Posts: 10771
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

This special would be most useful if it aligned to the line like requested above and also rotated the flat. (Does it do that? I have yet to try it.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48325
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?
No, they override each other. They are not cumulative.


And the code is rather obvious. It only aligns the angle and the y-offset of the texture but not the x-offset. As it is this special looks rather useless...
User avatar
HotWax
Posts: 10002
Joined: Fri Jul 18, 2003 6:18 pm
Location: Idaho Falls, ID

Post by HotWax »

Yes but any maps that use the specials might be adversely affected if this were changed. How about a new line special:

Code: Select all

line_alignvertex(int lineid, int side, int vertex, int ceiling, int floor)

lineid: The ID of the line to use.
side: 0 for sector on the front of the line, 1 for back.
vertex: 0 for the line's first vertex, 1 for the second.
ceiling/floor: 1 to align this flat to the vertex, 0 to ignore it.
This would position the corner of the specified flats to the specified vertex. Thoughts?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48325
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

HotWax wrote:Yes but any maps that use the specials might be adversely affected if this were changed. How about a new line special:

Code: Select all

line_alignvertex(int lineid, int side, int vertex, int ceiling, int floor)

lineid: The ID of the line to use.
side: 0 for sector on the front of the line, 1 for back.
vertex: 0 for the line's first vertex, 1 for the second.
ceiling/floor: 1 to align this flat to the vertex, 0 to ignore it.
This would position the corner of the specified flats to the specified vertex. Thoughts?
How about line_alignvertex(int lineid, int sector-tag, int side, int vertex, int floorceiling) ?

This way an entire group of sectors could be aligned which don't even need to touch the line. This might be extremely useful if you have large rooms with different tags for parts of it but want to align all of it to a specific line.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Heh, it took a week for anyone to tell me how to use it at all... do any maps actually use it?

I thought the reason for using a line was to define rotation and panning simultaneously, which I believe would be much more useful than align to vertex. if you're just panning it, you can use the panning already implemented. That's not that hard. Rotation and panning together would be more difficult, making a new special actually do something useful...
User avatar
TOGoS
Posts: 131
Joined: Sat Nov 22, 2003 12:33 am
Location: Wisconsin

Post by TOGoS »

Graf Zahl wrote: How about line_alignvertex(int lineid, int sector-tag, int side, int vertex, int floorceiling) ?

This way an entire group of sectors could be aligned which don't even need to touch the line. This might be extremely useful if you have large rooms with different tags for parts of it but want to align all of it to a specific line.
Well, yeah. It'd be nice to be able to specify a sector tag and align the whole thing, but OTOH the main reason I wanted to use this special was because it didn't *need* a sector tag. I could simply mark all the lines which had a sector behind them that should have their ceiling aligned with a common line id, and then i could use the sector IDs for other things, like lighting effects.

Maybe the thing to do would be to have a sector tag of 0 mean 'use the sector attached to the specified side of the line'.
HotWax wrote:but any maps that use the specials might be adversely affected if this were changed.
Well, AFAICT, it's rather unpredictable where the flat will be lined up x-wise, anyway (after rotation and all), so it probably wouldn't break much, if anything, while making these specials specify x-wise panning would make them about 10x as useful. So I say go ahead and change the existing specials to align the flat's corner to the appropriate vertex.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48325
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

TOGoS wrote: Maybe the thing to do would be to have a sector tag of 0 mean 'use the sector attached to the specified side of the line'.

Of course. Like most other specials this would be a logical extension of the definition.
User avatar
Xaser
 
 
Posts: 10771
Joined: Sun Jul 20, 2003 12:15 pm

Post by Xaser »

Graf Zahl wrote:
Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?
No, they override each other. They are not cumulative.
Well, that's pretty stupid. Maybe this could be fixed?
User avatar
Eevee
Posts: 592
Joined: Wed Jul 16, 2003 5:26 am

Post by Eevee »

As a side note: try using Line_Align* with a sector that has a scroll type... interesting result.
User avatar
Risen
Posts: 5263
Joined: Thu Jan 08, 2004 1:02 pm
Location: N44°30' W073°05'

Post by Risen »

Xaser wrote:
Graf Zahl wrote:
Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?
No, they override each other. They are not cumulative.
Well, that's pretty stupid. Maybe this could be fixed?
That part makes sense. To me, it's the original behavior that doesn't.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 48325
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Post by Graf Zahl »

Xaser wrote:
Graf Zahl wrote:
Xaser wrote:Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?
No, they override each other. They are not cumulative.
Well, that's pretty stupid. Maybe this could be fixed?

It's the same as colors. Setting red first and blue second isn't cumulative either. On static init linedefs it would make sense to be but not on ones that can be called during the game.

Return to “Closed Feature Suggestions [GZDoom]”