use_fxv2_oal & lua54 break raycast vector results

For a good bug report you should probably include:

  1. Client (production/canary) and FXServer version: production/canary | 4821
  2. What you expected to happen: ShapeTestResult to return valid endCoords & surfaceNormal vectors
  3. What actually happens: endCoords & surfaceNormal return vec(0.0, 0.0, 0.0), even hitting anything.
  4. Category of bug (eg. client, server, weapons, peds, native): client, native
  5. Reproducible steps, preferably with example script(s):

Tested both in canary/production | my server/clean server (only default resources) | gta build 1604/2372, same issue.
Not sure when it broke, haven’t used the raycast system in a while.

Disabling one of the variables (use_fxv2_oal or lua54) is enough for the native to return the right vectors.

Only tested with StartShapeTestCapsule and StartShapeTestSweptSphere tho, not sure if others will break;
Repro resource: repo_vec.rar (694 Bytes)

Repro steps:

  • Start the resource
  • Aim to an entity
  • Check console (default resource returns vec(0.0,0.0,0.0) on those retval parameters)
  • Go to the fxmanifest.lua
  • Comment use_fxv2_oal or lua54 and restart the resource
  • Re-aim to an entity and check the same retval parameters.

@gottfriedleibniz

How vector-pointer arguments are handled in the current OAL code-path is incorrect:

rawCxt.SetVectorResults();