Commit d8a7af19 authored by cutealien's avatar cutealien

Fix bug in getAttributeAsVector2d found by greenya.

git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@4021 dfc29bdd-3216-0410-991c-e03cc46cb475
parent 03b27ab5
......@@ -496,6 +496,24 @@ public:
return v;
}
virtual core::vector2df getVector2d()
{
core::vector2df v;
if (IsFloat)
{
v.X = Count > 0 ? ValueF[0] : 0;
v.Y = Count > 1 ? ValueF[1] : 0;
}
else
{
v.X = (f32)(Count > 0 ? ValueI[0] : 0);
v.Y = (f32)(Count > 1 ? ValueI[1] : 0);
}
return v;
}
virtual video::SColorf getColorf()
{
video::SColorf c;
......
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