Commit 05ae7cf0 authored by cutealien's avatar cutealien

Fix bug in ISceneNode::deserializeAttributes which did set scale to 0 when no attribute was given.

Was using the wrong variable (RelativeRotation instead of RelativeScale) as default value.
This was also not working in older Irrlicht versions, but can't be fixed there as those had no default parameters for getAttribute yet.
This allows for example to load .irr files created with new CopperCube while setting a parent-node (some attributes will still be ignored as .irr files always expect the scene itself as parent, that would need some special SceneNode type to work around).

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5081 dfc29bdd-3216-0410-991c-e03cc46cb475
parent cc6cae2e
...@@ -731,7 +731,7 @@ namespace scene ...@@ -731,7 +731,7 @@ namespace scene
setPosition(in->getAttributeAsVector3d("Position", RelativeTranslation)); setPosition(in->getAttributeAsVector3d("Position", RelativeTranslation));
setRotation(in->getAttributeAsVector3d("Rotation", RelativeRotation)); setRotation(in->getAttributeAsVector3d("Rotation", RelativeRotation));
setScale(in->getAttributeAsVector3d("Scale", RelativeRotation)); setScale(in->getAttributeAsVector3d("Scale", RelativeScale));
IsVisible = in->getAttributeAsBool("Visible", IsVisible); IsVisible = in->getAttributeAsBool("Visible", IsVisible);
if (in->existsAttribute("AutomaticCulling")) if (in->existsAttribute("AutomaticCulling"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment