From 395a7600fd061c73a24007d902c3148a31bb5038 Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Tue, 10 Jul 2012 23:13:03 -0700 Subject: [PATCH] Initialize identify transform when declaring the identity object --- components/nif/nif_types.hpp | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/components/nif/nif_types.hpp b/components/nif/nif_types.hpp index 705ed5994f..f364cd2d44 100644 --- a/components/nif/nif_types.hpp +++ b/components/nif/nif_types.hpp @@ -41,17 +41,9 @@ struct Transformation static const Transformation& getIdentity() { - static Transformation identity; - static bool iset = false; - 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; - } - + static const Transformation identity = { + Ogre::Vector3::ZERO, Ogre::Matrix3::IDENTITY, 1.0f, Ogre::Vector3::ZERO + }; return identity; } };