projects
/
zefram
/
minetest
/
minetest_engine.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fdf6eec
)
Duplicate last tile image automatically to all for lua node definitions
author
Perttu Ahola
<celeron55@gmail.com>
Fri, 25 Nov 2011 16:57:17 +0000
(18:57 +0200)
committer
Perttu Ahola
<celeron55@gmail.com>
Tue, 29 Nov 2011 17:13:51 +0000
(19:13 +0200)
src/scriptapi.cpp
patch
|
blob
|
history
diff --git
a/src/scriptapi.cpp
b/src/scriptapi.cpp
index 6f16c72e7aeea54e20b35fedf1704fef0bedfe47..5ef4f9972fab5a8670970e642b78b3f7999e3c02 100644
(file)
--- a/
src/scriptapi.cpp
+++ b/
src/scriptapi.cpp
@@
-529,6
+529,14
@@
static int l_register_node(lua_State *L)
break;
}
}
+ // Copy last value to all remaining textures
+ if(i >= 1){
+ std::string lastname = f.tname_tiles[i-1];
+ while(i < 6){
+ f.tname_tiles[i] = lastname;
+ i++;
+ }
+ }
}
lua_pop(L, 1);