From 008c5e917a60b47113cf90bc425f978e1abe737a Mon Sep 17 00:00:00 2001 From: "seer-by-sentry[bot]" <157164994+seer-by-sentry[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 20:45:39 +0000 Subject: [PATCH] Ensure consistent shroud obscuring logic application --- .../Source/GameClient/GameClient.cpp | 28 +++++++++---------- .../Source/GameClient/GameClient.cpp | 28 +++++++++---------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp b/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp index bd9ce8c043..9b22bfea67 100644 --- a/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/GameClient.cpp @@ -652,6 +652,20 @@ void GameClient::update( void ) Object *object=draw->getObject(); if (object) { + ObjectShroudStatus ss=object->getShroudedStatus(localPlayerIndex); + if (ss >= OBJECTSHROUD_FOGGED && draw->getShroudClearFrame() != InvalidShroudClearFrame) { + UnsignedInt limit = 2*LOGICFRAMES_PER_SECOND; + if (object->isEffectivelyDead()) { + // extend the time, so we can see the dead plane blow up & crash. + limit += 3*LOGICFRAMES_PER_SECOND; + } + if (TheGameLogic->getFrame() < limit + draw->getShroudClearFrame()) { + // It's been less than 2 seconds since we could see them clear, so keep showing them. + ss = OBJECTSHROUD_CLEAR; + } + } + draw->setFullyObscuredByShroud(ss >= OBJECTSHROUD_FOGGED); + if (TheGhostObjectManager->trackAllPlayers()) { // TheSuperHackers @info Update the shrouded status for all objects @@ -666,20 +680,6 @@ void GameClient::update( void ) } } } - - ObjectShroudStatus ss=object->getShroudedStatus(localPlayerIndex); - if (ss >= OBJECTSHROUD_FOGGED && draw->getShroudClearFrame() != InvalidShroudClearFrame) { - UnsignedInt limit = 2*LOGICFRAMES_PER_SECOND; - if (object->isEffectivelyDead()) { - // extend the time, so we can see the dead plane blow up & crash. - limit += 3*LOGICFRAMES_PER_SECOND; - } - if (TheGameLogic->getFrame() < limit + draw->getShroudClearFrame()) { - // It's been less than 2 seconds since we could see them clear, so keep showing them. - ss = OBJECTSHROUD_CLEAR; - } - } - draw->setFullyObscuredByShroud(ss >= OBJECTSHROUD_FOGGED); } } draw->updateDrawable(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp index 77ab9d7c52..412122fd81 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp @@ -697,6 +697,20 @@ void GameClient::update( void ) Object *object=draw->getObject(); if (object) { + ObjectShroudStatus ss=object->getShroudedStatus(localPlayerIndex); + if (ss >= OBJECTSHROUD_FOGGED && draw->getShroudClearFrame() != InvalidShroudClearFrame) { + UnsignedInt limit = 2*LOGICFRAMES_PER_SECOND; + if (object->isEffectivelyDead()) { + // extend the time, so we can see the dead plane blow up & crash. + limit += 3*LOGICFRAMES_PER_SECOND; + } + if (TheGameLogic->getFrame() < limit + draw->getShroudClearFrame()) { + // It's been less than 2 seconds since we could see them clear, so keep showing them. + ss = OBJECTSHROUD_CLEAR; + } + } + draw->setFullyObscuredByShroud(ss >= OBJECTSHROUD_FOGGED); + if (TheGhostObjectManager->trackAllPlayers()) { // TheSuperHackers @info Update the shrouded status for all objects @@ -711,20 +725,6 @@ void GameClient::update( void ) } } } - - ObjectShroudStatus ss=object->getShroudedStatus(localPlayerIndex); - if (ss >= OBJECTSHROUD_FOGGED && draw->getShroudClearFrame() != InvalidShroudClearFrame) { - UnsignedInt limit = 2*LOGICFRAMES_PER_SECOND; - if (object->isEffectivelyDead()) { - // extend the time, so we can see the dead plane blow up & crash. - limit += 3*LOGICFRAMES_PER_SECOND; - } - if (TheGameLogic->getFrame() < limit + draw->getShroudClearFrame()) { - // It's been less than 2 seconds since we could see them clear, so keep showing them. - ss = OBJECTSHROUD_CLEAR; - } - } - draw->setFullyObscuredByShroud(ss >= OBJECTSHROUD_FOGGED); } } draw->updateDrawable();