mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 09:01:41 -04:00
parent
34a09e9aca
commit
462cd5bf77
2 changed files with 16 additions and 2 deletions
|
@ -5453,7 +5453,18 @@ void CIsoView::DrawMap()
|
|||
|
||||
// for structures we need to check if they weren´t drawn earlier
|
||||
// (every field that this building achieves has this building as .structure)
|
||||
if (Map->GetStructureAt(mapCoords - MapVec(-1, 0)) != m.structure && Map->GetStructureAt(mapCoords - MapVec(0, -1)) != m.structure) {
|
||||
auto const leftStructureIdx = Map->GetStructureAt(mapCoords - MapVec(-1, 0));
|
||||
auto const rightStructureIdx = Map->GetStructureAt(mapCoords - MapVec(0, -1));
|
||||
bool shouldDraw = true;
|
||||
|
||||
if (leftStructureIdx == m.structure || rightStructureIdx == m.structure) {
|
||||
shouldDraw = false;
|
||||
}
|
||||
if (mapCoords.x >= Map->GetWidth() || mapCoords.y >= Map->GetHeight()) {
|
||||
shouldDraw = true;
|
||||
}
|
||||
|
||||
if (shouldDraw) {
|
||||
|
||||
STRUCTUREPAINT objp;
|
||||
Map->GetStructurePaint(m.structure, &objp);
|
||||
|
|
|
@ -307,7 +307,10 @@ public:
|
|||
}
|
||||
INT GetStructureAt(DWORD dwPos) const
|
||||
{
|
||||
if (fielddata[dwPos].structure > -1) return fielddata[dwPos].structure; return -1;
|
||||
if (fielddata[dwPos].structure > -1) {
|
||||
return fielddata[dwPos].structure;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
INT GetStructureAt(MapCoords pos) const
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue