Fixed an error related to trying to get position of ragdoll's physobject on client. Seems like clients can't work with ragdoll physics at all

This commit is contained in:
penolakushari 2023-03-11 20:06:13 +03:00
parent 4e94db8c01
commit 726dd558b8

View File

@ -525,8 +525,8 @@ function DrawEntName(ent)
local pos
if name == "prop_ragdoll" then
local obj = ent:GetPhysicsObjectNum(0)
pos = obj:GetPos()
pos = ent:GetBonePosition(0)
if not pos then pos = ent:GetPos() end
elseif IsValid(ent:GetParent()) then
local parent = ent:GetParent()
pos = parent:LocalToWorld(ent:GetLocalPos())