CrazyTouristFix

If you liked this item, please rate it up on Steam Workshop page.

Author: chronofanz

Last revision: 2 Jun, 2019 at 18:16 UTC

File size: 116.74 KB

On Steam Workshop

Description:

This patch is intended to fix the strange tourist behavior at outside road connections, as detailed here:

https://steamcommunity.com/app/255710/discussions/0/1812044473319307940/

Source code here: https://github.com/chronofanz/CrazyTouristFix

Details on the bug:

Normally, a driver in a vehicle arrives at the destination, the driver’s exit location is offset from the vehicle’s location. I think this offset value is customized based on the vehicle model. Then, the game asks the PathManager to compute another route between the citizen and the destination – if this succeeds, then off the citizen goes. If it fails, then the citizen never spawns from the vehicle.

This behavior also happens at ALL outside connections. Most outside connections are one way out, however, and also these outside connections have no sidewalk either. So when arriving at the outside connection, the citizen’s start location is offset from the vehicle, then the PathManager is queried for a route, that FAILS (because the road segment is one-way or there’s no sidewalk or whatever), and then the citizen then goes away.

But guess what happens at an outside connection that is at a TWO WAY road segment? 🙂 Aha, the PathManager CAN compute a valid route for the citizen to the outside connection again, and it happens to be the crazy U-turn route. That’s the bug.