A team, containing a list of TM_TeamMember instances.
More...
#include <TeamManager.h>
A team, containing a list of TM_TeamMember instances.
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 |
- Returns
- If team balancing is on, the most members that can be on this team that would not either unbalance it or exceed the value passed to SetMemberLimit(). If team balancing is off, the same as GetMemberLimitSetting()
NetworkID RakNet::TM_Team::GetNetworkID |
( |
void |
| ) |
const |
void* RakNet::TM_Team::GetOwner |
( |
void |
| ) |
const |
TM_TeamMember* RakNet::TM_Team::GetTeamMemberByIndex |
( |
unsigned int |
index | ) |
const |
- Returns
- A team member on this team. Members are stored in the order they are added
- Parameters
-
- Parameters
-
[out] | All | team members of this team |
unsigned int RakNet::TM_Team::GetTeamMembersCount |
( |
void |
| ) |
const |
- Returns
- The number of team members on this team
TM_World* RakNet::TM_Team::GetTM_World |
( |
void |
| ) |
const |
Removes a member from a team he or she is on.
Identical to teamMember->LeaveTeam(this, noTeamSubcategory); See TeamMember::LeaveTeam() for details.
- Parameters
-
[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.
- Parameters
-
[in] | _joinPermissions | Bitwise combination of ALLOW_JOIN_ANY_AVAILABLE_TEAM, ALLOW_JOIN_SPECIFIC_TEAM, ALLOW_JOIN_REBALANCING |
- Returns
- false On invalid or unnecessary operation. Otherwise returns true
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.
- Parameters
-
[in] | _teamMemberLimit | The new limit |
[in] | noTeamSubcategory | Which noTeamSubcategory to assign to members that now have no team. |
- Returns
- false On invalid or unnecessary operation. Otherwise returns true
void RakNet::TM_Team::SetOwner |
( |
void * |
o | ) |
|
- Parameters
-
[in] | o | Stores a void* for your own use. If using composition, this is useful to store a pointer to the containing object. |
The documentation for this class was generated from the following file: