feat(extra-natives/five): CScenarioConditionIsMultiplayerGame network check patch
This was talked about in the CW discord and also formally requested in the forums.
It patches a virtual function inside the 'CScenarioConditionIsMultiplayerGame' vtable to allow a few CConditionalClipset's to execute in networked environments. This seems to be exclusively used for alternative car entry/exit/jacking animations (a different condition called 'CScenarioConditionIsPlayerInMultiplayerGame' is used in other places for conditional animations and scenarios)
Note: This has been tested with two clients on 1604-2802 Debug and Release. This was the best pattern possible due to the generic layout of the check function, the ctor of the vft and the 'parser_Register' function
Force pushed to include the count_hint optimization
So I assume this is going to allow MP characters do specific animations that they can't do in FiveM but can do in story? If so then that is pretty sweet and a much needed feature!
I have noticed strange behaviour when trying to hijack remote vehicles (and drivers). While I have not fully debugged this, it does seem dependent on when the migration to the client doing the hijacking happens.
Likely some task data being reset or not synchronized. This leads to a desynchronization between as one client will have the Ped in the driver seat and another client will not (executing a flee or motion task, iirc). The video you once shared in the Codewalker discord exhibited this behaviour slightly as well. Debugging this without OneSync may allow finer control over specific migration issues.
If this edge-case gets solved, since we don't do anything w/ NDEBUG it would be nice if that assert would be wrapped in #ifdef _DEBUG. Given the nature of this changes, this is a really nice add.