GetLineX/GetLineY Implementation

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 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: GetLineX/GetLineY Implementation

Re: GetLineX/GetLineY Implementation

by Graf Zahl » Sun Oct 20, 2019 6:31 am

fixed.

GetLineX/GetLineY Implementation

by Rip and Tear » Mon Oct 07, 2019 3:09 pm

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.

Top