IllusionMods / IllusionModdingAPI

Modding API for games made by Illusion (PHAPI / KKAPI / ECAPI / AIAPI / HS2API / KKSAPI)
https://www.patreon.com/ManlyMarco
GNU Lesser General Public License v3.0
260 stars 44 forks source link

[KK] GameAPI still not working in VR (?) #41

Closed Sauceke closed 3 years ago

Sauceke commented 3 years ago

I still can't get OnStartH to get triggered by VR events. This fix doesn't seem to be patching the correct methods. I think AccessTools.Method needs to be given the type as well as the method name.

Also, VRHScene doesn't extend HSceneProc in KK, so I doubt the fix could be this easy. A lot of fields present in HSceneProc are missing from VRHScene, and some fields that they do share have different access levels. Don't see a trivial conversion from one to the other so that you could pass it to OnStartH with its current signature.

ManlyMarco commented 3 years ago

Looks like a typo, this should fix it KKAPI_1.21.zip

Sauceke commented 3 years ago

It doesn't, and Hooks.SetupHooks isn't even getting called anymore because of this. But there is a more basic problem why this probably won't be possible. I'll DM you the VRHScene disassembly.

Sauceke commented 3 years ago

That fixed it, thank you.