mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Properly read the mesh from LUA.
Players can now be set to meshes using the following test script: function switch_player_visual() prop = { mesh="player.obj", texture="player.png", visual="mesh", } for _, obj in pairs(minetest.get_connected_players()) do obj:set_properties(prop) end minetest.after(1.0, switch_player_visual) end minetest.after(1.0, switch_player_visual)
This commit is contained in:
parent
ac97a7f70e
commit
0a020dbcc8
4 changed files with 25 additions and 11 deletions
|
@ -936,6 +936,9 @@ static void read_object_properties(lua_State *L, int index,
|
|||
lua_pop(L, 1);
|
||||
|
||||
getstringfield(L, -1, "visual", prop->visual);
|
||||
|
||||
getstringfield(L, -1, "mesh", prop->mesh);
|
||||
getstringfield(L, -1, "texture", prop->texture);
|
||||
|
||||
lua_getfield(L, -1, "visual_size");
|
||||
if(lua_istable(L, -1))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue