From 37b4f227e6b3bb78d478b39a46398c97c4f9509e Mon Sep 17 00:00:00 2001 From: Justin Marshall Date: Sat, 27 Jun 2020 16:24:45 -0700 Subject: [PATCH] Units/Objects now render correctly and are selectable. --- code/redalert/cell.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/code/redalert/cell.cpp b/code/redalert/cell.cpp index 441ee73..5ed9874 100644 --- a/code/redalert/cell.cpp +++ b/code/redalert/cell.cpp @@ -941,7 +941,6 @@ static bool _Calc_Partial_Window(int cellx, int celly, int & drawx, int & drawy) ph -= (py + ph) - (ty + th); } if (ph < 1) return(false); - drawx = drawx - (px-tx); drawy = drawy - (py-ty); return(true); @@ -1397,10 +1396,10 @@ void CellClass::Draw_It(int x, int y, bool objects) } renderedFrameObjects.push_back(object); int xx,yy; - if (object->IsToDisplay && (!object->Is_Techno() || ((TechnoClass *)object)->Visual_Character() == VISUAL_NORMAL) && Map.Coord_To_Pixel(object->Render_Coord(), xx, yy)) { - ConvertCoordsToIsometric(xx, yy); - if (_Calc_Partial_Window(x, y, xx, yy)) { - object->Draw_It(xx, yy, WINDOW_PARTIAL); + if (object->IsToDisplay && (!object->Is_Techno() || ((TechnoClass *)object)->Visual_Character() == VISUAL_NORMAL) && Map.Coord_To_Pixel(object->Render_Coord(), xx, yy)) { + { + ConvertCoordsToIsometric(xx, yy); + object->Draw_It(xx, yy, WINDOW_TACTICAL); if (Debug_Map) { object->IsToDisplay = true; } else {