Facepunch / garrysmod-requests

Feature requests for Garry's Mod
86 stars 24 forks source link

Make Player:SetHull/:SetHullDuck networked to player #2419

Open DeffOS opened 5 months ago

DeffOS commented 5 months ago

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)