diff --git a/Engine/source/T3D/fx/lightning.cpp b/Engine/source/T3D/fx/lightning.cpp index c951f022e..3aef6acf4 100644 --- a/Engine/source/T3D/fx/lightning.cpp +++ b/Engine/source/T3D/fx/lightning.cpp @@ -1033,6 +1033,14 @@ 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; } //-------------------------------------------------------------------------- diff --git a/Engine/source/afx/afxCamera.h b/Engine/source/afx/afxCamera.h index 957f182f6..e04afaa13 100644 --- a/Engine/source/afx/afxCamera.h +++ b/Engine/source/afx/afxCamera.h @@ -147,8 +147,6 @@ public: DECLARE_CATEGORY("AFX"); private: // 3POV SECTION - U32 mBlockers_mask_3pov; - void cam_update_3pov(F32 dt, bool on_server); bool avoid_blocked_view(const Point3F& start, const Point3F& end, Point3F& newpos); bool test_blocked_line(const Point3F& start, const Point3F& end); diff --git a/Engine/source/afx/afxConstraint.cpp b/Engine/source/afx/afxConstraint.cpp index a739148f5..e2d4e0321 100644 --- a/Engine/source/afx/afxConstraint.cpp +++ b/Engine/source/afx/afxConstraint.cpp @@ -1904,6 +1904,9 @@ afxEffectConstraint::afxEffectConstraint(afxConstraintMgr* mgr) { mEffect_name = ST_NULLSTRING; mEffect = 0; + mClip_tag = 0; + mIs_death_clip = false; + mLock_tag = 0; } afxEffectConstraint::afxEffectConstraint(afxConstraintMgr* mgr, StringTableEntry effect_name) @@ -1911,6 +1914,9 @@ afxEffectConstraint::afxEffectConstraint(afxConstraintMgr* mgr, StringTableEntry { mEffect_name = effect_name; mEffect = 0; + mClip_tag = 0; + mIs_death_clip = false; + mLock_tag = 0; } afxEffectConstraint::~afxEffectConstraint() diff --git a/Engine/source/afx/afxEffectVector.cpp b/Engine/source/afx/afxEffectVector.cpp index 5de0a5e40..a364a2688 100644 --- a/Engine/source/afx/afxEffectVector.cpp +++ b/Engine/source/afx/afxEffectVector.cpp @@ -98,6 +98,7 @@ afxEffectVector::afxEffectVector() mOn_server = false; mTotal_fx_dur = 0; mAfter_life = 0; + mPhrase_dur = 0; } afxEffectVector::~afxEffectVector() diff --git a/Engine/source/afx/afxEffectWrapper.h b/Engine/source/afx/afxEffectWrapper.h index 79459f76f..37a0e9fcb 100644 --- a/Engine/source/afx/afxEffectWrapper.h +++ b/Engine/source/afx/afxEffectWrapper.h @@ -298,8 +298,6 @@ protected: bool mIn_scope; bool mIs_aborted; - U8 mEffect_flags; - afxXM_Base* mXfm_modifiers[MAX_XFM_MODIFIERS]; F32 mLive_scale_factor; diff --git a/Engine/source/afx/afxMagicMissile.cpp b/Engine/source/afx/afxMagicMissile.cpp index 87d919510..2c4d9e64d 100644 --- a/Engine/source/afx/afxMagicMissile.cpp +++ b/Engine/source/afx/afxMagicMissile.cpp @@ -168,13 +168,14 @@ afxMagicMissileData::afxMagicMissileData() impactForce = 0.0f; armingDelay = 0; - fadeDelay = 20000 / 32; - lifetime = 20000 / 32; activateSeq = -1; maintainSeq = -1; */ + lifetime = 20000 / 32; + fadeDelay = 20000 / 32; + gravityMod = 1.0; /* From stock Projectile code... bounceElasticity = 0.999f; diff --git a/Engine/source/afx/afxZodiacGroundPlaneRenderer_T3D.cpp b/Engine/source/afx/afxZodiacGroundPlaneRenderer_T3D.cpp index 442751a1f..0e1ad2a71 100644 --- a/Engine/source/afx/afxZodiacGroundPlaneRenderer_T3D.cpp +++ b/Engine/source/afx/afxZodiacGroundPlaneRenderer_T3D.cpp @@ -58,6 +58,10 @@ afxZodiacGroundPlaneRenderer::afxZodiacGroundPlaneRenderer() if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacGroundPlaneRenderer::afxZodiacGroundPlaneRenderer(F32 renderOrder, F32 processAddOrder) @@ -66,6 +70,10 @@ afxZodiacGroundPlaneRenderer::afxZodiacGroundPlaneRenderer(F32 renderOrder, F32 if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacGroundPlaneRenderer::~afxZodiacGroundPlaneRenderer() diff --git a/Engine/source/afx/afxZodiacMeshRoadRenderer_T3D.cpp b/Engine/source/afx/afxZodiacMeshRoadRenderer_T3D.cpp index cafb3dca7..30af55b02 100644 --- a/Engine/source/afx/afxZodiacMeshRoadRenderer_T3D.cpp +++ b/Engine/source/afx/afxZodiacMeshRoadRenderer_T3D.cpp @@ -58,6 +58,10 @@ afxZodiacMeshRoadRenderer::afxZodiacMeshRoadRenderer() if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacMeshRoadRenderer::afxZodiacMeshRoadRenderer(F32 renderOrder, F32 processAddOrder) @@ -66,6 +70,10 @@ afxZodiacMeshRoadRenderer::afxZodiacMeshRoadRenderer(F32 renderOrder, F32 proces if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacMeshRoadRenderer::~afxZodiacMeshRoadRenderer() diff --git a/Engine/source/afx/afxZodiacPolysoupRenderer_T3D.cpp b/Engine/source/afx/afxZodiacPolysoupRenderer_T3D.cpp index 84d55a092..63e17b12e 100644 --- a/Engine/source/afx/afxZodiacPolysoupRenderer_T3D.cpp +++ b/Engine/source/afx/afxZodiacPolysoupRenderer_T3D.cpp @@ -58,6 +58,10 @@ afxZodiacPolysoupRenderer::afxZodiacPolysoupRenderer() if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacPolysoupRenderer::afxZodiacPolysoupRenderer(F32 renderOrder, F32 processAddOrder) @@ -66,6 +70,10 @@ afxZodiacPolysoupRenderer::afxZodiacPolysoupRenderer(F32 renderOrder, F32 proces if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacPolysoupRenderer::~afxZodiacPolysoupRenderer() diff --git a/Engine/source/afx/afxZodiacTerrainRenderer_T3D.cpp b/Engine/source/afx/afxZodiacTerrainRenderer_T3D.cpp index 651a0fad0..aafc17020 100644 --- a/Engine/source/afx/afxZodiacTerrainRenderer_T3D.cpp +++ b/Engine/source/afx/afxZodiacTerrainRenderer_T3D.cpp @@ -68,6 +68,10 @@ afxZodiacTerrainRenderer::afxZodiacTerrainRenderer() if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacTerrainRenderer::afxZodiacTerrainRenderer(F32 renderOrder, F32 processAddOrder) @@ -76,6 +80,10 @@ afxZodiacTerrainRenderer::afxZodiacTerrainRenderer(F32 renderOrder, F32 processA if (!master) master = this; shader_initialized = false; + zodiac_shader = NULL; + shader_consts = NULL; + projection_sc = NULL; + color_sc = NULL; } afxZodiacTerrainRenderer::~afxZodiacTerrainRenderer() diff --git a/Engine/source/afx/ce/afxModel.cpp b/Engine/source/afx/ce/afxModel.cpp index 6962aea51..95a190deb 100644 --- a/Engine/source/afx/ce/afxModel.cpp +++ b/Engine/source/afx/ce/afxModel.cpp @@ -105,6 +105,11 @@ afxModelData::afxModelData(const afxModelData& other, bool temp_clone) : GameBas customAmbientForSelfIllumination = other.customAmbientForSelfIllumination; customAmbientLighting = other.customAmbientLighting; shadowEnable = other.shadowEnable; + + shadowSize = other.shadowSize; + shadowMaxVisibleDistance = other.shadowMaxVisibleDistance; + shadowProjectionDistance = other.shadowProjectionDistance; + shadowSphereAdjust = other.shadowSphereAdjust; } afxModelData::~afxModelData() @@ -360,7 +365,7 @@ afxModel::afxModel() fade_amt = 1.0f; is_visible = true; sort_priority = 0; - + mDataBlock = NULL; mNetFlags.set( IsGhost ); } diff --git a/Engine/source/afx/ce/afxMooring.cpp b/Engine/source/afx/ce/afxMooring.cpp index b9cda9ec7..9adf47526 100644 --- a/Engine/source/afx/ce/afxMooring.cpp +++ b/Engine/source/afx/ce/afxMooring.cpp @@ -133,6 +133,7 @@ afxMooring::afxMooring() chor_id = 0; hookup_with_chor = false; ghost_cons_name = ST_NULLSTRING; + mDataBlock = NULL; } afxMooring::afxMooring(U32 networking, U32 chor_id, StringTableEntry cons_name) @@ -160,6 +161,7 @@ afxMooring::afxMooring(U32 networking, U32 chor_id, StringTableEntry cons_name) this->chor_id = chor_id; hookup_with_chor = false; this->ghost_cons_name = cons_name; + mDataBlock = NULL; } afxMooring::~afxMooring() @@ -275,4 +277,4 @@ void afxMooring::onRemove() Parent::onRemove(); } -//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// \ No newline at end of file +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Engine/source/afx/ce/afxParticleEmitter.cpp b/Engine/source/afx/ce/afxParticleEmitter.cpp index 1d76b2475..c34bd5510 100644 --- a/Engine/source/afx/ce/afxParticleEmitter.cpp +++ b/Engine/source/afx/ce/afxParticleEmitter.cpp @@ -687,6 +687,7 @@ bool afxParticleEmitterDiscData::preload(bool server, String &errorStr) afxParticleEmitter::afxParticleEmitter() { + mDataBlock = NULL; pe_vector.set(0,0,1); pe_vector_norm.set(0,0,1); tpaths.clear(); @@ -1086,6 +1087,7 @@ void afxParticleEmitter::emitParticlesExt(const MatrixF& xfm, const Point3F& poi afxParticleEmitterVector::afxParticleEmitterVector() { + mDataBlock = NULL; } afxParticleEmitterVector::~afxParticleEmitterVector() @@ -1151,6 +1153,7 @@ void afxParticleEmitterVector::sub_preCompute(const MatrixF& mat) afxParticleEmitterCone::afxParticleEmitterCone() { + mDataBlock = NULL; cone_v.set(0,0,1); cone_s0.set(0,0,1); cone_s1.set(0,0,1); @@ -1266,6 +1269,7 @@ void afxParticleEmitterCone::sub_preCompute(const MatrixF& mat) afxParticleEmitterPath::afxParticleEmitterPath() { + mDataBlock = NULL; epaths.clear(); epath_mults.clear(); n_epath_points = 0; @@ -1521,6 +1525,7 @@ void afxParticleEmitterPath::groundConformPoint(Point3F& point, const MatrixF& m afxParticleEmitterDisc::afxParticleEmitterDisc() { + mDataBlock = NULL; disc_v.set(0,0,1); disc_r.set(1,0,0); } diff --git a/Engine/source/afx/ce/afxStaticShape.cpp b/Engine/source/afx/ce/afxStaticShape.cpp index 4bef19629..ffe731b55 100644 --- a/Engine/source/afx/ce/afxStaticShape.cpp +++ b/Engine/source/afx/ce/afxStaticShape.cpp @@ -122,6 +122,7 @@ ConsoleDocClass( afxStaticShape, afxStaticShape::afxStaticShape() { + mDataBlock = NULL; mAFX_data = 0; mIs_visible = true; mChor_id = 0; @@ -238,4 +239,4 @@ void afxStaticShape::prepRenderImage(SceneRenderState* state) Parent::prepRenderImage(state); } -//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// \ No newline at end of file +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Engine/source/afx/ce/afxZodiac.cpp b/Engine/source/afx/ce/afxZodiac.cpp index 3b1e976d2..62f6996ae 100644 --- a/Engine/source/afx/ce/afxZodiac.cpp +++ b/Engine/source/afx/ce/afxZodiac.cpp @@ -114,6 +114,7 @@ afxZodiacData::afxZodiacData() grade_range_user.set(0.0f, 45.0f); afxZodiacData::convertGradientRangeFromDegrees(grade_range, grade_range_user); inv_grade_range = false; + zflags = 0; } afxZodiacData::afxZodiacData(const afxZodiacData& other, bool temp_clone) : GameBaseData(other, temp_clone) diff --git a/Engine/source/afx/ce/afxZodiacPlane.cpp b/Engine/source/afx/ce/afxZodiacPlane.cpp index 2a4740298..7af581f2f 100644 --- a/Engine/source/afx/ce/afxZodiacPlane.cpp +++ b/Engine/source/afx/ce/afxZodiacPlane.cpp @@ -61,7 +61,7 @@ afxZodiacPlaneData::afxZodiacPlaneData() color.set(1,1,1,1); blend_flags = BLEND_NORMAL; respect_ori_cons = false; - + zflags = 0; double_sided = true; face_dir = FACES_UP; use_full_xfm = false; @@ -310,4 +310,4 @@ void afxZodiacPlane::onRemove() Parent::onRemove(); } -//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// \ No newline at end of file +//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~// diff --git a/Engine/source/afx/ea/afxEA_PhraseEffect.cpp b/Engine/source/afx/ea/afxEA_PhraseEffect.cpp index 1e14d2c6a..84a75ee7e 100644 --- a/Engine/source/afx/ea/afxEA_PhraseEffect.cpp +++ b/Engine/source/afx/ea/afxEA_PhraseEffect.cpp @@ -75,6 +75,7 @@ afxEA_PhraseEffect::afxEA_PhraseEffect() { phrase_fx_data = 0; active_phrases = &_phrases_a; + last_trigger_mask = 0; } afxEA_PhraseEffect::~afxEA_PhraseEffect() diff --git a/Engine/source/afx/forces/afxF_Drag.cpp b/Engine/source/afx/forces/afxF_Drag.cpp index 7fb52deb1..f006fc2ad 100644 --- a/Engine/source/afx/forces/afxF_Drag.cpp +++ b/Engine/source/afx/forces/afxF_Drag.cpp @@ -60,7 +60,7 @@ class afxF_Drag : public afxForce typedef afxForce Parent; private: - afxF_DragData* datablock; + afxF_DragData* mDatablock; F32 air_friction_constant; public: @@ -149,13 +149,14 @@ afxForceData* afxF_DragData::cloneAndPerformSubstitutions(const SimObject* owner afxF_Drag::afxF_Drag() : afxForce() { + mDatablock = NULL; air_friction_constant = 1.0f; } bool afxF_Drag::onNewDataBlock(afxForceData* dptr, bool reload) { - datablock = dynamic_cast(dptr); - if (!datablock || !Parent::onNewDataBlock(dptr, reload)) + mDatablock = dynamic_cast(dptr); + if (!mDatablock || !Parent::onNewDataBlock(dptr, reload)) return false; return true; @@ -163,9 +164,9 @@ bool afxF_Drag::onNewDataBlock(afxForceData* dptr, bool reload) void afxF_Drag::start() { - air_friction_constant = 0.5f * datablock->drag_coefficient - * datablock->air_density - * datablock->cross_sectional_area; + air_friction_constant = 0.5f * mDatablock->drag_coefficient + * mDatablock->air_density + * mDatablock->cross_sectional_area; //Con::printf("Air Friction: %f", air_friction_constant); } diff --git a/Engine/source/afx/forces/afxF_Gravity.cpp b/Engine/source/afx/forces/afxF_Gravity.cpp index fc5ed1d80..cbe9e6ad2 100644 --- a/Engine/source/afx/forces/afxF_Gravity.cpp +++ b/Engine/source/afx/forces/afxF_Gravity.cpp @@ -58,7 +58,7 @@ class afxF_Gravity : public afxForce typedef afxForce Parent; private: - afxF_GravityData* datablock; + afxF_GravityData* mDatablock; public: /*C*/ afxF_Gravity(); @@ -133,12 +133,13 @@ afxForceData* afxF_GravityData::cloneAndPerformSubstitutions(const SimObject* ow afxF_Gravity::afxF_Gravity() : afxForce() { + mDatablock = NULL; } bool afxF_Gravity::onNewDataBlock(afxForceData* dptr, bool reload) { - datablock = dynamic_cast(dptr); - if (!datablock || !Parent::onNewDataBlock(dptr, reload)) + mDatablock = dynamic_cast(dptr); + if (!mDatablock || !Parent::onNewDataBlock(dptr, reload)) return false; return true; @@ -146,7 +147,7 @@ bool afxF_Gravity::onNewDataBlock(afxForceData* dptr, bool reload) Point3F afxF_Gravity::evaluate(Point3F pos, Point3F v, F32 mass) { - return Point3F(0,0,-datablock->gravity)*mass; + return Point3F(0,0,-mDatablock->gravity)*mass; } diff --git a/Engine/source/afx/util/afxAnimCurve.cpp b/Engine/source/afx/util/afxAnimCurve.cpp index 4074c15d7..2343bf9f8 100644 --- a/Engine/source/afx/util/afxAnimCurve.cpp +++ b/Engine/source/afx/util/afxAnimCurve.cpp @@ -29,6 +29,8 @@ afxAnimCurve::afxAnimCurve() : usable( false ), final_value( 0.0f ), start_value( 0.0f ) { evaluator = new afxHermiteEval(); + final_time = 0.0f; + start_time = 0.0f; } afxAnimCurve::~afxAnimCurve() @@ -277,4 +279,4 @@ void afxAnimCurve::printKey( int index ) { Key &k = keys[index]; Con::printf( "%f: %f", k.time, k.value ); -} \ No newline at end of file +} diff --git a/Engine/source/afx/util/afxCurve3D.cpp b/Engine/source/afx/util/afxCurve3D.cpp index 860cb4c4a..798cf71f4 100644 --- a/Engine/source/afx/util/afxCurve3D.cpp +++ b/Engine/source/afx/util/afxCurve3D.cpp @@ -27,7 +27,7 @@ #include "afx/util/afxCurveEval.h" #include "afx/util/afxCurve3D.h" -afxCurve3D::afxCurve3D() : usable( false ), default_vector( 0, 0, 0 ) +afxCurve3D::afxCurve3D() : usable( false ), default_vector( 0, 0, 0 ), flip(false) { evaluator = new afxHermiteEval(); } @@ -329,4 +329,4 @@ void afxCurve3D::print() Con::printf( "%f: %f %f %f", p.parameter, p.point.x, p.point.y, p.point.z ); } Con::printf( "---------------------------------" ); -} \ No newline at end of file +} diff --git a/Engine/source/afx/util/afxPath3D.cpp b/Engine/source/afx/util/afxPath3D.cpp index 5997bdc12..c82717ee0 100644 --- a/Engine/source/afx/util/afxPath3D.cpp +++ b/Engine/source/afx/util/afxPath3D.cpp @@ -29,7 +29,7 @@ #include "afx/util/afxPath3D.h" -afxPath3D::afxPath3D() : mStart_time(0), mNum_points(0), mLoop_type(LOOP_CONSTANT) +afxPath3D::afxPath3D() : mStart_time(0), mNum_points(0), mLoop_type(LOOP_CONSTANT), mEnd_time(0.0f) { }