mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-26 18:35:20 +00:00
Initialize identify transform when declaring the identity object
This commit is contained in:
parent
348b5fa207
commit
395a7600fd
@ -41,17 +41,9 @@ struct Transformation
|
|||||||
|
|
||||||
static const Transformation& getIdentity()
|
static const Transformation& getIdentity()
|
||||||
{
|
{
|
||||||
static Transformation identity;
|
static const Transformation identity = {
|
||||||
static bool iset = false;
|
Ogre::Vector3::ZERO, Ogre::Matrix3::IDENTITY, 1.0f, Ogre::Vector3::ZERO
|
||||||
if (!iset)
|
};
|
||||||
{
|
|
||||||
identity.scale = 1.0f;
|
|
||||||
identity.rotation[0][0] = 1.0f;
|
|
||||||
identity.rotation[1][1] = 1.0f;
|
|
||||||
identity.rotation[2][2] = 1.0f;
|
|
||||||
iset = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return identity;
|
return identity;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user