Skip to content

Commit

Permalink
fixed ragdoll persist issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Newbrict committed Aug 22, 2014
1 parent 829429a commit d6663bf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions gamemode/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ local function BroadcastPlayerDeath( ply )
-- the player who died, so sad, too bad.
net.WriteUInt( ply:EntIndex(), 8 )
net.Broadcast()
-- remove ragdoll
local ragdoll = ply:GetRagdollEntity()
SafeRemoveEntityDelayed( ragdoll, 5 )
end


Expand Down Expand Up @@ -374,8 +377,6 @@ hook.Add( "PlayerDeath", "Remove ent prop on death", function( ply )

ply.nextTaunt = 0
RemovePlayerProp( ply )
local ragdoll = ply:GetRagdollEntity()
SafeRemoveEntityDelayed( ragdoll, 5 )
if( ply:IsFrozen() ) then
ply:Freeze( false )
end
Expand Down

0 comments on commit d6663bf

Please sign in to comment.