mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-07-31 05:30:23 +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);
|
*((unsigned int*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
|
||||||
break;
|
break;
|
||||||
case StructProperty::Float:
|
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;
|
break;
|
||||||
case StructProperty::Char:
|
case StructProperty::Char:
|
||||||
*((char*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
|
*((char*)(((unsigned char*)&luacon_sim->elements[id])+offset)) = luaL_checkinteger(l, 3);
|
||||||
|
Reference in New Issue
Block a user