GetLineX/GetLineY Implementation

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Rip and Tear
Posts: 186
Joined: Tue May 02, 2017 3:54 pm

GetLineX/GetLineY Implementation

Post by Rip and Tear »

GetLineX/GetLineY are ACS functions that were added to GZDoom based on their implementation in the Eternity engine (thread). However, the behavior in GZDoom is different than in Eternity, seemingly by mistake. Here's the the method signatures.

Code: Select all

fixed GetLineX(int lineID, fixed ratioAlongLine, fixed distanceFromLine)
fixed GetLineY(int lineID, fixed ratioAlongLine, fixed distanceFromLine)
The Eternity Engine implementations of these functions return absolute coordinates in the world, which seems to be to be the intended behavior.

In the GZDoom implementation, the functions return a position relative to the line's first vertex. Essentially, this means that calling GetLineX/GetLineY with ratioAlongLine = 0 will always return zero.

Comparing the two implementations, you can see that Eternity adds the delta to the position of the line's vertex, while GZDoom does not. This seems to be an oversight, and should be corrected.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49225
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: GetLineX/GetLineY Implementation

Post by Graf Zahl »

fixed.
Post Reply

Return to “Closed Bugs [GZDoom]”