Skip to content

Commit 7917c19

Browse files
authored
Merge pull request #533 from MrS-ibra/fix/60hz-frenzy-smoke
fix: Fix Frenzy smoke effect intermittently not rendering at 60Hz
2 parents a8e87f8 + 3fa215d commit 7917c19

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DeletionUpdate.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,15 @@ void DeletionUpdate::setLifetimeRange( UnsignedInt minFrames, UnsignedInt maxFra
7272
UnsignedInt DeletionUpdate::calcSleepDelay(UnsignedInt minFrames, UnsignedInt maxFrames)
7373
{
7474
UnsignedInt delay = GameLogicRandomValue( minFrames, maxFrames );
75+
#if defined(GENERALS_ONLINE_HIGH_FPS_SERVER)
76+
// Info: At 60Hz, a 1 logic frame lifetime only gives the client 16ms real time to notice a newly created object and
77+
// render it before DeletionUpdate destroys it, versus 33ms at the retail 30hz.
78+
// This caused one frame objects (like Frenzy's cloud effect) to intermittently never get drawn.
79+
// Doubling the 1 frame case just restores the original real world time.
80+
if (delay <= 1) delay = 2;
81+
#else
7582
if (delay < 1) delay = 1;
83+
#endif
7684
m_dieFrame = TheGameLogic->getFrame() + delay;
7785
return delay;
7886
}

0 commit comments

Comments
 (0)