In the next Garry's Mod update, we should review the ragdoll code, particularly the code related to Spectate mode. We need to fix the issue with Spectate mode. We'll have to see if it works properly.
|
function Glide.RestoreSpawnInfo( ply, restoreCallback ) |
|
ply:Spawn() |
|
|
|
local spawnData = ply.GlideSpawnData |
|
if not spawnData then return end |
|
|
|
ply.GlideSpawnData = nil |
|
ply:SetHealth( spawnData.health ) |
|
ply:SetArmor( spawnData.armor ) |
|
|
|
if spawnData.god then |
|
ply:GodEnable() |
|
end |
|
|
|
timer.Simple( 0.1, function() |
|
if not IsValid( ply ) then return end |
|
if not ply:Alive() then return end |
|
|
|
if spawnData.health > 0 then |
|
RestoreWeapons( ply, spawnData ) |
|
end |
|
|
|
if restoreCallback then |
|
restoreCallback( ply ) |
|
end |
|
end ) |
|
end |
|
end |
In the next Garry's Mod update, we should review the ragdoll code, particularly the code related to Spectate mode. We need to fix the issue with Spectate mode. We'll have to see if it works properly.
gmod-glide/lua/glide/server/ragdoll.lua
Lines 63 to 90 in 706b21f