mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-29 16:25:42 +00:00
uninitialized variables-afx
This commit is contained in:
parent
157b114ec7
commit
3c0360fd2f
22 changed files with 88 additions and 25 deletions
|
|
@ -1033,6 +1033,14 @@ LightningBolt::LightningBolt()
|
||||||
elapsedTime = 0.0f;
|
elapsedTime = 0.0f;
|
||||||
lifetime = 1.0f;
|
lifetime = 1.0f;
|
||||||
startRender = false;
|
startRender = false;
|
||||||
|
endPoint.zero();
|
||||||
|
width = 1;
|
||||||
|
numMajorNodes = 10;
|
||||||
|
maxMajorAngle = 30.0f;
|
||||||
|
numMinorNodes = 4;
|
||||||
|
maxMinorAngle = 15.0f;
|
||||||
|
fadeTime = 0.2f;
|
||||||
|
renderTime = 0.125;
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------
|
//--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -147,8 +147,6 @@ public:
|
||||||
DECLARE_CATEGORY("AFX");
|
DECLARE_CATEGORY("AFX");
|
||||||
|
|
||||||
private: // 3POV SECTION
|
private: // 3POV SECTION
|
||||||
U32 mBlockers_mask_3pov;
|
|
||||||
|
|
||||||
void cam_update_3pov(F32 dt, bool on_server);
|
void cam_update_3pov(F32 dt, bool on_server);
|
||||||
bool avoid_blocked_view(const Point3F& start, const Point3F& end, Point3F& newpos);
|
bool avoid_blocked_view(const Point3F& start, const Point3F& end, Point3F& newpos);
|
||||||
bool test_blocked_line(const Point3F& start, const Point3F& end);
|
bool test_blocked_line(const Point3F& start, const Point3F& end);
|
||||||
|
|
|
||||||
|
|
@ -1904,6 +1904,9 @@ afxEffectConstraint::afxEffectConstraint(afxConstraintMgr* mgr)
|
||||||
{
|
{
|
||||||
mEffect_name = ST_NULLSTRING;
|
mEffect_name = ST_NULLSTRING;
|
||||||
mEffect = 0;
|
mEffect = 0;
|
||||||
|
mClip_tag = 0;
|
||||||
|
mIs_death_clip = false;
|
||||||
|
mLock_tag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxEffectConstraint::afxEffectConstraint(afxConstraintMgr* mgr, StringTableEntry effect_name)
|
afxEffectConstraint::afxEffectConstraint(afxConstraintMgr* mgr, StringTableEntry effect_name)
|
||||||
|
|
@ -1911,6 +1914,9 @@ afxEffectConstraint::afxEffectConstraint(afxConstraintMgr* mgr, StringTableEntry
|
||||||
{
|
{
|
||||||
mEffect_name = effect_name;
|
mEffect_name = effect_name;
|
||||||
mEffect = 0;
|
mEffect = 0;
|
||||||
|
mClip_tag = 0;
|
||||||
|
mIs_death_clip = false;
|
||||||
|
mLock_tag = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxEffectConstraint::~afxEffectConstraint()
|
afxEffectConstraint::~afxEffectConstraint()
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,7 @@ afxEffectVector::afxEffectVector()
|
||||||
mOn_server = false;
|
mOn_server = false;
|
||||||
mTotal_fx_dur = 0;
|
mTotal_fx_dur = 0;
|
||||||
mAfter_life = 0;
|
mAfter_life = 0;
|
||||||
|
mPhrase_dur = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxEffectVector::~afxEffectVector()
|
afxEffectVector::~afxEffectVector()
|
||||||
|
|
|
||||||
|
|
@ -298,8 +298,6 @@ protected:
|
||||||
bool mIn_scope;
|
bool mIn_scope;
|
||||||
bool mIs_aborted;
|
bool mIs_aborted;
|
||||||
|
|
||||||
U8 mEffect_flags;
|
|
||||||
|
|
||||||
afxXM_Base* mXfm_modifiers[MAX_XFM_MODIFIERS];
|
afxXM_Base* mXfm_modifiers[MAX_XFM_MODIFIERS];
|
||||||
|
|
||||||
F32 mLive_scale_factor;
|
F32 mLive_scale_factor;
|
||||||
|
|
|
||||||
|
|
@ -168,13 +168,14 @@ afxMagicMissileData::afxMagicMissileData()
|
||||||
impactForce = 0.0f;
|
impactForce = 0.0f;
|
||||||
|
|
||||||
armingDelay = 0;
|
armingDelay = 0;
|
||||||
fadeDelay = 20000 / 32;
|
|
||||||
lifetime = 20000 / 32;
|
|
||||||
|
|
||||||
activateSeq = -1;
|
activateSeq = -1;
|
||||||
maintainSeq = -1;
|
maintainSeq = -1;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
lifetime = 20000 / 32;
|
||||||
|
fadeDelay = 20000 / 32;
|
||||||
|
|
||||||
gravityMod = 1.0;
|
gravityMod = 1.0;
|
||||||
/* From stock Projectile code...
|
/* From stock Projectile code...
|
||||||
bounceElasticity = 0.999f;
|
bounceElasticity = 0.999f;
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ afxZodiacGroundPlaneRenderer::afxZodiacGroundPlaneRenderer()
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacGroundPlaneRenderer::afxZodiacGroundPlaneRenderer(F32 renderOrder, F32 processAddOrder)
|
afxZodiacGroundPlaneRenderer::afxZodiacGroundPlaneRenderer(F32 renderOrder, F32 processAddOrder)
|
||||||
|
|
@ -66,6 +70,10 @@ afxZodiacGroundPlaneRenderer::afxZodiacGroundPlaneRenderer(F32 renderOrder, F32
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacGroundPlaneRenderer::~afxZodiacGroundPlaneRenderer()
|
afxZodiacGroundPlaneRenderer::~afxZodiacGroundPlaneRenderer()
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ afxZodiacMeshRoadRenderer::afxZodiacMeshRoadRenderer()
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacMeshRoadRenderer::afxZodiacMeshRoadRenderer(F32 renderOrder, F32 processAddOrder)
|
afxZodiacMeshRoadRenderer::afxZodiacMeshRoadRenderer(F32 renderOrder, F32 processAddOrder)
|
||||||
|
|
@ -66,6 +70,10 @@ afxZodiacMeshRoadRenderer::afxZodiacMeshRoadRenderer(F32 renderOrder, F32 proces
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacMeshRoadRenderer::~afxZodiacMeshRoadRenderer()
|
afxZodiacMeshRoadRenderer::~afxZodiacMeshRoadRenderer()
|
||||||
|
|
|
||||||
|
|
@ -58,6 +58,10 @@ afxZodiacPolysoupRenderer::afxZodiacPolysoupRenderer()
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacPolysoupRenderer::afxZodiacPolysoupRenderer(F32 renderOrder, F32 processAddOrder)
|
afxZodiacPolysoupRenderer::afxZodiacPolysoupRenderer(F32 renderOrder, F32 processAddOrder)
|
||||||
|
|
@ -66,6 +70,10 @@ afxZodiacPolysoupRenderer::afxZodiacPolysoupRenderer(F32 renderOrder, F32 proces
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacPolysoupRenderer::~afxZodiacPolysoupRenderer()
|
afxZodiacPolysoupRenderer::~afxZodiacPolysoupRenderer()
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,10 @@ afxZodiacTerrainRenderer::afxZodiacTerrainRenderer()
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacTerrainRenderer::afxZodiacTerrainRenderer(F32 renderOrder, F32 processAddOrder)
|
afxZodiacTerrainRenderer::afxZodiacTerrainRenderer(F32 renderOrder, F32 processAddOrder)
|
||||||
|
|
@ -76,6 +80,10 @@ afxZodiacTerrainRenderer::afxZodiacTerrainRenderer(F32 renderOrder, F32 processA
|
||||||
if (!master)
|
if (!master)
|
||||||
master = this;
|
master = this;
|
||||||
shader_initialized = false;
|
shader_initialized = false;
|
||||||
|
zodiac_shader = NULL;
|
||||||
|
shader_consts = NULL;
|
||||||
|
projection_sc = NULL;
|
||||||
|
color_sc = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacTerrainRenderer::~afxZodiacTerrainRenderer()
|
afxZodiacTerrainRenderer::~afxZodiacTerrainRenderer()
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,11 @@ afxModelData::afxModelData(const afxModelData& other, bool temp_clone) : GameBas
|
||||||
customAmbientForSelfIllumination = other.customAmbientForSelfIllumination;
|
customAmbientForSelfIllumination = other.customAmbientForSelfIllumination;
|
||||||
customAmbientLighting = other.customAmbientLighting;
|
customAmbientLighting = other.customAmbientLighting;
|
||||||
shadowEnable = other.shadowEnable;
|
shadowEnable = other.shadowEnable;
|
||||||
|
|
||||||
|
shadowSize = other.shadowSize;
|
||||||
|
shadowMaxVisibleDistance = other.shadowMaxVisibleDistance;
|
||||||
|
shadowProjectionDistance = other.shadowProjectionDistance;
|
||||||
|
shadowSphereAdjust = other.shadowSphereAdjust;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxModelData::~afxModelData()
|
afxModelData::~afxModelData()
|
||||||
|
|
@ -360,7 +365,7 @@ afxModel::afxModel()
|
||||||
fade_amt = 1.0f;
|
fade_amt = 1.0f;
|
||||||
is_visible = true;
|
is_visible = true;
|
||||||
sort_priority = 0;
|
sort_priority = 0;
|
||||||
|
mDataBlock = NULL;
|
||||||
mNetFlags.set( IsGhost );
|
mNetFlags.set( IsGhost );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -133,6 +133,7 @@ afxMooring::afxMooring()
|
||||||
chor_id = 0;
|
chor_id = 0;
|
||||||
hookup_with_chor = false;
|
hookup_with_chor = false;
|
||||||
ghost_cons_name = ST_NULLSTRING;
|
ghost_cons_name = ST_NULLSTRING;
|
||||||
|
mDataBlock = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxMooring::afxMooring(U32 networking, U32 chor_id, StringTableEntry cons_name)
|
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;
|
this->chor_id = chor_id;
|
||||||
hookup_with_chor = false;
|
hookup_with_chor = false;
|
||||||
this->ghost_cons_name = cons_name;
|
this->ghost_cons_name = cons_name;
|
||||||
|
mDataBlock = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxMooring::~afxMooring()
|
afxMooring::~afxMooring()
|
||||||
|
|
@ -275,4 +277,4 @@ void afxMooring::onRemove()
|
||||||
Parent::onRemove();
|
Parent::onRemove();
|
||||||
}
|
}
|
||||||
|
|
||||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||||
|
|
|
||||||
|
|
@ -687,6 +687,7 @@ bool afxParticleEmitterDiscData::preload(bool server, String &errorStr)
|
||||||
|
|
||||||
afxParticleEmitter::afxParticleEmitter()
|
afxParticleEmitter::afxParticleEmitter()
|
||||||
{
|
{
|
||||||
|
mDataBlock = NULL;
|
||||||
pe_vector.set(0,0,1);
|
pe_vector.set(0,0,1);
|
||||||
pe_vector_norm.set(0,0,1);
|
pe_vector_norm.set(0,0,1);
|
||||||
tpaths.clear();
|
tpaths.clear();
|
||||||
|
|
@ -1086,6 +1087,7 @@ void afxParticleEmitter::emitParticlesExt(const MatrixF& xfm, const Point3F& poi
|
||||||
|
|
||||||
afxParticleEmitterVector::afxParticleEmitterVector()
|
afxParticleEmitterVector::afxParticleEmitterVector()
|
||||||
{
|
{
|
||||||
|
mDataBlock = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxParticleEmitterVector::~afxParticleEmitterVector()
|
afxParticleEmitterVector::~afxParticleEmitterVector()
|
||||||
|
|
@ -1151,6 +1153,7 @@ void afxParticleEmitterVector::sub_preCompute(const MatrixF& mat)
|
||||||
|
|
||||||
afxParticleEmitterCone::afxParticleEmitterCone()
|
afxParticleEmitterCone::afxParticleEmitterCone()
|
||||||
{
|
{
|
||||||
|
mDataBlock = NULL;
|
||||||
cone_v.set(0,0,1);
|
cone_v.set(0,0,1);
|
||||||
cone_s0.set(0,0,1);
|
cone_s0.set(0,0,1);
|
||||||
cone_s1.set(0,0,1);
|
cone_s1.set(0,0,1);
|
||||||
|
|
@ -1266,6 +1269,7 @@ void afxParticleEmitterCone::sub_preCompute(const MatrixF& mat)
|
||||||
|
|
||||||
afxParticleEmitterPath::afxParticleEmitterPath()
|
afxParticleEmitterPath::afxParticleEmitterPath()
|
||||||
{
|
{
|
||||||
|
mDataBlock = NULL;
|
||||||
epaths.clear();
|
epaths.clear();
|
||||||
epath_mults.clear();
|
epath_mults.clear();
|
||||||
n_epath_points = 0;
|
n_epath_points = 0;
|
||||||
|
|
@ -1521,6 +1525,7 @@ void afxParticleEmitterPath::groundConformPoint(Point3F& point, const MatrixF& m
|
||||||
|
|
||||||
afxParticleEmitterDisc::afxParticleEmitterDisc()
|
afxParticleEmitterDisc::afxParticleEmitterDisc()
|
||||||
{
|
{
|
||||||
|
mDataBlock = NULL;
|
||||||
disc_v.set(0,0,1);
|
disc_v.set(0,0,1);
|
||||||
disc_r.set(1,0,0);
|
disc_r.set(1,0,0);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -122,6 +122,7 @@ ConsoleDocClass( afxStaticShape,
|
||||||
|
|
||||||
afxStaticShape::afxStaticShape()
|
afxStaticShape::afxStaticShape()
|
||||||
{
|
{
|
||||||
|
mDataBlock = NULL;
|
||||||
mAFX_data = 0;
|
mAFX_data = 0;
|
||||||
mIs_visible = true;
|
mIs_visible = true;
|
||||||
mChor_id = 0;
|
mChor_id = 0;
|
||||||
|
|
@ -238,4 +239,4 @@ void afxStaticShape::prepRenderImage(SceneRenderState* state)
|
||||||
Parent::prepRenderImage(state);
|
Parent::prepRenderImage(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ afxZodiacData::afxZodiacData()
|
||||||
grade_range_user.set(0.0f, 45.0f);
|
grade_range_user.set(0.0f, 45.0f);
|
||||||
afxZodiacData::convertGradientRangeFromDegrees(grade_range, grade_range_user);
|
afxZodiacData::convertGradientRangeFromDegrees(grade_range, grade_range_user);
|
||||||
inv_grade_range = false;
|
inv_grade_range = false;
|
||||||
|
zflags = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxZodiacData::afxZodiacData(const afxZodiacData& other, bool temp_clone) : GameBaseData(other, temp_clone)
|
afxZodiacData::afxZodiacData(const afxZodiacData& other, bool temp_clone) : GameBaseData(other, temp_clone)
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ afxZodiacPlaneData::afxZodiacPlaneData()
|
||||||
color.set(1,1,1,1);
|
color.set(1,1,1,1);
|
||||||
blend_flags = BLEND_NORMAL;
|
blend_flags = BLEND_NORMAL;
|
||||||
respect_ori_cons = false;
|
respect_ori_cons = false;
|
||||||
|
zflags = 0;
|
||||||
double_sided = true;
|
double_sided = true;
|
||||||
face_dir = FACES_UP;
|
face_dir = FACES_UP;
|
||||||
use_full_xfm = false;
|
use_full_xfm = false;
|
||||||
|
|
@ -310,4 +310,4 @@ void afxZodiacPlane::onRemove()
|
||||||
Parent::onRemove();
|
Parent::onRemove();
|
||||||
}
|
}
|
||||||
|
|
||||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ afxEA_PhraseEffect::afxEA_PhraseEffect()
|
||||||
{
|
{
|
||||||
phrase_fx_data = 0;
|
phrase_fx_data = 0;
|
||||||
active_phrases = &_phrases_a;
|
active_phrases = &_phrases_a;
|
||||||
|
last_trigger_mask = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxEA_PhraseEffect::~afxEA_PhraseEffect()
|
afxEA_PhraseEffect::~afxEA_PhraseEffect()
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class afxF_Drag : public afxForce
|
||||||
typedef afxForce Parent;
|
typedef afxForce Parent;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
afxF_DragData* datablock;
|
afxF_DragData* mDatablock;
|
||||||
F32 air_friction_constant;
|
F32 air_friction_constant;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
@ -149,13 +149,14 @@ afxForceData* afxF_DragData::cloneAndPerformSubstitutions(const SimObject* owner
|
||||||
|
|
||||||
afxF_Drag::afxF_Drag() : afxForce()
|
afxF_Drag::afxF_Drag() : afxForce()
|
||||||
{
|
{
|
||||||
|
mDatablock = NULL;
|
||||||
air_friction_constant = 1.0f;
|
air_friction_constant = 1.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool afxF_Drag::onNewDataBlock(afxForceData* dptr, bool reload)
|
bool afxF_Drag::onNewDataBlock(afxForceData* dptr, bool reload)
|
||||||
{
|
{
|
||||||
datablock = dynamic_cast<afxF_DragData*>(dptr);
|
mDatablock = dynamic_cast<afxF_DragData*>(dptr);
|
||||||
if (!datablock || !Parent::onNewDataBlock(dptr, reload))
|
if (!mDatablock || !Parent::onNewDataBlock(dptr, reload))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -163,9 +164,9 @@ bool afxF_Drag::onNewDataBlock(afxForceData* dptr, bool reload)
|
||||||
|
|
||||||
void afxF_Drag::start()
|
void afxF_Drag::start()
|
||||||
{
|
{
|
||||||
air_friction_constant = 0.5f * datablock->drag_coefficient
|
air_friction_constant = 0.5f * mDatablock->drag_coefficient
|
||||||
* datablock->air_density
|
* mDatablock->air_density
|
||||||
* datablock->cross_sectional_area;
|
* mDatablock->cross_sectional_area;
|
||||||
//Con::printf("Air Friction: %f", air_friction_constant);
|
//Con::printf("Air Friction: %f", air_friction_constant);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ class afxF_Gravity : public afxForce
|
||||||
typedef afxForce Parent;
|
typedef afxForce Parent;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
afxF_GravityData* datablock;
|
afxF_GravityData* mDatablock;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
/*C*/ afxF_Gravity();
|
/*C*/ afxF_Gravity();
|
||||||
|
|
@ -133,12 +133,13 @@ afxForceData* afxF_GravityData::cloneAndPerformSubstitutions(const SimObject* ow
|
||||||
|
|
||||||
afxF_Gravity::afxF_Gravity() : afxForce()
|
afxF_Gravity::afxF_Gravity() : afxForce()
|
||||||
{
|
{
|
||||||
|
mDatablock = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool afxF_Gravity::onNewDataBlock(afxForceData* dptr, bool reload)
|
bool afxF_Gravity::onNewDataBlock(afxForceData* dptr, bool reload)
|
||||||
{
|
{
|
||||||
datablock = dynamic_cast<afxF_GravityData*>(dptr);
|
mDatablock = dynamic_cast<afxF_GravityData*>(dptr);
|
||||||
if (!datablock || !Parent::onNewDataBlock(dptr, reload))
|
if (!mDatablock || !Parent::onNewDataBlock(dptr, reload))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
@ -146,7 +147,7 @@ bool afxF_Gravity::onNewDataBlock(afxForceData* dptr, bool reload)
|
||||||
|
|
||||||
Point3F afxF_Gravity::evaluate(Point3F pos, Point3F v, F32 mass)
|
Point3F afxF_Gravity::evaluate(Point3F pos, Point3F v, F32 mass)
|
||||||
{
|
{
|
||||||
return Point3F(0,0,-datablock->gravity)*mass;
|
return Point3F(0,0,-mDatablock->gravity)*mass;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,8 @@
|
||||||
afxAnimCurve::afxAnimCurve() : usable( false ), final_value( 0.0f ), start_value( 0.0f )
|
afxAnimCurve::afxAnimCurve() : usable( false ), final_value( 0.0f ), start_value( 0.0f )
|
||||||
{
|
{
|
||||||
evaluator = new afxHermiteEval();
|
evaluator = new afxHermiteEval();
|
||||||
|
final_time = 0.0f;
|
||||||
|
start_time = 0.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
afxAnimCurve::~afxAnimCurve()
|
afxAnimCurve::~afxAnimCurve()
|
||||||
|
|
@ -277,4 +279,4 @@ void afxAnimCurve::printKey( int index )
|
||||||
{
|
{
|
||||||
Key &k = keys[index];
|
Key &k = keys[index];
|
||||||
Con::printf( "%f: %f", k.time, k.value );
|
Con::printf( "%f: %f", k.time, k.value );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@
|
||||||
#include "afx/util/afxCurveEval.h"
|
#include "afx/util/afxCurveEval.h"
|
||||||
#include "afx/util/afxCurve3D.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();
|
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( "%f: %f %f %f", p.parameter, p.point.x, p.point.y, p.point.z );
|
||||||
}
|
}
|
||||||
Con::printf( "---------------------------------" );
|
Con::printf( "---------------------------------" );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include "afx/util/afxPath3D.h"
|
#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)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue