feat(gta-streaming-five): increase fwPortalSceneGraphNode pool size to 800
Goal of this PR
The increase of fwPortalSceneGraphNode was suggested in the forum.
Recently it was attempted to add the pool fwPortalSceneGraphNode to the gameconfig(#2695) but as prikolium said they are allocated from another precomputed heap and should be looked for in fwSceneGraph::InitPools.
This was already done by blattersturm here but 2 days later they reverted his change due to Potential cause for 'missing doors after a while'.
The same issue happen with my first attempt of increase.
After looking it a bit more deeper the issue was because the AssignScratchBuffer function that allocates and organizes a scratch buffer into aligned sections for scene graph traversal(flags, screen quads, visited bitsets, etc), my first attempt didn't increase that allocation size, which led to the same issue.
Around 2 months ago I noticed that and tried to patch, when testing again the issue was still happening, the week ago I find some missing stuff that needs patching related to screen quad storage and with that everything looks to work for now in my tests. Also I notice that there's a var that store a guard buffer to make sure the scratch buffer doesn't get corrupted during scene graph traversal and is temporarily added in the SceneGraphPoolsDebug file for testing.
If this works in FiveM, I will try to implement it in RedM as well, because several months ago I saw that it was also a problem.
How is this PR achieving the goal
The patch is almost identical to my previous pull request, but it fixes the screen quad storage used during visibility culling and portal traversal. More information about the patch can be found in my previous pull request.
This PR applies to the following area(s)
FiveM
Successfully tested on
Game builds: 3258 Platforms: Windows
Checklist
- [ ] Code compiles and has been tested successfully.
- [x] Code explains itself well and/or is documented.
- [x] My commit message explains what the changes do and what they are for.
- [x] No extra compilation warnings are added by these changes.
any update on this PR?
ive tested the patch myself locally, and did not run into any issues, and the issue with doors disappearing from dani's previous attempt was also fixed.