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

Ragdolls are not synced with the server (even when not a dead player) #2436

Open
mcNuggets1 opened this issue Mar 26, 2024 · 3 comments
Open
Assignees
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@mcNuggets1
Copy link

mcNuggets1 commented Mar 26, 2024

What happened?

Ragdolls become desynced when using SetPedToRagdoll and ResetPedRagdollTimer over a period of lying still or if you move too far away. Notably teleporting ragdolled players makes them twitch a lot and have a wrong position in the end too sometimes.

Shooting a ragdoll also causes it to disappear in some scenarios, but I couldn't reproduce this one, it seems related to the death system of GTA V.

Is there any way to fix this behaviour? It also goes so far that the position of a player is completely different from player to player and the local player of course.

Expected result

Ragdolls that are somewhat networked, atleast the position

Reproduction steps

function CreateRagdollThread()
CreateThread(function() -- Ragdolling
-- Replace "ESX.PlayerData.ped" with "PlayerPedId()" and it should run fine.

	SetEnableHandcuffs(ESX.PlayerData.ped, true)
	SetEnableBoundAnkles(ESX.PlayerData.ped, true)
	SetPedCanPlayInjuredAnims(ESX.PlayerData.ped, false)

	while true do
		if not IsPedRagdoll(ESX.PlayerData.ped) then
			SetPedToRagdoll(ESX.PlayerData.ped, 1000, 1000, 0, false, false, false)
		else
			ResetPedRagdollTimer(ESX.PlayerData.ped)
		end

		Wait(0)
	end

	SetEnableHandcuffs(ESX.PlayerData.ped, false)
	SetEnableBoundAnkles(ESX.PlayerData.ped, false)
	SetPedCanPlayInjuredAnims(ESX.PlayerData.ped, true)
end)

end

Importancy

Slight inconvenience

Area(s)

FiveM, FXServer, Natives

Specific version(s)

FiveM b2944

Additional information

I tried nearly everything and everything failed and then I went on here.

@mcNuggets1 mcNuggets1 added bug triage Needs a preliminary assessment to determine the urgency and required action labels Mar 26, 2024
@StuxxyOfficial
Copy link

afaik, this isn't a fivem bug, its part of the games functionality.

@mcNuggets1
Copy link
Author

I do know that.
It's not documented at all, atleast document the ragdoll behaviour somewhere or atleast implement a hotfix fixing the position of the ragdolled player for you locally.

@StuxxyOfficial
Copy link

Well this is to report bugs within FiveM, feature requests belong on the forums :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

3 participants