protected void RefreshFactionMembers( ) { List<MyObjectBuilder_FactionMember> memberList = BaseEntity.Members; //Cleanup missing members List<FactionMember> membersToRemove = new List<FactionMember>( ); foreach ( FactionMember member in m_members.Values ) { if ( memberList.Contains( member.BaseEntity ) ) continue; membersToRemove.Add( member ); } foreach ( FactionMember member in membersToRemove ) { m_members.Remove( member.PlayerId ); } //Add new members foreach ( MyObjectBuilder_FactionMember member in memberList ) { if ( m_members.ContainsKey( member.PlayerId ) ) continue; FactionMember newMember = new FactionMember( this, member ); m_members.Add( newMember.PlayerId, newMember ); } }