Skip to content

Commit

Permalink
If your mother has no leader, you automatically follow her at birth t…
Browse files Browse the repository at this point in the history
…o bootstrap leadership. Part of #532
  • Loading branch information
jasonrohrer committed Feb 6, 2020
1 parent c0c9d36 commit e2c555e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions documentation/changeLog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ Version 309 ???
--When issuing an order, the leader sees +FOLLOWER+ markers above the heads of
nearby followers.

--If your mother has no leader, you automatically follow her at birth to
bootstrap leadership. Part of #532




Version 307 2020-January-30
Expand Down
6 changes: 6 additions & 0 deletions server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8580,6 +8580,12 @@ int processLoggedInPlayer( char inAllowReconnect,
// child inherits mother's leader
newObject.followingID = parent->followingID;

if( newObject.followingID == -1 ) {
// boostrap the whole thing by having leaderless mothers
// get their children as automatic followers.
newObject.followingID = parent->id;
}


newObject.parentChainLength = parent->parentChainLength + 1;

Expand Down

0 comments on commit e2c555e

Please sign in to comment.