Skip to content
Merged
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
6 changes: 4 additions & 2 deletions Tactical/Rotting Corpses.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1112,8 +1112,7 @@ BOOLEAN TurnSoldierIntoCorpse( SOLDIERTYPE *pSoldier, BOOLEAN fRemoveMerc, BOOLE
iCorpseID = AddRottingCorpse( &Corpse );

// If this is our guy......make visible...
//if ( pSoldier->bTeam == gbPlayerNum )
if ( iCorpseID != -1 )
if ( iCorpseID != -1 && pSoldier->bTeam == OUR_TEAM || gbPublicOpplist[OUR_TEAM][pSoldier->ubID] == SEEN_CURRENTLY )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with this, does gbPublicOpplist[OUR_TEAM][pSoldier->ubID] == SEEN_CURRENTLY evaluate to false if the corpse isn't on anyone's line of sight?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The idea here is to render immediately only those of our team and of those enemies we currently see

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I get the idea, I just don't know how it works.

{
MakeCorpseVisible( pSoldier, &( gRottingCorpse[ iCorpseID ] ) );
}
Expand Down Expand Up @@ -2540,6 +2539,9 @@ void LookForAndMayCommentOnSeeingCorpse( SOLDIERTYPE *pSoldier, INT32 sGridNo, U
return;
}

if (pCorpse->fActivated && pCorpse->def.bVisible != 1)
pCorpse->def.bVisible = 1;

if ( pCorpse->def.ubType != ROTTING_STAGE2 )
{
return;
Expand Down