line_align(floor|ceiling) only aligns in one dimension

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 OFF
Smilies are ON

Topic review
   

Expand view Topic review: line_align(floor|ceiling) only aligns in one dimension

by Graf Zahl » Mon Feb 16, 2004 5:33 pm

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.

by Risen » Mon Feb 16, 2004 5:28 pm

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.

by Eevee » Mon Feb 16, 2004 5:20 pm

As a side note: try using Line_Align* with a sector that has a scroll type... interesting result.

by Xaser » Mon Feb 16, 2004 3:36 pm

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?

by Graf Zahl » Mon Feb 16, 2004 4:22 am

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.

by TOGoS » Mon Feb 16, 2004 3:04 am

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.

by Risen » Sun Feb 15, 2004 1:46 pm

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...

by Graf Zahl » Sun Feb 15, 2004 1:33 pm

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.

by HotWax » Sun Feb 15, 2004 1:16 pm

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?

by Graf Zahl » Sun Feb 15, 2004 10:00 am

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...

by Risen » Sun Feb 15, 2004 9:29 am

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.)

by Xaser » Sun Feb 15, 2004 8:56 am

Why can't you just put another line_alignceiling special on the left line of the sector? Wouldn't that work?

line_align(floor|ceiling) only aligns in one dimension

by TOGoS » Sun Feb 15, 2004 3:01 am

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

Top