From f9675bd2b4d48b9517cd4939a5cfe1ea9c775b6c Mon Sep 17 00:00:00 2001 From: MirceaKitsune Date: Wed, 24 Oct 2012 00:11:24 +0300 Subject: Add a subfolder for models and transfer models from server to client (obj, md2 and md3 are currently allowed) Get rid of the texture string and use the existing textures array. Segmented meshes have multiple materials, and this will allow us to texture each. Do not switch to this commit yet! If a texture string is left empty in LUA, don't modify that material. Useful so a script can change specific textures without affecting others --- src/scriptapi.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/scriptapi.cpp') diff --git a/src/scriptapi.cpp b/src/scriptapi.cpp index 7eda636e3..9293e2b65 100644 --- a/src/scriptapi.cpp +++ b/src/scriptapi.cpp @@ -938,7 +938,6 @@ static void read_object_properties(lua_State *L, int index, 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)) @@ -6591,6 +6590,8 @@ void scriptapi_luaentity_get_properties(lua_State *L, u16 id, lua_pop(L, 1); getstringfield(L, -1, "visual", prop->visual); + + getstringfield(L, -1, "mesh", prop->mesh); // Deprecated: read object properties directly read_object_properties(L, -1, prop); -- cgit v1.2.3