mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-06 14:00:39 +00:00
add safeties for enum math across define boundaries
This commit is contained in:
parent
1230d0d280
commit
aa02e48c8d
20 changed files with 71 additions and 71 deletions
|
|
@ -89,7 +89,7 @@ bool afxEA_AnimClip::ea_start()
|
|||
do_runtime_substitutions();
|
||||
|
||||
afxConstraint* pos_constraint = getPosConstraint();
|
||||
if (mFull_lifetime == INFINITE_LIFETIME && pos_constraint != 0)
|
||||
if (mFull_lifetime == (F32)INFINITE_LIFETIME && pos_constraint != 0)
|
||||
anim_lifetime = pos_constraint->getAnimClipDuration(clip_data->clip_name);
|
||||
else
|
||||
anim_lifetime = mFull_lifetime;
|
||||
|
|
@ -197,4 +197,4 @@ bool afxEA_AnimClipDesc::requiresStop(const afxEffectWrapperData* ew, const afxE
|
|||
return (timing.lifetime < 0);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ bool afxEA_CameraShake::ea_start()
|
|||
|
||||
if (aim_constraint && pos_constraint)
|
||||
{
|
||||
if (mFull_lifetime <= 0 || mFull_lifetime == INFINITE_LIFETIME)
|
||||
if (mFull_lifetime <= 0 || mFull_lifetime == (F32)INFINITE_LIFETIME)
|
||||
{
|
||||
Con::errorf("afxEA_CameraShake::ea_start() -- effect requires a finite lifetime.");
|
||||
return false;
|
||||
|
|
@ -193,4 +193,4 @@ bool afxEA_CameraShakeDesc::requiresStop(const afxEffectWrapperData* ew, const a
|
|||
return (timing.lifetime < 0);
|
||||
}
|
||||
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~//~~~~~~~~~~~~~~~~~~~~~//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue