mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-01-18 07:02:03 +00:00
- fixed: P_AlignFlat had the 'dist' value negated. Also simplified the code a bit.
This commit is contained in:
parent
f8c12f4533
commit
43d93a19a0
1 changed files with 2 additions and 4 deletions
|
@ -1126,11 +1126,9 @@ bool P_AlignFlat (int linenum, int side, int fc)
|
|||
if (!sec)
|
||||
return false;
|
||||
|
||||
DVector2 pos = line->v1->fPos();
|
||||
DVector2 pos2 = line->v2->fPos();
|
||||
DAngle angle = (pos2 - pos).Angle();
|
||||
DAngle angle = line->Delta().Angle();
|
||||
DAngle norm = angle - 90;
|
||||
double dist = norm.Cos() * pos.X + norm.Sin() * pos.Y;
|
||||
double dist = -(norm.Cos() * line->v1->fX() + norm.Sin() * line->v1->fY());
|
||||
|
||||
if (side)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue