add safeties for enum math across define boundaries

This commit is contained in:
AzaezelX 2023-04-26 22:27:35 -05:00
parent 1230d0d280
commit aa02e48c8d
20 changed files with 71 additions and 71 deletions

View file

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