Make the firelines fudging more "streamlined"

This commit is contained in:
Randy Heit 2016-04-06 20:09:12 -05:00
parent 3923039a1b
commit 4b10177e46
2 changed files with 8 additions and 7 deletions

View file

@ -1320,19 +1320,15 @@ void P_LoadSegs (MapData * map)
if (delta_angle >= 1.)
{
double dis = (li->v2->fPos() - li->v1->fPos()).Length();
DVector2 delta = seg_angle.ToVector();
DVector2 delta = seg_angle.ToVector(dis);
if ((vnum2 > vnum1) && (vertchanged[vnum2] == 0))
{
li->v2->set(
li->v1->fX() + dis * delta.X,
li->v1->fY() + dis * delta.Y);
li->v2->set(li->v1->fPos() + delta);
vertchanged[vnum2] = 1; // this was changed
}
else if (vertchanged[vnum1] == 0)
{
li->v1->set(
li->v2->fX() - dis * delta.X,
li->v2->fY() - dis * delta.Y);
li->v1->set(li->v2->fPos() - delta);
vertchanged[vnum1] = 1; // this was changed
}
}

View file

@ -118,6 +118,11 @@ public:
p.Y = y;
}
void set(const DVector2 &pos)
{
p = pos;
}
double fX() const
{
return p.X;