Merge pull request #162 from Azaezel/alph40_cleanups

Alph40 cleanups -uninitialized vars batch 1
This commit is contained in:
Areloch 2020-05-17 01:19:55 -05:00 committed by GitHub
commit b14a4af654
278 changed files with 982 additions and 401 deletions

View file

@ -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()

View file

@ -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;
}

View file

@ -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;
@ -1033,6 +1034,16 @@ LightningBolt::LightningBolt()
elapsedTime = 0.0f;
lifetime = 1.0f;
startRender = false;
endPoint.zero();
width = 1;
numMajorNodes = 10;
maxMajorAngle = 30.0f;
numMinorNodes = 4;
maxMinorAngle = 15.0f;
fadeTime = 0.2f;
renderTime = 0.125;
dMemset(&mMajorNodes, 0, sizeof(mMajorNodes));
percentFade = 0.0f;
}
//--------------------------------------------------------------------------

View file

@ -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

View file

@ -170,6 +170,7 @@ void RibbonData::unpackData(BitStream* stream)
//
Ribbon::Ribbon()
{
mDataBlock = NULL;
mTypeMask |= StaticObjectType;
VECTOR_SET_ASSOCIATION(mSegmentPoints);

View file

@ -37,9 +37,6 @@ class RibbonNodeData : public GameBaseData
{
typedef GameBaseData Parent;
public:
F32 timeMultiple;
public:
RibbonNodeData();
~RibbonNodeData();

View file

@ -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 );
}