From: xangelo Date: Fri, 28 Jul 2023 18:49:31 +0000 (-0400) Subject: fix: display right background based on travelled distance X-Git-Tag: v0.2.2~2 X-Git-Url: https://git.xangelo.ca/?a=commitdiff_plain;h=5f6b5f9d3872426ebddb926b19ad72f9e672a098;p=risinglegends.git fix: display right background based on travelled distance --- 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 = {