From bcb3c43211ef16ef8540022408b108c235a925d9 Mon Sep 17 00:00:00 2001 From: ScrawnyRonnie Date: Mon, 8 Jan 2024 20:36:38 -0500 Subject: [PATCH] console? --- .../services/teamwork/SquadService.scala | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/main/scala/net/psforever/services/teamwork/SquadService.scala b/src/main/scala/net/psforever/services/teamwork/SquadService.scala index 932105217..967b89915 100644 --- a/src/main/scala/net/psforever/services/teamwork/SquadService.scala +++ b/src/main/scala/net/psforever/services/teamwork/SquadService.scala @@ -974,7 +974,6 @@ class SquadService extends Actor { def CloseSquad(squad: Squad): Unit = { val guid = squad.GUID val membership = squad.Membership.zipWithIndex - val factionListings = publishedLists(squad.Faction) val (updateMembers, updateIndices) = membership.collect { case (member, index) if member.CharId > 0 => ((member, member.CharId, index, subs.UserEvents.get(member.CharId)), (member.CharId, index)) @@ -1011,15 +1010,12 @@ class SquadService extends Actor { subs.Publish(charId, SquadResponse.Detail(PlanetSideGUID(0), completelyBlankSquadDetail)) } UpdateSquadListWhenListed(features.Stop, None) - //I think this is right, otherwise squadFeatures will never be empty and TryResetSquadId will not reset to 1 - squadFeatures.remove(guid) - //for the rare case of a phantom squad that no longer exists but is still on the publishedLists - factionListings.find(_ == guid) match { - case Some(squad) => - val index = factionListings.indexOf(squad) - factionListings.remove(index) - case None => - } + squadFeatures -= guid + //really make sure it is removed + publishedLists(squad.Faction) -= guid + //testing + println(s"AllSquads Removed: $guid - Remaining: $squadFeatures") + println(s"ListedSquads: $publishedLists") } /**