citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.52k stars 2.07k forks source link

fix(gamestate/server): Populate CGlobalFlagsDataNode on object create #2592

Closed tens0rfl0w closed 3 months ago

tens0rfl0w commented 3 months ago

Goal of this PR

Fixes a client-crash when calling physics-altering natives on an object that was created by CreateObjectNoOffset on the server-side.

How is this PR achieving the goal

We now populate the CGlobalFlagsDataNode with the needed flag bits on object creation so the owning client doesn't crash when pushing node updates in the 'Update' method.

This PR applies to the following area(s)

FiveM, Server

Successfully tested on

Game builds: 2060, 2699, 3095

Platforms: Windows

Checklist

Fixes issues

fixes #2583