1
0
forked from 0ad/0ad

Fixed rally line attachment point for circular buildings (refs #1172)

This was SVN commit r11106.
This commit is contained in:
vts 2012-02-20 00:13:46 +00:00
parent 73d19555fc
commit 590228804e

View File

@ -812,10 +812,9 @@ void CCmpRallyPointRenderer::FixFootprintWaypoints(std::vector<CVector2D>& coord
}
// add a point right on the edge of the footprint so that it links up nicely with the rest of the path
CFixedVector2D radiusEdgePoint(fixed::FromFloat(coords.back().X), fixed::FromFloat(coords.back().Y));
radiusEdgePoint.Normalize(footprintSize1);
CVector2D footprintEdge((center.X + radiusEdgePoint.X).ToFloat(), (center.Y + radiusEdgePoint.Y).ToFloat());
coords.push_back(footprintEdge);
CVector2D centerVec2D(center.X.ToFloat(), center.Y.ToFloat());
CVector2D centerToLast(coords.back() - centerVec2D);
coords.push_back(centerVec2D + (centerToLast.Normalized() * footprintSize0.ToFloat()));
}
break;
}