Pass Vector3 pointers to Raycast functions
This is a confusing one, because it works, even though it shouldn't.
According to Pohky, C# (the caller) creates a copy of Vector3 on the stack, because struct is a value type and too big to be passed via the register itself. It passes it as a "stack pointer" instead, which happens to be exactly what the game needs - a pointer.
For me, it simply should be a Vector3*, because this is what I see in the games assembly - a dereference.
That it gets converted automatically and becomes a pointer is just ridiculous in my opinion, and should not be relied on, and instead the types should be fixed.
Discussion in #plugin-dev where I try to understand what is happening (not very useful and basically explained above): https://discord.com/channels/581875019861328007/653504487352303619/1219332724792229900
In the original game code, the parameters are likely passed by-reference (so the function signature is using &), so they should probably be pointers here..? I think you're actually right..
Leaving this open then for Dawntrail.