From 9f31118e03c2008fcad4605d0d61d66648ddecb9 Mon Sep 17 00:00:00 2001 From: Justin Marshall Date: Sun, 19 Jul 2020 14:11:49 -0700 Subject: [PATCH] Aircraft rubberband now goes down the same screen coordinate selection system. --- code/redalert/display.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/code/redalert/display.cpp b/code/redalert/display.cpp index 5032f01..517d922 100644 --- a/code/redalert/display.cpp +++ b/code/redalert/display.cpp @@ -2981,9 +2981,13 @@ void DisplayClass::Select_These(COORDINATE coord1, COORDINATE coord2, bool addit */ for (int air_index = 0; air_index < Aircraft.Count(); air_index++) { AircraftClass * aircraft = Aircraft.Ptr(air_index); - COORDINATE ocoord = aircraft->Center_Coord(); - int x = Coord_X(ocoord); - int y = Coord_Y(ocoord); + //COORDINATE ocoord = aircraft->Center_Coord(); + int x = aircraft->GetRenderX(); + int y = aircraft->GetRenderY(); + // Not on screen. + if (x == -1 && y == -1) { + continue; + } /* ** Only try to select objects that are allowed to be selected, and are within the bounding box.