Skip to content
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

tweak(gameserver): Don't enforce sessionmanager with OneSync #2877

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

Conversation

tens0rfl0w
Copy link
Contributor

Goal of this PR

This disables the forced start of the 'sessionmanager' resource when OneSync is enabled and the game type is GTA V.

How is this PR achieving the goal

Unlike RDR2, GTA V does not require any logic that is implemented in the 'sessionmanager' resource when running with OneSync enabled. The Lua scheduler implementation for invoking remote function references in

if GetCurrentResourceName() == 'sessionmanager' then
that uses sessionmanager as a script host is deprecated and not functional, so this should not break anything.

This PR applies to the following area(s)

FiveM

Successfully tested on

Game builds: Not applicable

Platforms: Windows (Server), Linux

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

Resolves #2876

This disables the forced start of the 'sessionmanager' resource when OneSync is enabled and the game type is GTA V.
@@ -1370,19 +1370,4 @@ static InitFunction initFunction([]()
instance->SetComponent(new fx::PeerAddressRateLimiterStore(instance->GetComponent<console::Context>().GetRef()));
instance->SetComponent(new HostVoteCount());
});

fx::ServerInstanceBase::OnServerCreate.Connect([](fx::ServerInstanceBase* instance)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What was the reason for the removal of the fx::ServerInstanceBase::OnServerCreate.Connect?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving this to another fwEvent isn't needed for this change, but as this one was only used to start sessionmanager and all needed components have already been set in the earlier "on create" call I thought moving it there is fine. This ofc can stay in the existing event call if preferred.

@github-actions github-actions bot added the invalid Requires changes before it's considered valid and can be (re)triaged label Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid Requires changes before it's considered valid and can be (re)triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FxServer tries to start sessionmanager even when OneSync is enabled
2 participants