fix: use displayPassengers for station rendering in RailroadTrackPath

Fix the actual bug: passengers at stations and in passenger list were
switching to the new route once the locomotive exited, but before the
last train car exited.

Root cause: RailroadTrackPath was using state.passengers directly instead
of displayPassengers, which has transition logic to delay the switch until
all cars have exited.

The previous commit added the transition logic to useTrackManagement, but
RailroadTrackPath wasn't using the displayPassengers output - it was still
reading state.passengers directly.

Changes:
- SteamTrainJourney: Pass displayPassengers to RailroadTrackPath instead
  of state.passengers

Note: usePassengerAnimations correctly continues to use state.passengers
for immediate animation triggering. boardedPassengers and
nonDeliveredPassengers already use displayPassengers correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Thomas Hallock
2025-10-01 10:49:07 -05:00
parent fe9ea67f56
commit a9e0d19734

View File

@@ -212,7 +212,7 @@ export function SteamTrainJourney({ momentum, trainPosition, pressure, elapsedTi
landmarks={landmarks}
stationPositions={stationPositions}
stations={state.stations}
passengers={state.passengers}
passengers={displayPassengers}
boardingAnimations={boardingAnimations}
disembarkingAnimations={disembarkingAnimations}
/>