Skip to content

[Next-Update] Spectate #305

Description

@Vitroze

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.

Image Image

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions