Skip to content

Commit

Permalink
FIX: dont send following if circular following
Browse files Browse the repository at this point in the history
  • Loading branch information
Arcurus committed Jan 19, 2024
1 parent 86a21b6 commit 79da3ce
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions openlife/server/Connection.hx
Original file line number Diff line number Diff line change
Expand Up @@ -421,6 +421,11 @@ class Connection {
var leaderId = player.followPlayer == null ? -1 : player.followPlayer.p_id;
var leaderBadgeColor = leader == null ? player.leaderBadgeColor : leader.leaderBadgeColor;

if (leader == null) {
trace('WARNING: sendFollowing: circular leader: ${player.name} ${player.followPlayer.name} ');
leaderId = -1;
}

// trace('sendFollowing ${player.id} --> $leaderId color: $leaderBadgeColor');
send(FOLLOWING, ['${player.p_id} $leaderId $leaderBadgeColor']);
}
Expand Down
Binary file modified server.hl
Binary file not shown.

0 comments on commit 79da3ce

Please sign in to comment.