Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow vehicles to use restricted lanes when spawning or arriving at destination #1381

Conversation

krzychu124
Copy link
Member

@krzychu124 krzychu124 commented Feb 9, 2022

Improved CanUseLane PathFind function to skip checking vehicle restrictions at the start and end lanes of the calculating path. Solves issues with spawning and delivering goods/industry products

Closes #1380
Fixes #85
It may also fix #494 since on some screenshots roads look like 6-lane with bus. Issue itself is pretty weird so... no idea.

Note: workaround from #85 no longer be necessary 😉

Build: zip

@krzychu124 krzychu124 added VEHICLE RESTRICTIONS Feature: Vehicle restrictions PATHFINDER Pathfinding tweaks or issues labels Feb 9, 2022
@krzychu124 krzychu124 self-assigned this Feb 9, 2022
@krzychu124
Copy link
Member Author

Note: workaround from #85 no longer be necessary 😉

@originalfoo
Copy link
Member

originalfoo commented Feb 9, 2022

IMO it might be worth marking this PR as Fixes: #85 even though #85 is already closed lol.

EDIT: Apparently #85 was fixed by #233 in 0cb90e3

@originalfoo originalfoo added this to the 11.6.4-hotfix-8 milestone Feb 9, 2022
@originalfoo
Copy link
Member

Will this merit a cargo vehicle despawn (I assume not as if the bug affected them they wouldn't spawn...)?

@originalfoo
Copy link
Member

Just for clarification, is this change limited to cargo vehicles, or is it all vehicles? (it looks like all vehicles on cursory glance, whcih is ideal imo)

@krzychu124
Copy link
Member Author

IMO it might be worth marking this PR as Fixes: #85 even though #85 is already closed lol.

EDIT: Apparently #85 was fixed by #233 in 0cb90e3

Yeah, but reading issue description and all your findings (#85 (comment)) this is exactly the fix for that problem #233 fixed only one, minor edge case 😄

Will this merit a cargo vehicle despawn (I assume not as if the bug affected them they wouldn't spawn...)?

It will fix case where cargo vehicle could not find return path to source and despawn. Sometimes they can spawn but despawn on return. Obviously problem with spawning is less visible because you have no chance seeing it until you select building and watch vehicle counter.

@krzychu124
Copy link
Member Author

Just for clarification, is this change limited to cargo vehicles, or is it all vehicles? (it looks like all vehicles on cursory glance, whcih is ideal imo)

Applies to all vehicles.

@originalfoo
Copy link
Member

It will fix case where cargo vehicle could not find return path to source and despawn. Sometimes they can spawn but despawn on return. Obviously problem with spawning is less visible because you have no chance seeing it until you select building and watch vehicle counter.

Ok, so no need to update pathfinder edition number or despawn any vehicles when user loads savegame from prior pathfinder.

originalfoo added a commit that referenced this pull request Feb 9, 2022
- [Meta] TM:PE 11.6.4-hotfix-8
- [Meta] Bugfix for vehicle spawning/delivery on restricted lanes
- [Fixed] Allow vehicles to use vehicle-restricted lane when spawning/delivering #1381 #1380 #494 #85 (krzychu124)
Copy link
Member

@originalfoo originalfoo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build from PR as RELEASE, tested in-game - everything seems to be working great 👍

@originalfoo originalfoo changed the title Allow cargo vehicles to use banned bus lane for spawning vehicle or delivering cargo Allow vehicles to use vehicle-restricted lanes when spawning or arriving at destination Feb 9, 2022
@originalfoo originalfoo changed the title Allow vehicles to use vehicle-restricted lanes when spawning or arriving at destination Allow vehicles to use restricted lanes when spawning or arriving at destination Feb 9, 2022
@originalfoo
Copy link
Member

Publishing this today?

Copy link
Contributor

@chameleon-tbn chameleon-tbn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Build and tested ingame. Imho all working.

@krzychu124 krzychu124 merged commit 52372e7 into master Feb 10, 2022
@krzychu124 krzychu124 deleted the bugfix/1380-vehicles-not-spawning-ban-cars-trucks-on-bus-lane branch February 10, 2022 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PATHFINDER Pathfinding tweaks or issues VEHICLE RESTRICTIONS Feature: Vehicle restrictions
Projects
None yet
3 participants