diff --git a/Engine/source/T3D/assets/ImageAsset.cpp b/Engine/source/T3D/assets/ImageAsset.cpp index 046d98b4c..254d05837 100644 --- a/Engine/source/T3D/assets/ImageAsset.cpp +++ b/Engine/source/T3D/assets/ImageAsset.cpp @@ -103,7 +103,7 @@ EndImplementEnumType; //----------------------------------------------------------------------------- -ImageAsset::ImageAsset() : AssetBase(), mImage(nullptr), mUseMips(true), mIsHDRImage(false), mIsValidImage(false) +ImageAsset::ImageAsset() : AssetBase(), mImage(nullptr), mUseMips(true), mIsHDRImage(false), mIsValidImage(false), mImageType(Albedo) { mImageFileName = StringTable->EmptyString(); } diff --git a/Engine/source/T3D/cameraSpline.cpp b/Engine/source/T3D/cameraSpline.cpp index 1129f91f8..d7c525e33 100644 --- a/Engine/source/T3D/cameraSpline.cpp +++ b/Engine/source/T3D/cameraSpline.cpp @@ -36,6 +36,7 @@ CameraSpline::Knot::Knot() mSpeed = 0.0f; mType = NORMAL; mPath = SPLINE; + mDistance = 0.0f; prev = NULL; next = NULL; }; @@ -46,6 +47,7 @@ CameraSpline::Knot::Knot(const Knot &k) mSpeed = k.mSpeed; mType = k.mType; mPath = k.mPath; + mDistance = k.mDistance; prev = NULL; next = NULL; } @@ -56,6 +58,7 @@ CameraSpline::Knot::Knot(const Point3F &p, const QuatF &r, F32 s, Knot::Type typ mSpeed = s; mType = type; mPath = path; + mDistance = 0.0f; prev = NULL; next = NULL; } diff --git a/Engine/source/T3D/convexShape.h b/Engine/source/T3D/convexShape.h index 6145937b7..3bbd2e657 100644 --- a/Engine/source/T3D/convexShape.h +++ b/Engine/source/T3D/convexShape.h @@ -50,7 +50,7 @@ protected: public: - ConvexShapeCollisionConvex() { mType = ConvexShapeCollisionConvexType; } + ConvexShapeCollisionConvex() { pShape = NULL; mType = ConvexShapeCollisionConvexType; } ConvexShapeCollisionConvex( const ConvexShapeCollisionConvex& cv ) { mType = ConvexShapeCollisionConvexType; @@ -297,4 +297,4 @@ protected: }; -#endif // _CONVEXSHAPE_H_ \ No newline at end of file +#endif // _CONVEXSHAPE_H_ diff --git a/Engine/source/T3D/debris.cpp b/Engine/source/T3D/debris.cpp index 24014d5c8..b581b8261 100644 --- a/Engine/source/T3D/debris.cpp +++ b/Engine/source/T3D/debris.cpp @@ -157,6 +157,9 @@ DebrisData::DebrisData(const DebrisData& other, bool temp_clone) : GameBaseData( explosion = other.explosion; dMemcpy( emitterList, other.emitterList, sizeof( emitterList ) ); dMemcpy( emitterIDList, other.emitterIDList, sizeof( emitterIDList ) ); // -- for pack/unpack of emitterList ptrs + mShatter = other.mShatter; + mProbBreak = other.mProbBreak; + mProbDepth = other.mProbDepth; } DebrisData::~DebrisData() @@ -533,6 +536,8 @@ Debris::Debris() mInitialTrans.identity(); mRadius = 0.2f; mStatic = false; + mElasticity = 0.5f; + mFriction = 0.5f; dMemset( mEmitterList, 0, sizeof( mEmitterList ) ); diff --git a/Engine/source/T3D/decal/decalInstance.cpp b/Engine/source/T3D/decal/decalInstance.cpp index 935361b6d..a0b2d8748 100644 --- a/Engine/source/T3D/decal/decalInstance.cpp +++ b/Engine/source/T3D/decal/decalInstance.cpp @@ -24,6 +24,23 @@ #include "T3D/decal/decalInstance.h" #include "scene/sceneRenderState.h" +DecalInstance::DecalInstance() + : mDataBlock(NULL), + mRotAroundNormal(0.0f), + mSize(0.0f), + mCreateTime(0), + mVisibility(1.0f), + mLastAlpha(1.0f), + mTextureRectIdx(0), + mVerts(NULL), + mIndices(NULL), + mVertCount(0), + mIndxCount(0), + mFlags(0), + mRenderPriority(0), + mId(-1), + mCustomTex(NULL) +{} void DecalInstance::getWorldMatrix( MatrixF *outMat, bool flip ) { outMat->setPosition( mPosition ); diff --git a/Engine/source/T3D/decal/decalInstance.h b/Engine/source/T3D/decal/decalInstance.h index 52402e89a..9365f4a3a 100644 --- a/Engine/source/T3D/decal/decalInstance.h +++ b/Engine/source/T3D/decal/decalInstance.h @@ -87,7 +87,7 @@ class DecalInstance /// Calculates the size of this decal onscreen in pixels, used for LOD. F32 calcPixelSize( U32 viewportHeight, const Point3F &cameraPos, F32 worldToScreenScaleY ) const; - DecalInstance() : mId(-1) {} + DecalInstance(); }; #endif // _DECALINSTANCE_H_ diff --git a/Engine/source/T3D/fx/explosion.cpp b/Engine/source/T3D/fx/explosion.cpp index 4da7b2902..6640cb9ab 100644 --- a/Engine/source/T3D/fx/explosion.cpp +++ b/Engine/source/T3D/fx/explosion.cpp @@ -238,6 +238,9 @@ ExplosionData::ExplosionData() explosionScale.set(1.0f, 1.0f, 1.0f); playSpeed = 1.0f; + explosionShape = NULL; + explosionAnimation = -1; + dMemset( emitterList, 0, sizeof( emitterList ) ); dMemset( emitterIDList, 0, sizeof( emitterIDList ) ); dMemset( debrisList, 0, sizeof( debrisList ) ); @@ -924,6 +927,7 @@ Explosion::Explosion() ss_index = 0; mDataBlock = 0; soundProfile_clone = 0; + mRandomVal = 0; } Explosion::~Explosion() diff --git a/Engine/source/T3D/fx/fxFoliageReplicator.cpp b/Engine/source/T3D/fx/fxFoliageReplicator.cpp index bd8389486..4f21482f8 100644 --- a/Engine/source/T3D/fx/fxFoliageReplicator.cpp +++ b/Engine/source/T3D/fx/fxFoliageReplicator.cpp @@ -286,6 +286,7 @@ fxFoliageReplicator::fxFoliageReplicator() // Reset Foliage Count. mCurrentFoliageCount = 0; + dMemset(&mFrustumRenderSet, 0, sizeof(mFrustumRenderSet)); // Reset Creation Area Angle Animation. mCreationAreaAngle = 0; @@ -299,8 +300,15 @@ fxFoliageReplicator::fxFoliageReplicator() // Reset Frame Serial ID. mFrameSerialID = 0; - + mQuadTreeLevels = 0; + mNextAllocatedNodeIdx = 0; mAlphaLookup = NULL; + mFadeInGradient = 0.0f; + mFadeOutGradient = 0.0f; + mGlobalSwayPhase = 0.0f; + mGlobalSwayTimeRatio = 1.0f; + mGlobalLightPhase = 0.0f; + mGlobalLightTimeRatio = 1.0f; mDirty = true; @@ -317,6 +325,8 @@ fxFoliageReplicator::fxFoliageReplicator() mFoliageShaderTrueBillboardSC = NULL; mFoliageShaderGroundAlphaSC = NULL; mFoliageShaderAmbientColorSC = NULL; + mDiffuseTextureSC = NULL; + mAlphaMapTextureSC = NULL; mShaderData = NULL; } diff --git a/Engine/source/T3D/fx/lightning.cpp b/Engine/source/T3D/fx/lightning.cpp index 3aef6acf4..e808fb406 100644 --- a/Engine/source/T3D/fx/lightning.cpp +++ b/Engine/source/T3D/fx/lightning.cpp @@ -248,7 +248,7 @@ LightningData::LightningData() strikeTextureNames[i] = NULL; strikeTextures[i] = NULL; } - + numThunders = 0; mNumStrikeTextures = 0; } @@ -371,6 +371,7 @@ Lightning::Lightning() mNetFlags.set(Ghostable|ScopeAlways); mTypeMask |= StaticObjectType|EnvironmentObjectType; + mDataBlock = NULL; mLastThink = 0; mStrikeListHead = NULL; @@ -1041,6 +1042,8 @@ LightningBolt::LightningBolt() maxMinorAngle = 15.0f; fadeTime = 0.2f; renderTime = 0.125; + dMemset(&mMajorNodes, 0, sizeof(mMajorNodes)); + percentFade = 0.0f; } //-------------------------------------------------------------------------- diff --git a/Engine/source/T3D/fx/particleEmitter.cpp b/Engine/source/T3D/fx/particleEmitter.cpp index f5b705bd5..5cbe35409 100644 --- a/Engine/source/T3D/fx/particleEmitter.cpp +++ b/Engine/source/T3D/fx/particleEmitter.cpp @@ -846,6 +846,7 @@ ParticleEmitterData::ParticleEmitterData(const ParticleEmitterData& other, bool textureName = other.textureName; textureHandle = other.textureHandle; // -- TextureHandle loads using textureName highResOnly = other.highResOnly; + glow = other.glow; renderReflection = other.renderReflection; fade_color = other.fade_color; fade_size = other.fade_size; @@ -965,7 +966,7 @@ ParticleEmitter::ParticleEmitter() pos_pe.set(0,0,0); sort_priority = 0; mDataBlock = 0; - + std::fill_n(sizes, ParticleData::PDC_NUM_KEYS, 0.0f); #if defined(AFX_CAP_PARTICLE_POOLS) pool = 0; #endif diff --git a/Engine/source/T3D/fx/ribbon.cpp b/Engine/source/T3D/fx/ribbon.cpp index a3d788590..42fa1e63e 100644 --- a/Engine/source/T3D/fx/ribbon.cpp +++ b/Engine/source/T3D/fx/ribbon.cpp @@ -170,6 +170,7 @@ void RibbonData::unpackData(BitStream* stream) // Ribbon::Ribbon() { + mDataBlock = NULL; mTypeMask |= StaticObjectType; VECTOR_SET_ASSOCIATION(mSegmentPoints); diff --git a/Engine/source/T3D/fx/ribbonNode.h b/Engine/source/T3D/fx/ribbonNode.h index cdd86ef33..d4be52fa8 100644 --- a/Engine/source/T3D/fx/ribbonNode.h +++ b/Engine/source/T3D/fx/ribbonNode.h @@ -37,9 +37,6 @@ class RibbonNodeData : public GameBaseData { typedef GameBaseData Parent; -public: - F32 timeMultiple; - public: RibbonNodeData(); ~RibbonNodeData(); diff --git a/Engine/source/T3D/fx/splash.cpp b/Engine/source/T3D/fx/splash.cpp index 812c1bb2f..d77c46edb 100644 --- a/Engine/source/T3D/fx/splash.cpp +++ b/Engine/source/T3D/fx/splash.cpp @@ -309,6 +309,7 @@ Splash::Splash() mDelayMS = 0; mCurrMS = 0; + mRandAngle = 0; mEndingMS = 1000; mActive = false; mRadius = 0.0; @@ -319,7 +320,8 @@ Splash::Splash() mElapsedTime = 0.0; mInitialNormal.set( 0.0, 0.0, 1.0 ); - + mFade = 0; + mFog = 0; // Only allocated client side. mNetFlags.set( IsGhost ); } diff --git a/Engine/source/T3D/gameBase/gameBase.cpp b/Engine/source/T3D/gameBase/gameBase.cpp index 3d0e8bd1e..a1616751a 100644 --- a/Engine/source/T3D/gameBase/gameBase.cpp +++ b/Engine/source/T3D/gameBase/gameBase.cpp @@ -254,6 +254,8 @@ GameBase::GameBase() mTicksSinceLastMove = 0; mIsAiControlled = false; #endif + mTickCount = 0; + mCameraFov = 90.f; } GameBase::~GameBase() diff --git a/Engine/source/T3D/gameBase/moveList.cpp b/Engine/source/T3D/gameBase/moveList.cpp index c4eea88ee..f91ff291c 100644 --- a/Engine/source/T3D/gameBase/moveList.cpp +++ b/Engine/source/T3D/gameBase/moveList.cpp @@ -26,6 +26,7 @@ MoveList::MoveList() { + mConnection = NULL; mControlMismatch = false; reset(); } diff --git a/Engine/source/T3D/guiMaterialPreview.cpp b/Engine/source/T3D/guiMaterialPreview.cpp index 05d42b87f..ad1de4c2d 100644 --- a/Engine/source/T3D/guiMaterialPreview.cpp +++ b/Engine/source/T3D/guiMaterialPreview.cpp @@ -61,6 +61,8 @@ GuiMaterialPreview::GuiMaterialPreview() // By default don't do dynamic reflection // updates for this viewport. mReflectPriority = 0.0f; + mMountedModel = NULL; + mSkinTag = 0; } GuiMaterialPreview::~GuiMaterialPreview() diff --git a/Engine/source/T3D/physics/physicsForce.cpp b/Engine/source/T3D/physics/physicsForce.cpp index a8f16dca5..a64cf71f7 100644 --- a/Engine/source/T3D/physics/physicsForce.cpp +++ b/Engine/source/T3D/physics/physicsForce.cpp @@ -43,6 +43,7 @@ ConsoleDocClass( PhysicsForce, PhysicsForce::PhysicsForce() : mWorld( NULL ), + mForce(0.0f), mPhysicsTick( false ), mBody( NULL ) { diff --git a/Engine/source/T3D/player.cpp b/Engine/source/T3D/player.cpp index 06ec7171a..91444bb53 100644 --- a/Engine/source/T3D/player.cpp +++ b/Engine/source/T3D/player.cpp @@ -311,6 +311,11 @@ PlayerData::PlayerData() jumpEnergyDrain = 0.0f; minJumpEnergy = 0.0f; jumpSurfaceAngle = 78.0f; + jumpSurfaceCos = mCos(mDegToRad(jumpSurfaceAngle)); + + for (U32 i = 0; i < NumRecoilSequences; i++) + recoilSequence[i] = -1; + jumpDelay = 30; minJumpSpeed = 500.0f; maxJumpSpeed = 2.0f * minJumpSpeed; @@ -370,6 +375,9 @@ PlayerData::PlayerData() actionCount = 0; lookAction = 0; + dMemset(spineNode, 0, sizeof(spineNode)); + + pickupDelta = 0.0f; // size of bounding box boxSize.set(1.0f, 1.0f, 2.3f); diff --git a/Engine/source/T3D/rigidShape.cpp b/Engine/source/T3D/rigidShape.cpp index e2ba4606c..005ef8c98 100644 --- a/Engine/source/T3D/rigidShape.cpp +++ b/Engine/source/T3D/rigidShape.cpp @@ -253,6 +253,7 @@ RigidShapeData::RigidShapeData() dustEmitter = NULL; dustID = 0; + triggerDustHeight = 3.0; dustHeight = 1.0; dMemset( splashEmitterList, 0, sizeof( splashEmitterList ) ); diff --git a/Engine/source/T3D/shapeBase.h b/Engine/source/T3D/shapeBase.h index 364d1cbe7..71b221036 100644 --- a/Engine/source/T3D/shapeBase.h +++ b/Engine/source/T3D/shapeBase.h @@ -111,7 +111,7 @@ class ShapeBaseConvex : public Convex Box3F box; public: - ShapeBaseConvex() { mType = ShapeBaseConvexType; nodeTransform = 0; } + ShapeBaseConvex() :pShapeBase(NULL), transform(NULL), hullId(NULL), nodeTransform(0) { mType = ShapeBaseConvexType; } ShapeBaseConvex(const ShapeBaseConvex& cv) { mObject = cv.mObject; pShapeBase = cv.pShapeBase; diff --git a/Engine/source/T3D/shapeImage.cpp b/Engine/source/T3D/shapeImage.cpp index a12be19c2..8293b24a0 100644 --- a/Engine/source/T3D/shapeImage.cpp +++ b/Engine/source/T3D/shapeImage.cpp @@ -134,6 +134,8 @@ ShapeBaseImageData::StateData::StateData() recoil = NoRecoil; sound = 0; emitter = NULL; + shapeSequence = NULL; + shapeSequenceScale = true; script = 0; ignoreLoadedForReady = false; @@ -1396,6 +1398,7 @@ ShapeBase::MountedImage::MountedImage() dataBlock = 0; nextImage = InvalidImagePtr; delayTime = 0; + rDT = 0.0f; ammo = false; target = false; triggerDown = false; @@ -1408,6 +1411,7 @@ ShapeBase::MountedImage::MountedImage() motion = false; lightStart = 0; lightInfo = NULL; + dMemset(emitter, 0, sizeof(emitter)); for (U32 i=0; i