fix: display the image from the destination city at 50% progress
authorxangelo <git@xangelo.ca>
Tue, 25 Jul 2023 19:43:42 +0000 (15:43 -0400)
committerxangelo <git@xangelo.ca>
Tue, 25 Jul 2023 19:43:42 +0000 (15:43 -0400)
src/events/travel/server.ts

index 72a4e82c77c6fef4d561229f456c5504b6f77bdf..1ceab7eb89f5169e0b44dc810f33389d3d45e009 100644 (file)
@@ -93,7 +93,7 @@ export const nextStep: SocketEvent = {
       // decide if they will run into anything
       const travelPlan = await stepForward(api.player.id);
 
-      const closest: number = (travelPlan.current_position / travelPlan.total_distance) > 0.5 ? travelPlan.source_id : travelPlan.destination_id;
+      const closest: number = (travelPlan.current_position / travelPlan.total_distance) > 0.5 ? travelPlan.destination_id : travelPlan.source_id;
 
       // send back NOTHING!
       api.socket.emit('city:travel', {