Skip to content

Commit 8dc210c

Browse files
committed
tweak(ww3d): Decouple render update from logic step in RingRenderObjClass::animate, SphereRenderObjClass::animate (#1579)
1 parent 7ac7a41 commit 8dc210c

File tree

2 files changed

+4
-12
lines changed

2 files changed

+4
-12
lines changed

Core/Libraries/Source/WWVegas/WW3D2/ringobj.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,13 +1146,9 @@ void RingRenderObjClass::animate()
11461146
InnerScaleChannel.Get_Key_Count () > 0 ||
11471147
OuterScaleChannel.Get_Key_Count () > 0)
11481148
{
1149-
//
1150-
// Convert from milliseconds to seconds and normalize the time
1151-
//
11521149
if (AnimDuration > 0) {
1153-
float frametime = WW3D::Get_Sync_Frame_Time();
1154-
frametime = (frametime * 0.001F) / AnimDuration;
1155-
anim_time += frametime;
1150+
float frametime = WW3D::Get_Logic_Frame_Time_Seconds();
1151+
anim_time += frametime / AnimDuration;
11561152
} else {
11571153
anim_time = 1.0F;
11581154
}

Core/Libraries/Source/WWVegas/WW3D2/sphereobj.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1104,13 +1104,9 @@ void SphereRenderObjClass::animate (void)
11041104
ScaleChannel.Get_Key_Count () > 0 ||
11051105
VectorChannel.Get_Key_Count () > 0)
11061106
{
1107-
//
1108-
// Convert from milliseconds to seconds and normalize the time
1109-
//
11101107
if (AnimDuration > 0) {
1111-
float frametime = WW3D::Get_Sync_Frame_Time();
1112-
frametime = (frametime * 0.001F) / AnimDuration;
1113-
anim_time += frametime;
1108+
float frametime = WW3D::Get_Logic_Frame_Time_Seconds();
1109+
anim_time += frametime / AnimDuration;
11141110
} else {
11151111
anim_time = 1.0F;
11161112
}

0 commit comments

Comments
 (0)