Fixed rally line attachment point for circular buildings (refs #1172)
This was SVN commit r11106.
This commit is contained in:
parent
73d19555fc
commit
590228804e
@ -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
|
// 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));
|
CVector2D centerVec2D(center.X.ToFloat(), center.Y.ToFloat());
|
||||||
radiusEdgePoint.Normalize(footprintSize1);
|
CVector2D centerToLast(coords.back() - centerVec2D);
|
||||||
CVector2D footprintEdge((center.X + radiusEdgePoint.X).ToFloat(), (center.Y + radiusEdgePoint.Y).ToFloat());
|
coords.push_back(centerVec2D + (centerToLast.Normalized() * footprintSize0.ToFloat()));
|
||||||
coords.push_back(footprintEdge);
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user