mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-07-17 19:56:38 -04:00
fixed sometimes basenode cannot be drawn correctly. (e.g. allied infantry barracks) .
This commit is contained in:
parent
204bdf0ea3
commit
2a9edd868c
2 changed files with 12 additions and 6 deletions
|
@ -5585,14 +5585,21 @@ void CIsoView::DrawMap()
|
|||
}
|
||||
|
||||
|
||||
if (m.node.type > -1) {
|
||||
if (m.node.type >= 0) {
|
||||
last_succeeded_operation = 10102;
|
||||
|
||||
CString house = m.node.house;
|
||||
CString tmp;
|
||||
|
||||
if (Map->GetNodeAt(mapCoords + MapVec(1, 0), tmp) != m.node.index && Map->GetNodeAt(mapCoords + MapVec(0, 1), tmp) != m.node.index) {
|
||||
const auto drawCoordsBld = GetRenderTargetCoordinates(mapCoords - MapVec(buildinginfo[m.node.type].h - 1, buildinginfo[m.node.type].w - 1));
|
||||
bool shouldDraw = true;
|
||||
auto const leftNodeIdx = Map->GetNodeAt(mapCoords + MapVec(-1, 0), tmp);
|
||||
auto const rightNodeIdx = Map->GetNodeAt(mapCoords + MapVec(0, -1), tmp);
|
||||
if (leftNodeIdx == m.node.index || rightNodeIdx == m.node.index) {
|
||||
shouldDraw = false;
|
||||
}
|
||||
|
||||
if (shouldDraw) {
|
||||
const auto drawCoordsBld = GetRenderTargetCoordinates(mapCoords);
|
||||
|
||||
COLORREF c;
|
||||
c = GetColor(house);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue