Some code cleanup.
git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/irrlicht@3813 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
6bed41add5
commit
671fde19cf
@ -60,11 +60,8 @@ PhysicalObject::PhysicalObject(const XMLNode *xml_node)
|
|||||||
m_node = irr_driver->addMesh(m_mesh);
|
m_node = irr_driver->addMesh(m_mesh);
|
||||||
//m_node->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
|
//m_node->setMaterialType(video::EMT_TRANSPARENT_ALPHA_CHANNEL);
|
||||||
Vec3 xyz(0,0,0);
|
Vec3 xyz(0,0,0);
|
||||||
int result = xml_node->getXYZ(&xyz);
|
int result = xml_node->get("xyz", &xyz);
|
||||||
if(!XMLNode::hasZ(result)) // needs height
|
|
||||||
{
|
|
||||||
xyz.setZ(RaceManager::getTrack()->getTerrainHeight(xyz));
|
xyz.setZ(RaceManager::getTrack()->getTerrainHeight(xyz));
|
||||||
}
|
|
||||||
Vec3 hpr(0,0,0);
|
Vec3 hpr(0,0,0);
|
||||||
result = xml_node->getHPR(&hpr);
|
result = xml_node->getHPR(&hpr);
|
||||||
if(!XMLNode::hasP(result) ||
|
if(!XMLNode::hasP(result) ||
|
||||||
@ -106,6 +103,7 @@ PhysicalObject::~PhysicalObject()
|
|||||||
*/
|
*/
|
||||||
void PhysicalObject::init()
|
void PhysicalObject::init()
|
||||||
{
|
{
|
||||||
|
assert(m_mesh);
|
||||||
// 1. Determine size of the object
|
// 1. Determine size of the object
|
||||||
// -------------------------------
|
// -------------------------------
|
||||||
Vec3 min, max;
|
Vec3 min, max;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user