mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Allow ObjDefManager instances to be cloned
This commit is contained in:
parent
d1c6cc72cc
commit
2062c80e21
13 changed files with 370 additions and 5 deletions
|
@ -1572,6 +1572,18 @@ NodeResolver::~NodeResolver()
|
|||
}
|
||||
|
||||
|
||||
void NodeResolver::cloneTo(NodeResolver *res) const
|
||||
{
|
||||
FATAL_ERROR_IF(!m_resolve_done, "NodeResolver can only be cloned"
|
||||
" after resolving has completed");
|
||||
/* We don't actually do anything significant. Since the node resolving has
|
||||
* already completed, the class that called us will already have the
|
||||
* resolved IDs in its data structures (which it copies on its own) */
|
||||
res->m_ndef = m_ndef;
|
||||
res->m_resolve_done = true;
|
||||
}
|
||||
|
||||
|
||||
void NodeResolver::nodeResolveInternal()
|
||||
{
|
||||
m_nodenames_idx = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue