From 5f6b5f9d3872426ebddb926b19ad72f9e672a098 Mon Sep 17 00:00:00 2001 From: xangelo Date: Fri, 28 Jul 2023 14:49:31 -0400 Subject: [PATCH] fix: display right background based on travelled distance --- src/server/api.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/server/api.ts b/src/server/api.ts index fb4492a..aed47d4 100644 --- a/src/server/api.ts +++ b/src/server/api.ts @@ -548,7 +548,7 @@ app.get('/state', authEndpoint, async (req: Request, res: Response) => { const travelPlan = await getTravelPlan(player.id); if(travelPlan) { - closestTown = (travelPlan.current_position / travelPlan.total_distance) > 0.5 ? travelPlan.source_id : travelPlan.destination_id; + closestTown = (travelPlan.current_position / travelPlan.total_distance) > 0.5 ? travelPlan.destination_id : travelPlan.source_id; } const state = { -- 2.25.1