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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user