Skip to content

Commit

Permalink
Fix OnRemove detection
Browse files Browse the repository at this point in the history
  • Loading branch information
wrefgtzweve committed Apr 2, 2024
1 parent c889b71 commit 868d229
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lua/entities/gmod_wire_rt_camera.lua
Original file line number Diff line number Diff line change
Expand Up @@ -85,12 +85,10 @@ if CLIENT then
SetCameraActive(self, isActive)
end

function ENT:OnRemove()
timer.Simple( 0, function()
if not IsValid(self) then
SetCameraActive(self, false)
end
end)
function ENT:OnRemove(fullUpdate)
if not fullUpdate then
SetCameraActive(self, false)
end
end

function ENT:SetIsObserved(isObserved)
Expand Down

0 comments on commit 868d229

Please sign in to comment.