mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
parent
e83530d40b
commit
d20f1182f2
2 changed files with 8 additions and 5 deletions
|
@ -433,7 +433,7 @@ int LuaPseudoRandom::create_object(lua_State *L)
|
|||
{
|
||||
NO_MAP_LOCK_REQUIRED;
|
||||
|
||||
u64 seed = luaL_checknumber(L, 1);
|
||||
s32 seed = luaL_checkinteger(L, 1);
|
||||
LuaPseudoRandom *o = new LuaPseudoRandom(seed);
|
||||
*(void **)(lua_newuserdata(L, sizeof(void *))) = o;
|
||||
luaL_getmetatable(L, className);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue