mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-06 16:36:32 +02:00
fix being unable to set floating point values in element.property
broken in e92bbac700
This commit is contained in:
@@ -2560,7 +2560,7 @@ int LuaScriptInterface::elements_property(lua_State * l)
|
||||
*((unsigned int*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
|
||||
break;
|
||||
case StructProperty::Float:
|
||||
*((float*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
|
||||
*((float*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checknumber(l, 3);
|
||||
break;
|
||||
case StructProperty::Char:
|
||||
*((char*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
|
||||
|
Reference in New Issue
Block a user