Skip to content

Commit

Permalink
possible fix for error
Browse files Browse the repository at this point in the history
  • Loading branch information
mexikoedi committed Mar 17, 2024
1 parent b8cd5df commit 00ab428
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -533,8 +533,10 @@ end
if CLIENT then
hook.Add("TTTPrepareRound", "TTT2MedResetMediguns", function()
local localPly = LocalPlayer()
localPly:SetNWEntity("ttt2_med_medigun_target", nil)
localPly:SetNWEntity("ttt2_med_medigun_healer", nil)
if IsValid(localPly) then
if IsValid(localPly:GetNWEntity("ttt2_med_medigun_target")) then localPly:SetNWEntity("ttt2_med_medigun_target", nil) end
if IsValid(localPly:GetNWEntity("ttt2_med_medigun_healer")) then localPly:SetNWEntity("ttt2_med_medigun_healer", nil) end
end
end)

net.Receive("ttt2_med_medigun_clear_healer", function() LocalPlayer():SetNWEntity("ttt2_med_medigun_healer", nil) end)
Expand Down

0 comments on commit 00ab428

Please sign in to comment.