Fix nil index error in purr sound function

This commit is contained in:
NullBite 2023-10-19 16:51:54 -04:00
parent c400a17b88
commit 19bfb41a0a
Signed by: nullbite
GPG Key ID: 6C4D545385D4925A

View File

@ -397,7 +397,7 @@ do
function purr(state)
if state and not purr_sound then
purr_sound=sound_settings(sounds["entity.cat.purr"]):loop(true):play()
elseif not state then
elseif not state and purr_sound then
purr_sound:stop()
purr_sound=nil
end