Skip to content

Commit

Permalink
Silence duplicate warnings in HatedBy PRL list
Browse files Browse the repository at this point in the history
  • Loading branch information
wallabra committed Feb 3, 2024
1 parent ec8b496 commit b6b99ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Classes/MushMatchPRL.uc
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ simulated event AddHate(PlayerReplicationInfo Other)
}

else {
HatedBy.AppendPlayer(Other, HatedByTail, HatePRLType);
HatedBy.AppendPlayer(Other, HatedByTail, HatePRLType, true);
}
}

Expand Down
6 changes: 4 additions & 2 deletions Classes/PlayerReplicationList.uc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ replication
}


simulated function PlayerReplicationList AppendPlayer(PlayerReplicationInfo other, out PlayerReplicationList newTail, optional class<PlayerReplicationList> PRLType)
simulated function PlayerReplicationList AppendPlayer(PlayerReplicationInfo other, out PlayerReplicationList newTail, optional class<PlayerReplicationList> PRLType, optional bool bIgnoreDuplicate)
{
local PlayerReplicationList prl;

Expand All @@ -19,7 +19,9 @@ simulated function PlayerReplicationList AppendPlayer(PlayerReplicationInfo othe

for ( prl = self; prl.Next != None; prl = prl.Next ) {
if (prl.owner == other) {
Warn("Tried to append duplicate PRL for"@other.PlayerName);
if (!bIgnoreDuplicate) {
Warn("Tried to append duplicate PRL for"@other.PlayerName);
}
return prl;
}
};
Expand Down

0 comments on commit b6b99ed

Please sign in to comment.