Home
/
risinglegends.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8710ea9
)
fix: display right background based on travelled distance
author
xangelo
<me@xangelo.ca>
Fri, 28 Jul 2023 18:49:31 +0000
(14:49 -0400)
committer
xangelo
<me@xangelo.ca>
Fri, 28 Jul 2023 18:49:31 +0000
(14:49 -0400)
src/server/api.ts
patch
|
blob
|
history
diff --git
a/src/server/api.ts
b/src/server/api.ts
index fb4492a66eda08740d3fd74d3ab753f6d41fc498..aed47d41831d8261459b751175a2fe31f6784e31 100644
(file)
--- 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 = {