From 4da4956df88e8ac0cfcfcc0930d11a838bff0873 Mon Sep 17 00:00:00 2001 From: Dan Albert Date: Tue, 27 Jun 2023 23:27:45 -0700 Subject: [PATCH] Fix waypoint drag and drop. The fix for https://github.com/dcs-liberation/dcs_liberation/issues/3037 wasn't complete. It seems this `- 1` was here to work around the UI wrongly having two takeoff points... Now that we fixed that, this also needs to go. Fixes https://github.com/dcs-liberation/dcs_liberation/issues/3059. (cherry picked from commit 02c9fe93c54e641e270e22df996195f6ec0b3cf3) --- game/server/waypoints/routes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/server/waypoints/routes.py b/game/server/waypoints/routes.py index 0cf398ca..a50d2e05 100644 --- a/game/server/waypoints/routes.py +++ b/game/server/waypoints/routes.py @@ -50,7 +50,7 @@ def set_position( if waypoint_idx == 0: raise HTTPException(status_code=status.HTTP_403_FORBIDDEN) - waypoint = flight.flight_plan.waypoints[waypoint_idx - 1] + waypoint = flight.flight_plan.waypoints[waypoint_idx] waypoint.position = Point.from_latlng( LatLng(position.lat, position.lng), game.theater.terrain )