OneSync
Well-Sourced - This page cites many reputable references.
OneSync is a feature of FiveM, OneSync is designed to improve the synchronization and performance, allowing more players to join a server and enhancing the development of networked entities.
Features
Some of the features of OneSync are:
- Increased player slots: OneSync allows up to 2048 players to join a server, compared to the original limit of 32 players.
- Extended object ID length: OneSync extends the object ID length from 8192 to 65535, allowing more objects to be created and manipulated on the server.
- Player and entity culling: OneSync implements a culling system that prevents entities and players from being created or deleted locally outside of a certain radius, reducing network traffic and improving performance.
And more listed on the FiveM documentation: OneSync - Cfx.re Docs (fivem.net)
The Problem With Trainers
Some trainers like Menyoo and its object spooner might have a problem with the player and entity culling when they get too far away because:
- Player and entity culling prevents entities and players from being created or deleted locally outside of a certain radius, which while reduces network traffic and improves performance on the server end, it ends up limiting the distance on how far you can be from scenes before objects can then be no
"longer controlled by their original owner. This means that any entity that would be out of scope will be culled and migrated/disowned. " - FiveM Documentation
This means that objects spawned by trainers might not be visible or persistent for other players or the server if you are eventually outside of the culling radius. This is also why if you went to view the objects database in Menyoo and saw a bunch of "INVAILD" objects. They were spawned in, but due to being out of distance or just at some point, they are no longer controllable by you.
The distance isn't exactly too known, in the commit code,
// #TODO1S: figure out a good value for this
if (distSquared < (650.0f * 650.0f))
{
shouldBeCreated = true;
}
}
}
In FiveM's docs, they say
By default, the culling radius is set to
424 units
around the entity. - FiveM Documentation