From 0a020dbcc848ae2debec664846e08bd097d70320 Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Tue, 23 Oct 2012 20:03:06 +0300 Subject: 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) --- src/object_properties.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/object_properties.cpp') diff --git a/src/object_properties.cpp b/src/object_properties.cpp index e67b78b52..3a36addc7 100644 --- a/src/object_properties.cpp +++ b/src/object_properties.cpp @@ -30,6 +30,8 @@ ObjectProperties::ObjectProperties(): weight(5), collisionbox(-0.5,-0.5,-0.5, 0.5,0.5,0.5), visual("sprite"), + mesh(""), + texture(""), visual_size(1,1), spritediv(1,1), initial_sprite_basepos(0,0), @@ -48,6 +50,8 @@ std::string ObjectProperties::dump() os<<", weight="<