Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions Generals/Code/GameEngine/Source/GameClient/GameClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand Down
28 changes: 14 additions & 14 deletions GeneralsMD/Code/GameEngine/Source/GameClient/GameClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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();
Expand Down
Loading