summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/m_sounds.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/MirLua/src/m_sounds.cpp')
-rw-r--r--plugins/MirLua/src/m_sounds.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/plugins/MirLua/src/m_sounds.cpp b/plugins/MirLua/src/m_sounds.cpp
index de2a82c23f..3575ccf546 100644
--- a/plugins/MirLua/src/m_sounds.cpp
+++ b/plugins/MirLua/src/m_sounds.cpp
@@ -14,7 +14,9 @@ static int lua_AddSound(lua_State *L)
ssd.ptszSection = section;
ssd.ptszDefaultFile = filePath;
- INT_PTR res = ::CallService("Skin/Sounds/AddNew", hLangpack, (LPARAM)&ssd);
+ int hScriptLangpack = CMLuaScript::GetScriptIdFromEnviroment(L);
+
+ INT_PTR res = CallService("Skin/Sounds/AddNew", hScriptLangpack, (LPARAM)&ssd);
lua_pushboolean(L, res == 0);
return 1;
@@ -24,7 +26,7 @@ static int lua_PlaySound(lua_State *L)
{
const char *name = luaL_checkstring(L, 1);
- INT_PTR res = ::SkinPlaySound(name);
+ INT_PTR res = SkinPlaySound(name);
lua_pushboolean(L, res == 0);
return 1;
@@ -34,7 +36,7 @@ static int lua_PlayFile(lua_State *L)
{
ptrT filePath(mir_utf8decodeT(luaL_checkstring(L, 1)));
- INT_PTR res = ::SkinPlaySoundFile(filePath);
+ INT_PTR res = SkinPlaySoundFile(filePath);
lua_pushboolean(L, res == 0);
return 1;