Pre-upload powerup spm to prevent hangs when using item

This commit is contained in:
Benau 2018-09-12 16:34:38 +08:00
parent f39946347f
commit 1b0f5be495

View File

@ -24,6 +24,7 @@
#include <irrlicht.h>
#include "graphics/irr_driver.hpp"
#include "graphics/sp/sp_base.hpp"
#include "graphics/material.hpp"
#include "graphics/material_manager.hpp"
#include "io/file_manager.hpp"
@ -479,6 +480,9 @@ void PowerupManager::loadPowerup(PowerupType type, const XMLNode &node)
<< "', aborting.";
throw std::runtime_error(o.str());
}
#ifndef SERVER_ONLY
SP::uploadSPM(m_all_meshes[type]);
#endif
m_all_meshes[type]->grab();
}
else