1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-14 09:05:19 +02:00

Modernize lua read (part 1): C++ templating insurance (#7394)

* Modernize lua read (part 1): C++ templating assurance

Implement the float reader
This commit is contained in:
Loïc Blot
2018-06-04 22:38:07 +02:00
committed by GitHub
parent 86b19f2849
commit 180e551c56
9 changed files with 43 additions and 21 deletions

View File

@@ -455,8 +455,8 @@ int ModApiServer::l_sound_fade(lua_State *L)
{
NO_MAP_LOCK_REQUIRED;
s32 handle = luaL_checkinteger(L, 1);
float step = luaL_checknumber(L, 2);
float gain = luaL_checknumber(L, 3);
float step = readParam<float>(L, 2);
float gain = readParam<float>(L, 3);
getServer(L)->fadeSound(handle, step, gain);
return 0;
}