mirror of https://github.com/minetest/minetest.git
Update l_server.cpp
This commit is contained in:
parent
d8efe4a560
commit
efaffa1b77
|
@ -429,6 +429,7 @@ int ModApiServer::l_sound_play(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
|
||||
// sound_stop(handle)
|
||||
int ModApiServer::l_sound_stop(lua_State *L)
|
||||
{
|
||||
|
@ -438,6 +439,24 @@ int ModApiServer::l_sound_stop(lua_State *L)
|
|||
return 0;
|
||||
}
|
||||
|
||||
// sound_pause(handle)
|
||||
int ModApiServer::l_sound_pause(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
int handle = luaL_checkinteger(L, 1);
|
||||
getServer(L)->pauseSound(handle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// sound_resume(handle)
|
||||
int ModApiServer::l_sound_resume(lua_State *L)
|
||||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
int handle = luaL_checkinteger(L, 1);
|
||||
getServer(L)->resumeSound(handle);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// is_singleplayer()
|
||||
int ModApiServer::l_is_singleplayer(lua_State *L)
|
||||
{
|
||||
|
@ -531,6 +550,8 @@ void ModApiServer::Initialize(lua_State *L, int top)
|
|||
API_FCT(show_formspec);
|
||||
API_FCT(sound_play);
|
||||
API_FCT(sound_stop);
|
||||
API_FCT(sound_pause);
|
||||
API_FCT(sound_resume);
|
||||
|
||||
API_FCT(get_player_information);
|
||||
API_FCT(get_player_privs);
|
||||
|
|
Loading…
Reference in New Issue