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

Bugfix floating vehicles when Parking AI disabled #993

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

krzychu124
Copy link
Member

@krzychu124 krzychu124 commented Aug 14, 2020

  • fixed floating vehicles if ParkingAI disabled
  • if parkingAI is disabled, mod use vanilla code but preserve parking restrictions

Latest build of this PR is available here

Closes #846

@krzychu124 krzychu124 added BUG Defect detected LABS TM:PE LABS branch STABLE TM:PE STABLE branch 11 ALPHA TM:PE v11 alpha edition PARKING Feature: Parking AI / restrictions / etc labels Aug 14, 2020
@krzychu124 krzychu124 added this to the 11.6.0 milestone Aug 14, 2020
@krzychu124 krzychu124 self-assigned this Aug 14, 2020
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.

Code looks good. Works also well ingame.

Vehicles not floating and parking restrictions are recognized.

@krzychu124
Copy link
Member Author

@kianzarrin wanna test it or I can merge it? I spent numerous hours to find the cause, Biffa is using this version for about 2 weeks(branded as Preview) 😅

@kianzarrin
Copy link
Collaborator

kianzarrin commented Oct 11, 2020

@krzychu124
I don't understand the [EDIT] cause of the problem or the code. there is a long list of comments in the issue. can you please explain in summary why the cars were floating?

and what does your code do? it seems to do more than just calling vanilla parking. is this a hackish fix? does this mean TMPE realistic parking algorithm is bypassed? do the buildings get red if there is not enough parking nearby? what should I expect in the test result?

@krzychu124
Copy link
Member Author

Quick summary where was the bug.

When ParkingAI was disabled and Cim was about to park his vehicle, he was still using custom ParkingAI logic to search for parking spot which usually involve additional PF calls (few times wider range of search).
Disabled ParkingAI also meant that all code responsible for triggering additional path finds was inactive.
Additionally vehicle which gets Parking flag(parking spot found and vehicle is at the last position of his path to destination) has ability to drift in straight line to parking spot (commercial/residetial building parking spot) - regular vanilla behaviour.

So it is just vanilla parking search with TM:PE Parking restrictions support.

Building colors are based on statistics from TM:PE ParkingAI (found/not found) - won't work when ParkingAI is off, obviously.

Copy link
Collaborator

@kianzarrin kianzarrin left a comment

Choose a reason for hiding this comment

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

LGTM. restrictions work. cars don't float.

@krzychu124 krzychu124 merged commit 73599fa into master Nov 11, 2020
@krzychu124 krzychu124 deleted the disabled-parking-ai--vehicles-floating-fix branch November 11, 2020 22:47
@originalfoo originalfoo modified the milestones: 11.6.0, 11.5.1 Jan 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11 ALPHA TM:PE v11 alpha edition BUG Defect detected LABS TM:PE LABS branch PARKING Feature: Parking AI / restrictions / etc STABLE TM:PE STABLE branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Parking cars exhibit odd behaviors
4 participants