garrysmod-requests icon indicating copy to clipboard operation
garrysmod-requests copied to clipboard

Make Player:SetHull/:SetHullDuck networked to player

Open DeffOS opened this issue 1 year ago • 0 comments

Details

Setting Hulls on player from server doesnt syncs it to player, causing extreme view jitters on client's collision predictions. Usually (as for player_manager.OnPlayerSpawn usage) hulls being set in PlayerSpawn hook, serverside only hook. Idea itself draws from Player:SetViewOffset, which is synced correctly like many other player gameplay settings.

// Test command
concommand.Add("testhullchange",function(ply)
	ply:SetHull(Vector(-8,-8,0),Vector(8,8,16))
	ply:SetViewOffset(Vector(0,0,14))
	print("SERVER HULL",ply:GetHull())
	ply:SendLua([[
		print("CLIENT HULL",LocalPlayer():GetHull())
	]])
end)

DeffOS avatar Jun 28 '24 00:06 DeffOS