mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2026-04-26 03:51:50 +00:00
Clear precipprops in Lua more automatically
This commit is contained in:
parent
965558c52f
commit
a33c2743a1
1 changed files with 2 additions and 3 deletions
|
|
@ -1797,9 +1797,8 @@ static int lib_setPrecipProps(lua_State *L)
|
|||
return luaL_error(L, "Do not alter precipprops in CMD building code!");
|
||||
|
||||
// clear the precipprops to start with, in case of missing table elements
|
||||
// done manually because we do not want to clear name
|
||||
props->type = MT_NULL;
|
||||
props->effects = 0;
|
||||
// make sure we do not clear the name
|
||||
memset(props + sizeof(props->name), 0, sizeof(precipprops_t) - sizeof(props->name));
|
||||
|
||||
lua_pushnil(L);
|
||||
while (lua_next(L, 1)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue