mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 00:24:40 +00:00
decal lifetime option functionality added
This commit is contained in:
parent
b8d462e22e
commit
1ae043bc90
1 changed files with 3 additions and 3 deletions
|
|
@ -1087,10 +1087,10 @@ void DecalManager::prepRenderImage( SceneRenderState* state )
|
||||||
if ( !( dinst->mFlags & PermanentDecal || dinst->mFlags & CustomDecal ) )
|
if ( !( dinst->mFlags & PermanentDecal || dinst->mFlags & CustomDecal ) )
|
||||||
{
|
{
|
||||||
delta = ( curSimTime - dinst->mCreateTime );
|
delta = ( curSimTime - dinst->mCreateTime );
|
||||||
if ( delta > dinst->mDataBlock->lifeSpan )
|
if (delta > dinst->mDataBlock->lifeSpan * smDecalLifeTimeScale)
|
||||||
{
|
{
|
||||||
diff = delta - dinst->mDataBlock->lifeSpan;
|
diff = delta - (dinst->mDataBlock->lifeSpan * smDecalLifeTimeScale);
|
||||||
dinst->mVisibility = 1.0f - (F32)diff / (F32)dinst->mDataBlock->fadeTime;
|
dinst->mVisibility = 1.0f - (F32)diff / ((F32)dinst->mDataBlock->fadeTime * smDecalLifeTimeScale);
|
||||||
|
|
||||||
if ( dinst->mVisibility <= 0.0f )
|
if ( dinst->mVisibility <= 0.0f )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue