From 3fa215d699388e530f6d0c501a214f237208141f Mon Sep 17 00:00:00 2001 From: Ibra Date: Fri, 3 Jul 2026 04:15:52 +0300 Subject: [PATCH] fix: Fix Frenzy smoke effect intermittently not rendering at 60Hz --- .../Source/GameLogic/Object/Update/DeletionUpdate.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DeletionUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DeletionUpdate.cpp index 9815cfbc4a5..5c9c19e8f3e 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DeletionUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/DeletionUpdate.cpp @@ -72,7 +72,15 @@ void DeletionUpdate::setLifetimeRange( UnsignedInt minFrames, UnsignedInt maxFra UnsignedInt DeletionUpdate::calcSleepDelay(UnsignedInt minFrames, UnsignedInt maxFrames) { UnsignedInt delay = GameLogicRandomValue( minFrames, maxFrames ); +#if defined(GENERALS_ONLINE_HIGH_FPS_SERVER) + // Info: At 60Hz, a 1 logic frame lifetime only gives the client 16ms real time to notice a newly created object and + // render it before DeletionUpdate destroys it, versus 33ms at the retail 30hz. + // This caused one frame objects (like Frenzy's cloud effect) to intermittently never get drawn. + // Doubling the 1 frame case just restores the original real world time. + if (delay <= 1) delay = 2; +#else if (delay < 1) delay = 1; +#endif m_dieFrame = TheGameLogic->getFrame() + delay; return delay; }