Skip to content

feat(net/rdr3): extended object id manager #3280

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Ehbw
Copy link
Contributor

@Ehbw Ehbw commented Mar 23, 2025

Goal of this PR

Introduces the "length hack" that was previously introduced in FiveM with e1b1d58

This expands the amount of Object ID from 8000 in RedM to 65535. This gives servers more then enough object IDs especially with larger servers where having population enabled can exhaust all available Object IDs.

Something that should be noted. The change to citizen-server-impl will be removed and done as a second PR before this is merged. Currently its required in order to test the length hack on RedM servers. But cannot be pushed to server artifacts until after this changeset has been pushed to all redm client channels. Otherwise it introduces the potential for crashes and other weird behaviour.

Initial functionality based on Disquse's object id patch in engineering

How is this PR achieving the goal

Making use of the existing length hack logic in rlNetBuffer and citizen-server-state. This PR hooks several functions to do with serializing object ID's in order to remove the 8000 limit tied to object ID Mapping. This PR also adjusts several net events in order to remove object ID Mapping in onesync as its not needed and can cause problems with ids greater then 8000, while retaining non-onesync compatibility.

This PR applies to the following area(s)

RedM

Successfully tested on

Game builds: 1491

Platforms: Windows

Checklist

  • Code compiles and has been tested successfully.
  • Code explains itself well and/or is documented.
  • My commit message explains what the changes do and what they are for.
  • No extra compilation warnings are added by these changes.

Fixes issues

@github-actions github-actions bot added RedM Issues/PRs related to RedM invalid Requires changes before it's considered valid and can be (re)triaged labels Mar 23, 2025
@Ehbw Ehbw force-pushed the feat/rdr3-object-manager branch from 9172f52 to df4eb9e Compare March 23, 2025 22:24
@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Mar 23, 2025
@d22tny
Copy link
Contributor

d22tny commented Mar 24, 2025

Really great job! Nice one.

constexpr bool canLengthHack =

#ifdef STATE_RDR3
		true
#else
		true
#endif

i think you should remove the ifdef entirely here

@outsider31000
Copy link
Contributor

Really great job! Nice one.

constexpr bool canLengthHack =

#ifdef STATE_RDR3
		true
#else
		true
#endif

i think you should remove the ifdef entirely here

that will be removed when the second pull request to enable length hack is done, once we get all the tests done.

@prikolium-cfx
Copy link
Collaborator

prikolium-cfx commented Mar 24, 2025

Good job! I've pushed it to specific/feature/redm-length-hack. Should take effect in ~1 hour. You can also create a topic on forum in Experimental section using one of our topics as an example. Let me know when you need topic approval.

UPD: Deployed

@outsider31000
Copy link
Contributor

outsider31000 commented Mar 24, 2025

thanks we will be testing this. another pr will come after to enable the length hack

@Ehbw Ehbw force-pushed the feat/rdr3-object-manager branch from df4eb9e to 5a09244 Compare March 25, 2025 20:46
@Ehbw Ehbw force-pushed the feat/rdr3-object-manager branch 2 times, most recently from 6e36bb8 to a26e9f2 Compare April 3, 2025 22:32
@github-actions github-actions bot added invalid Requires changes before it's considered valid and can be (re)triaged and removed triage Needs a preliminary assessment to determine the urgency and required action labels Apr 3, 2025
@Ehbw Ehbw force-pushed the feat/rdr3-object-manager branch from a26e9f2 to e92a26b Compare April 10, 2025 19:16
@github-actions github-actions bot added triage Needs a preliminary assessment to determine the urgency and required action and removed invalid Requires changes before it's considered valid and can be (re)triaged labels Apr 10, 2025
@Ehbw Ehbw force-pushed the feat/rdr3-object-manager branch from e92a26b to 0fa8829 Compare April 12, 2025 16:19
@Ehbw Ehbw force-pushed the feat/rdr3-object-manager branch from 0fa8829 to c261094 Compare April 20, 2025 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RedM Issues/PRs related to RedM triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants