YimMenu
YimMenu copied to clipboard
vehicles, peds, weapons local cache
Create a local cache once per game update. The only issue currently is that if the user inject in SP and go to MP a crash will trigger because of some rpf file that got mounted twice is needed for the loading, its pretty meh but i'm not sure how to fix it, the fidevice system is a huge can of worm in itself and i'm out of energy for this right now. Atleast this crash will trigger "only" once per update because once the cache is done for the current update it just query the json files from disk
I'm sure if we'd look at how to fix that crash we can figure it out.
I'd also recommend moving the fiDevice and GXT2 related classes into the GTAV-Classes repo.
Yeah, right now for simplicity of implementing it I'm going to merge the classes into the repo and at later moment we can move them to the other repo.
Haven't tested this but loading MP DLC through DLC::ON_ENTER_MP beforehand may stop the crash
Will test that afterwards. Right now I'm busy revamping the whole GTA Data service class. Throwing away the need for JSON files and instead store it binary.
I'm so glad this thing works though as is.
99% finished
Here and there can be optimised some more where we're copying vectors over where we might get away by moving the memory. I crashed while previewing the vehicles, didn't check which one I crashed one (probably next-gen that we're not filtering out).
Current structure uses the following binary header format:
| Order | Field Name | Field Size (bytes) | Type |
|---|---|---|---|
| 1 | cache version | 4 | uint32 |
| 2 | game build | 4 | uint32 |
| 3 | online version | 4 | float |
| 4 | data size | 8 | uint64 |
| 5 | data | / | any |
Seems the next-gen vehicles are causing crashes again; I have no idea from where I need to parse the bones of a vehicle model.
These are the current methods of checking for invalid vehicles, I checked handling.meta for monetaryValue but that one never seemed to be 0: https://github.com/YimMenu/YimMenu/blob/d01afda8d360baa527099d8952eb745cf75d5dee/BigBaseV2/src/services/gta_data/gta_data_service.cpp#L238-L240
Edit:
I've found the arbitergt.ytf file which contains a stub bone it seems.

Should be ready to merge, @xiaoxiao921 tell me if you see anything.
Could you bump pugixml to HEAD (86c91051541d18a0d24b837a866cf0306fc8db1a)? (it had some bug fixes since 521b2cd)
Going to merge soon, I want to retire the proxy server in the next 2 weeks.