Fix some uninitialised variables found by static analysis

openmw-37
scrawl 9 years ago
parent 6bf3932279
commit c996702b56

@ -654,6 +654,7 @@ CharacterController::CharacterController(const MWWorld::Ptr &ptr, MWRender::Anim
, mAnimation(anim)
, mIdleState(CharState_None)
, mMovementState(CharState_None)
, mAdjustMovementAnimSpeed(false)
, mHasMovedInXY(false)
, mMovementAnimationControlled(true)
, mDeathState(CharState_None)

@ -131,6 +131,10 @@ namespace MWRender
, mRootNode(rootNode)
, mResourceSystem(resourceSystem)
, mFogDepth(0.f)
, mUnderwaterColor(fallback->getFallbackColour("Water_UnderwaterColor"))
, mUnderwaterWeight(fallback->getFallbackFloat("Water_UnderwaterColorWeight"))
, mUnderwaterFog(0.f)
, mUnderwaterIndoorFog(fallback->getFallbackFloat("Water_UnderwaterIndoorFog"))
, mNightEyeFactor(0.f)
{
osg::ref_ptr<SceneUtil::LightManager> lightRoot = new SceneUtil::LightManager;
@ -202,10 +206,6 @@ namespace MWRender
updateProjectionMatrix();
mStateUpdater->setFogEnd(mViewDistance);
mUnderwaterColor = fallback->getFallbackColour("Water_UnderwaterColor");
mUnderwaterWeight = fallback->getFallbackFloat("Water_UnderwaterColorWeight");
mUnderwaterIndoorFog = fallback->getFallbackFloat("Water_UnderwaterIndoorFog");
mRootNode->getOrCreateStateSet()->addUniform(new osg::Uniform("near", mNearClip));
mRootNode->getOrCreateStateSet()->addUniform(new osg::Uniform("far", mViewDistance));
}

@ -122,7 +122,9 @@ namespace SceneUtil
, mLastFrameNumber(0)
{}
LightListCallback(const LightListCallback& copy, const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY)
: osg::Object(copy, copyop), osg::NodeCallback(copy, copyop), mLightManager(copy.mLightManager)
: osg::Object(copy, copyop), osg::NodeCallback(copy, copyop)
, mLightManager(copy.mLightManager)
, mLastFrameNumber(0)
{}
META_Object(NifOsg, LightListCallback)

Loading…
Cancel
Save