support rotation and scale on library objects

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@14886 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
auria 2014-01-02 01:42:45 +00:00
parent 4c11ca65f0
commit 5da3b32be9

View File

@ -1735,6 +1735,12 @@ void Track::loadObjects(const XMLNode* root, const std::string& path, LodNodeLoa
core::vector3df xyz;
node->get("xyz", &xyz);
core::vector3df hpr;
node->get("hpr", &hpr);
core::vector3df scale;
node->get("scale", &scale);
XMLNode* libroot;
std::string lib_path = file_manager->getAsset("library/" + name);
bool create_lod_definitions = true;
@ -1776,6 +1782,8 @@ void Track::loadObjects(const XMLNode* root, const std::string& path, LodNodeLoa
scene::ISceneNode* parent = irr_driver->getSceneManager()->addEmptySceneNode();
parent->setPosition(xyz);
parent->setRotation(hpr);
parent->setScale(scale);
parent->updateAbsolutePosition();
loadObjects(libroot, lib_path, lod_loader, create_lod_definitions, parent, library_nodes);
}