Remove irrlicht item node in no graphics STK
This commit is contained in:
parent
c0a350fe6e
commit
96541cf8af
@ -23,6 +23,7 @@
|
|||||||
#include "graphics/lod_node.hpp"
|
#include "graphics/lod_node.hpp"
|
||||||
#include "graphics/sp/sp_mesh.hpp"
|
#include "graphics/sp/sp_mesh.hpp"
|
||||||
#include "graphics/sp/sp_mesh_node.hpp"
|
#include "graphics/sp/sp_mesh_node.hpp"
|
||||||
|
#include "guiengine/engine.hpp"
|
||||||
#include "items/item_manager.hpp"
|
#include "items/item_manager.hpp"
|
||||||
#include "karts/abstract_kart.hpp"
|
#include "karts/abstract_kart.hpp"
|
||||||
#include "modes/world.hpp"
|
#include "modes/world.hpp"
|
||||||
@ -201,6 +202,9 @@ Item::Item(ItemType type, const Vec3& xyz, const Vec3& normal,
|
|||||||
initItem(type, xyz, normal);
|
initItem(type, xyz, normal);
|
||||||
m_graphical_type = getGrahpicalType();
|
m_graphical_type = getGrahpicalType();
|
||||||
|
|
||||||
|
m_node = NULL;
|
||||||
|
if (!GUIEngine::isNoGraphics())
|
||||||
|
{
|
||||||
LODNode* lodnode =
|
LODNode* lodnode =
|
||||||
new LODNode("item", irr_driver->getSceneManager()->getRootSceneNode(),
|
new LODNode("item", irr_driver->getSceneManager()->getRootSceneNode(),
|
||||||
irr_driver->getSceneManager());
|
irr_driver->getSceneManager());
|
||||||
@ -220,9 +224,12 @@ Item::Item(ItemType type, const Vec3& xyz, const Vec3& normal,
|
|||||||
lodnode->add(100, meshnode, true);
|
lodnode->add(100, meshnode, true);
|
||||||
}
|
}
|
||||||
m_node = lodnode;
|
m_node = lodnode;
|
||||||
|
}
|
||||||
setType(type);
|
setType(type);
|
||||||
handleNewMesh(getGrahpicalType());
|
handleNewMesh(getGrahpicalType());
|
||||||
|
|
||||||
|
if (!m_node)
|
||||||
|
return;
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
std::string debug_name("item: ");
|
std::string debug_name("item: ");
|
||||||
debug_name += getType();
|
debug_name += getType();
|
||||||
|
Loading…
Reference in New Issue
Block a user