[FIXED] Sound emitter crashing server

This commit is contained in:
BlackPhoenix 2008-06-10 19:45:57 +00:00
parent 32dde11636
commit 07cd15ad1f

View File

@ -39,6 +39,9 @@ function ENT:SetSound(sound)
if (sound) then
util.PrecacheSound(sound)
self.sound = (sound or ""):gsub("[/\\]+","/")
while (string.find(self.sound,"%s") && (string.find(self.sound,"%s") == 1)) do
self.sound = string.Right(self.sound,1)
end
self:SetOverlayText( "Sound: " .. self.sound .. "\nOff" )
end
end