diff options
author | kwolekr <kwolekr@minetest.net> | 2014-12-27 22:20:04 -0500 |
---|---|---|
committer | kwolekr <kwolekr@minetest.net> | 2014-12-27 22:20:04 -0500 |
commit | 08d259cf41db805ada7c39a39ffe9dcec4f0c230 (patch) | |
tree | 15e4b3a9cc2a3c2792186b4c61e10c0a9c299cbd /src/nodedef.h | |
parent | b67f37f27ea7d89b2098fa9fcc2533fa1091e695 (diff) | |
download | minetest-08d259cf41db805ada7c39a39ffe9dcec4f0c230.tar.gz minetest-08d259cf41db805ada7c39a39ffe9dcec4f0c230.tar.bz2 minetest-08d259cf41db805ada7c39a39ffe9dcec4f0c230.zip |
Set fallback content if resolving content vector requires everything
Diffstat (limited to 'src/nodedef.h')
-rw-r--r-- | src/nodedef.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/src/nodedef.h b/src/nodedef.h index 0c779ddcc..1be764121 100644 --- a/src/nodedef.h +++ b/src/nodedef.h @@ -285,6 +285,26 @@ struct ContentFeatures class NodeResolver; class INodeDefManager; +struct NodeListInfo { + NodeListInfo(u32 len) + { + length = len; + all_required = false; + c_fallback = CONTENT_IGNORE; + } + + NodeListInfo(u32 len, content_t fallback) + { + length = len; + all_required = true; + c_fallback = fallback; + } + + u32 length; + bool all_required; + content_t c_fallback; +}; + struct NodeResolveInfo { NodeResolveInfo(NodeResolver *nr) { @@ -292,7 +312,7 @@ struct NodeResolveInfo { } std::list<std::string> nodenames; - std::list<size_t> nodename_sizes; + std::list<NodeListInfo> nodelistinfo; NodeResolver *resolver; }; |