Core/Groups: Fixes groups staying linked with players.

This commit is contained in:
Hondacrx
2025-09-02 22:43:56 -04:00
parent 6531cd9dc1
commit 3d23a9f162
34 changed files with 385 additions and 402 deletions
+2 -2
View File
@@ -227,7 +227,7 @@ namespace Game.AI
Group group = player.GetGroup();
if (group != null)
{
for (GroupReference groupRef = group.GetFirstMember(); groupRef != null; groupRef = groupRef.Next())
foreach (GroupReference groupRef in group.GetMembers())
{
Player groupGuy = groupRef.GetSource();
if (!groupGuy.IsInMap(player))
@@ -333,7 +333,7 @@ namespace Game.AI
Group group = player.GetGroup();
if (group != null)
{
for (GroupReference groupRef = group.GetFirstMember(); groupRef != null; groupRef = groupRef.Next())
foreach (GroupReference groupRef in group.GetMembers())
{
Player groupGuy = groupRef.GetSource();
if (groupGuy.IsInMap(player) && me.GetDistance(groupGuy) <= checkDist)