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

Citizen not found fix #1091

Merged
merged 2 commits into from
May 3, 2021
Merged

Conversation

krzychu124
Copy link
Member

Incomplete flag reset was clearing important flag CitizenInstance.Flags.TargetIsNode used to distinguish type of ID stored.

Flag indicates that value of CitizenInstance.m_targetBuilding is Node ID, not Building ID - Node ID is used for all kind of public transport stops including node of walking tour. Warning about wrong Citizen was triggered because citizen reached last walking tour path node, close to his parked vehicle - cim requests for additional path to reach vehicle.

Test build available here (requires CitiesHarmony mod unlike workshop versions)

Resolves #1067

…ag 'TargetIsNode' used to distinguish m_targetBuilding is (flag indicates that is Node ID, not Building ID)
@krzychu124 krzychu124 added BUG Defect detected confirmed Represents confirmed issue or bug LABS TM:PE LABS branch STABLE TM:PE STABLE branch PARKING Feature: Parking AI / restrictions / etc PATHFINDER Pathfinding tweaks or issues labels Apr 17, 2021
@krzychu124 krzychu124 self-assigned this Apr 17, 2021
Copy link
Collaborator

@kvakvs kvakvs left a comment

Choose a reason for hiding this comment

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

Is there anything we could add to the code (like safe set/reset helper functions) that will help us avoid similar problem in the future? Or is this just one time fix that will never break again?
Anyway looks okay

@krzychu124
Copy link
Member Author

@kvakvs It's just one missing flag(added in the ParkLife DLC). Since not all flags are used there to reset I could experiment with "subtracting not allowed flags from All" instead of bitwise AND with all allowed.

@krzychu124
Copy link
Member Author

It's just one missing flag(added in the ParkLife DLC). Since not all flags are used there to reset I could experiment with "subtracting not allowed flags from All" instead of bitwise AND with all allowed.

If they'll change anything there it will be broken anyways. I'm merging it, it's the time to push it for tests.

@krzychu124 krzychu124 merged commit 24a7b15 into master May 3, 2021
@krzychu124 krzychu124 deleted the bugfix/1067-citizen-not-found-warning branch May 3, 2021 00:21
@chameleon-tbn chameleon-tbn removed their request for review May 28, 2021 10:47
@originalfoo originalfoo added this to the 11.6.0 milestone Jan 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected confirmed Represents confirmed issue or bug LABS TM:PE LABS branch PARKING Feature: Parking AI / restrictions / etc PATHFINDER Pathfinding tweaks or issues STABLE TM:PE STABLE branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Citizen not found error
4 participants