Skip to content

Fix scenario chain graph normalization#381

Open
Ultimationzzz wants to merge 1 commit into
dexyfex:masterfrom
Ultimationzzz:fix-scenario-chain-graph
Open

Fix scenario chain graph normalization#381
Ultimationzzz wants to merge 1 commit into
dexyfex:masterfrom
Ultimationzzz:fix-scenario-chain-graph

Conversation

@Ultimationzzz

Copy link
Copy Markdown

Fixes scenario .ymt corruption after deleting scenario chains or scenario points.

ScenarioRegion.RebuildChains() was previously empty, so saved scenario files could retain stale chain edge references, edge indexes, or node edge flags after edits. This change normalizes the scenario chaining graph before save by compacting node/edge indexes, rebuilding chain EdgeIds from surviving edges, removing invalid references, and refreshing HasIncomingEdges/HasOutgoingEdges.

Tested by deleting scenario chains from FiveM scenario region files and verifying the saved files load without crashing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant