mirror of
https://github.com/luanti-org/luanti.git
synced 2025-11-30 20:53:45 +01:00
Fix issue #2441: crash on respawn, since a conversion std::list to std::vector on Environment.cpp
* Also change some std::list to std::vector for ClientMap::renderMap * Remove disabled code in ClientMap::renderMap, disabled since a long time
This commit is contained in:
@@ -443,7 +443,7 @@ private:
|
||||
content_t m_next_id;
|
||||
|
||||
// List of node strings and node resolver callbacks to perform
|
||||
std::list<NodeResolveInfo *> m_pending_node_lookups;
|
||||
std::vector<NodeResolveInfo *> m_pending_node_lookups;
|
||||
|
||||
// True when all nodes have been registered
|
||||
bool m_node_registration_complete;
|
||||
@@ -479,7 +479,7 @@ void CNodeDefManager::clear()
|
||||
m_next_id = 0;
|
||||
|
||||
m_node_registration_complete = false;
|
||||
for (std::list<NodeResolveInfo *>::iterator
|
||||
for (std::vector<NodeResolveInfo *>::iterator
|
||||
it = m_pending_node_lookups.begin();
|
||||
it != m_pending_node_lookups.end();
|
||||
++it)
|
||||
@@ -1309,7 +1309,7 @@ void CNodeDefManager::pendNodeResolve(NodeResolveInfo *nri)
|
||||
|
||||
void CNodeDefManager::cancelNodeResolve(NodeResolver *resolver)
|
||||
{
|
||||
for (std::list<NodeResolveInfo *>::iterator
|
||||
for (std::vector<NodeResolveInfo *>::iterator
|
||||
it = m_pending_node_lookups.begin();
|
||||
it != m_pending_node_lookups.end();
|
||||
++it) {
|
||||
@@ -1326,7 +1326,7 @@ void CNodeDefManager::runNodeResolverCallbacks()
|
||||
{
|
||||
while (!m_pending_node_lookups.empty()) {
|
||||
NodeResolveInfo *nri = m_pending_node_lookups.front();
|
||||
m_pending_node_lookups.pop_front();
|
||||
m_pending_node_lookups.erase(m_pending_node_lookups.begin());
|
||||
nri->resolver->resolveNodeNames(nri);
|
||||
nri->resolver->m_lookup_done = true;
|
||||
delete nri;
|
||||
@@ -1345,7 +1345,7 @@ bool CNodeDefManager::getIdFromResolveInfo(NodeResolveInfo *nri,
|
||||
|
||||
content_t c;
|
||||
std::string name = nri->nodenames.front();
|
||||
nri->nodenames.pop_front();
|
||||
nri->nodenames.erase(nri->nodenames.begin());
|
||||
|
||||
bool success = getId(name, c);
|
||||
if (!success && node_alt != "") {
|
||||
@@ -1385,7 +1385,7 @@ bool CNodeDefManager::getIdsFromResolveInfo(NodeResolveInfo *nri,
|
||||
|
||||
content_t c;
|
||||
std::string name = nri->nodenames.front();
|
||||
nri->nodenames.pop_front();
|
||||
nri->nodenames.erase(nri->nodenames.begin());
|
||||
|
||||
if (name.substr(0,6) != "group:") {
|
||||
if (getId(name, c)) {
|
||||
|
||||
Reference in New Issue
Block a user