mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 22:54:34 +00:00
further validator cleanups
bump default fidelity from 0,0001 to 0.01 fix F32Range. needs to go from - to +, not smallest to largest positive value fix several misasigned validator ranges. most of which use some form of -1 default to do a Special Thing
This commit is contained in:
parent
1ebe48edbd
commit
fcd2d38deb
9 changed files with 16 additions and 16 deletions
|
|
@ -293,7 +293,7 @@ void SoundAsset::initPersistFields()
|
|||
addFieldV("coneInsideAngle", TypeRangedS32, Offset(mProfileDesc.mConeInsideAngle, SoundAsset), &CommonValidators::S32_PosDegreeRange, "Cone inside angle.");
|
||||
addFieldV("coneOutsideAngle", TypeRangedS32, Offset(mProfileDesc.mConeOutsideAngle, SoundAsset), &CommonValidators::S32_PosDegreeRange, "Cone outside angle.");
|
||||
addFieldV("coneOutsideVolume", TypeRangedF32, Offset(mProfileDesc.mConeOutsideVolume, SoundAsset), &CommonValidators::NormalizedFloat, "Cone outside volume.");
|
||||
addFieldV("rolloffFactor", TypeRangedF32, Offset(mProfileDesc.mRolloffFactor, SoundAsset), &CommonValidators::PositiveFloat, "Rolloff factor.");
|
||||
addFieldV("rolloffFactor", TypeRangedF32, Offset(mProfileDesc.mRolloffFactor, SoundAsset), &CommonValidators::NegDefaultF32, "Rolloff factor.");
|
||||
addField("scatterDistance", TypePoint3F, Offset(mProfileDesc.mScatterDistance, SoundAsset), "Randomization to the spacial position of the sound.");
|
||||
endGroup("3D");
|
||||
|
||||
|
|
|
|||
|
|
@ -66,10 +66,10 @@ void LightAnimData::initPersistFields()
|
|||
addGroup( "Offset",
|
||||
"The XYZ translation animation state relative to the light position." );
|
||||
addArray("XYZ Pan", Axis);
|
||||
addFieldV( "offsetA", TypeRangedF32, Offset( mOffset.value1, LightAnimData ), &CommonValidators::PositiveFloat, Axis,
|
||||
addFieldV( "offsetA", TypeRangedF32, Offset( mOffset.value1, LightAnimData ), &CommonValidators::F32Range, Axis,
|
||||
"The value of the A key in the keyframe sequence." );
|
||||
|
||||
addFieldV( "offsetZ", TypeRangedF32, Offset( mOffset.value2, LightAnimData ), &CommonValidators::PositiveFloat, Axis,
|
||||
addFieldV( "offsetZ", TypeRangedF32, Offset( mOffset.value2, LightAnimData ), &CommonValidators::F32Range, Axis,
|
||||
"The value of the Z key in the keyframe sequence." );
|
||||
|
||||
addFieldV( "offsetPeriod", TypeRangedF32, Offset( mOffset.period, LightAnimData ), &CommonValidators::PositiveFloat, Axis,
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ void LightFlareData::initPersistFields()
|
|||
addField( "elementRect", TypeRectF, Offset( mElementRect, LightFlareData ), MAX_ELEMENTS,
|
||||
"A rectangle specified in pixels of the flareTexture image." );
|
||||
|
||||
addFieldV( "elementDist", TypeRangedF32, Offset( mElementDist, LightFlareData ), &CommonValidators::PositiveFloat, MAX_ELEMENTS,
|
||||
addFieldV( "elementDist", TypeRangedF32, Offset( mElementDist, LightFlareData ), &CommonValidators::F32Range, MAX_ELEMENTS,
|
||||
"Where this element appears along the flare beam." );
|
||||
|
||||
addFieldV( "elementScale", TypeRangedF32, Offset( mElementScale, LightFlareData ), &CommonValidators::PositiveFloat, MAX_ELEMENTS,
|
||||
|
|
|
|||
|
|
@ -808,7 +808,7 @@ void Vehicle::updatePos(F32 dt)
|
|||
{
|
||||
F32 k = mRigid.getKineticEnergy();
|
||||
F32 G = mNetGravity* dt * TickMs / mDataBlock->integration;
|
||||
F32 Kg = mRigid.mass * G * G;
|
||||
F32 Kg = 0.5 * mRigid.mass * G * G;
|
||||
if (k < sRestTol * Kg && ++restCount > sRestCount)
|
||||
mRigid.setAtRest();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue