#include <TeamManager.h>
Public Member Functions | |
bool | SetMemberLimit (TeamMemberLimit _teamMemberLimit, NoTeamId noTeamSubcategory) |
Set the maximum number of members that can join this team. Defaults to 65535 Setting the limit lower than the existing number of members kicks members out, and assigns noTeamSubcategory to them if they have no other team to go to Setting the limit higher allows members to join in. If a member has a pending request to join this team, they join automatically and ID_TEAM_BALANCER_TEAM_ASSIGNED will be returned for those members. | |
TeamMemberLimit | GetMemberLimit (void) const |
TeamMemberLimit | GetMemberLimitSetting (void) const |
bool | SetJoinPermissions (JoinPermissions _joinPermissions) |
Who can join this team under what conditions, while the team is not full To not allow new joins, pass 0 To allow all new joins under any circumstances, bitwise-OR all permission defines. For an invite-only team, use ALLOW_JOIN_SPECIFIC_TEAM only and only allow the requester to call TM_TeamMember::RequestTeam() upon invitiation through your game code. Defaults to allow all. | |
JoinPermissions | GetJoinPermissions (void) const |
void | LeaveTeam (TM_TeamMember *teamMember, NoTeamId noTeamSubcategory) |
Removes a member from a team he or she is on. | |
bool | GetBalancingApplies (void) const |
void | GetTeamMembers (DataStructures::List< TM_TeamMember * > &_teamMembers) const |
unsigned int | GetTeamMembersCount (void) const |
TM_TeamMember * | GetTeamMemberByIndex (unsigned int index) const |
NetworkID | GetNetworkID (void) const |
TM_World * | GetTM_World (void) const |
void | SerializeConstruction (BitStream *constructionBitstream) |
Used by the host to serialize the initial state of this object to a new system. | |
bool | DeserializeConstruction (TeamManager *teamManager, BitStream *constructionBitstream) |
Used by non-host systems to read the bitStream written by SerializeConstruction(). | |
void | SetOwner (void *o) |
void * | GetOwner (void) const |
unsigned int | GetWorldIndex (void) const |
Return world->GetTeamIndex(this). |
Contains lists of TM_TeamMember instances Best used as a composite member of your "Team" or "PlayerList" class(es). When using with ReplicaManager3, call TM_Team::ReferenceTeam() in Replica3::DeserializeConstruction() and TM_Team::DeserializeConstruction() in Replica3::PostDeserializeConstruction() There is otherwise no need to manually serialize the class, as operations are networked internally.
bool RakNet::TM_Team::DeserializeConstruction | ( | TeamManager * | teamManager, | |
BitStream * | constructionBitstream | |||
) |
Used by non-host systems to read the bitStream written by SerializeConstruction().
On non-host systems, after creating existing objects, call DeserializeConstruction() to read and setup that object Creating the actual Team and TeamMember objects should be handled by your game code, or a system such as ReplicaManager3
bool RakNet::TM_Team::GetBalancingApplies | ( | void | ) | const |
JoinPermissions RakNet::TM_Team::GetJoinPermissions | ( | void | ) | const |
TeamMemberLimit RakNet::TM_Team::GetMemberLimit | ( | void | ) | const |
TeamMemberLimit RakNet::TM_Team::GetMemberLimitSetting | ( | void | ) | const |
NetworkID RakNet::TM_Team::GetNetworkID | ( | void | ) | const |
void* RakNet::TM_Team::GetOwner | ( | void | ) | const |
TM_TeamMember* RakNet::TM_Team::GetTeamMemberByIndex | ( | unsigned int | index | ) | const |
[in] | index | A value between 0 and GetTeamMembersCount() |
void RakNet::TM_Team::GetTeamMembers | ( | DataStructures::List< TM_TeamMember * > & | _teamMembers | ) | const |
[out] | All | team members of this team |
unsigned int RakNet::TM_Team::GetTeamMembersCount | ( | void | ) | const |
TM_World* RakNet::TM_Team::GetTM_World | ( | void | ) | const |
void RakNet::TM_Team::LeaveTeam | ( | TM_TeamMember * | teamMember, | |
NoTeamId | noTeamSubcategory | |||
) |
Removes a member from a team he or she is on.
Identical to teamMember->LeaveTeam(this, noTeamSubcategory); See TeamMember::LeaveTeam() for details.
[in] | teamMember | Which team member to remove |
[in] | noTeamSubcategory | If the team member has been removed from all teams, which subcategory of NoTeamId to set them to |
void RakNet::TM_Team::SerializeConstruction | ( | BitStream * | constructionBitstream | ) |
Used by the host to serialize the initial state of this object to a new system.
On the host, when sending existing objects to a new system, call SerializeConstruction() on each of those objects to serialize creation state. Creating the actual Team and TeamMember objects should be handled by your game code, or a system such as ReplicaManager3
bool RakNet::TM_Team::SetJoinPermissions | ( | JoinPermissions | _joinPermissions | ) |
Who can join this team under what conditions, while the team is not full To not allow new joins, pass 0 To allow all new joins under any circumstances, bitwise-OR all permission defines. For an invite-only team, use ALLOW_JOIN_SPECIFIC_TEAM only and only allow the requester to call TM_TeamMember::RequestTeam() upon invitiation through your game code. Defaults to allow all.
[in] | _joinPermissions | Bitwise combination of ALLOW_JOIN_ANY_AVAILABLE_TEAM, ALLOW_JOIN_SPECIFIC_TEAM, ALLOW_JOIN_REBALANCING |
bool RakNet::TM_Team::SetMemberLimit | ( | TeamMemberLimit | _teamMemberLimit, | |
NoTeamId | noTeamSubcategory | |||
) |
Set the maximum number of members that can join this team. Defaults to 65535 Setting the limit lower than the existing number of members kicks members out, and assigns noTeamSubcategory to them if they have no other team to go to Setting the limit higher allows members to join in. If a member has a pending request to join this team, they join automatically and ID_TEAM_BALANCER_TEAM_ASSIGNED will be returned for those members.
[in] | _teamMemberLimit | The new limit |
[in] | noTeamSubcategory | Which noTeamSubcategory to assign to members that now have no team. |
void RakNet::TM_Team::SetOwner | ( | void * | o | ) |
[in] | o | Stores a void* for your own use. If using composition, this is useful to store a pointer to the containing object. |