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:
@@ -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}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user