Fix MOVETYPE not being set when dropping a player (#162)

This commit is contained in:
Lumi 2024-12-07 17:19:15 -06:00 committed by GitHub
parent 0550713083
commit bc0653ee1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -9,6 +9,13 @@ hook.Add( "PhysgunPickup", "ULXphysgunallowPlayer", function( _, ent )
end
end, HOOK_HIGH )
hook.Add( "PhysgunDrop", "ULXphysgunallowPlayer", function( _, ent )
if not ent:IsPlayer() then return end
if ent:GetNWBool( "ULXphysgunallow", false ) then
ent:SetMoveType( MOVETYPE_WALK )
end
end, HOOK_HIGH )
function cmd.physgunallow( callingPly, targetPlys, shouldUndo )
for _, ply in ipairs( targetPlys ) do
ply:SetNWBool( "ULXphysgunallow", not shouldUndo )