more correct get_sound

This commit is contained in:
p.kosyh 2009-10-04 16:17:56 +00:00
parent 7987f5a8c7
commit 9d30d674e6
2 changed files with 8 additions and 3 deletions

View file

@ -1083,6 +1083,13 @@ void game_sound_player(void)
snd = instead_eval("return get_sound()");
if (!snd)
return;
do { /* reset sound */
char *p = instead_eval("set_sound(nil)");
if (p)
free(p);
} while(0);
unix_path(snd);
w = sound_find(snd);
if (!w)

View file

@ -1849,9 +1849,7 @@ function set_music(s, count)
end
function get_sound()
local ret = game._sound;
game._sound = nil
return ret
return game._sound;
end
function set_sound(s)