Open BugCode1 opened 1 month ago
Hmm, we used to have this issue all the time but fixed it by disabling collisions on all spawned objects.
This also isn't a FiveM Bug (nor a bug in general).
Yes, in fact, this alone is not considered a bug.
However, when you attach an entity without collision to a ped, due to some unknown events over time, this entity regains collision. Additionally, some cheaters create this problem by attaching a small object with collision inside their own body.
Actually, I think the presence of collision between the entities attached to a ped and a vehicle is completely redundant and it is better to remove it from the FiveM side.
The "tornado" was something iirc when you attach a entity and switch routing bucket
This could be one of the possible scenarios, but it is not the only one. There are other possibilities as well.
Considering that I have seen this problem in servers that have not used Routing Bucket also we have had this problem since the early days of FiveM (before the existence of Routing Bucket).
One of the cases that creates this problem with a very rare chance (due to bad network or desync servers with +128 players) is teleporting, which suddenly restores all collisions of the attached objects.
Interestingly, this issue has become significantly more frequent recently for seemingly no reason, just a month ago this issue was very rare and now it's a daily occurrence, we haven't added anything recently that would be attaching more objects to players either.
This 'bug' exists for multiple years now -> https://forum.cfx.re/t/1636310
There are two different problems here:
CEntityScriptGameStateDataNode -> usesCollision
of the prev. attached entity gets flipped to true
(which is fine).CPhysicalAttachNodeData
as this is handled by the entity-owner who got removed in the same frame. This results in a re-attachment of the entity (with collision due to the above mentioned behavior) when a player with the same slotId
enters the scope of the prev. attached entity.(The same happens if the routing bucket of the target player is switched, as this also invokes ClearClientFromWorldGrid
)
Flushing CPhysicalAttachNodeData
when an entity is migrating is maybe an option here as this can only happen if the parent-entity doesn't exist anymore.
Had this happen to a player who was idle, switched on his engine and then starting spinning https://medal.tv/games/gta-v/clips/i0gjaScWwZgeC6ap_/d1337IzrZ5CR?invite=cr-MSxIaUMsNjYzNDYyNjIs
What happened?
Sometimes, for various reasons, the entities attached to a ped come out of no-collision mode. When the player gets into a vehicle, due to the collisions between these entities, the car can behave erratically and collide with the ground and air like a tornado.
Additionally, if an entity with collision is attached to you, you can move vehicles like a deflated ball.
Expected result
It is a good idea to ensure that the collision of all entities attached to a ped is removed when entering vehicles, or that there is no collision at all between the entities attached to the ped and the vehicles, to prevent issues like this from occurring.
Reproduction steps
https://github.com/citizenfx/fivem/assets/26005436/f87d9486-6f38-4c4a-9967-3f3840aaa08a
Importancy
There's a workaround
Area(s)
FiveM
Specific version(s)
All Versions
Additional information
No response