diff --git a/src/main/scala/net/psforever/services/teamwork/SquadService.scala b/src/main/scala/net/psforever/services/teamwork/SquadService.scala index 60b99d42..5c173f2b 100644 --- a/src/main/scala/net/psforever/services/teamwork/SquadService.scala +++ b/src/main/scala/net/psforever/services/teamwork/SquadService.scala @@ -863,6 +863,11 @@ class SquadService extends Actor { val sguid = GetNextSquadId() val squad = new Squad(sguid, faction) val leadPosition = squad.Membership(0) + //keep publishedLists clear of old squads. PR 1157 for details + val factionListings = publishedLists(faction) + val guidsToRemove = factionListings.filterNot(squadFeatures.contains).toList + guidsToRemove.foreach(factionListings -= _) + leadPosition.Name = name leadPosition.CharId = player.CharId leadPosition.Health = StatConverter.Health(player.Health, player.MaxHealth, min = 1, max = 64)