My program doesn't have bugs. It just develops random features.
UE3:PartyBeaconHost (UDK)
Object >> PartyBeacon >> PartyBeaconHost |
- Package:
- IpDrv
This is an auto-generated page and may need human attention. Please remove the {{autogenerated}} tag if the page seems reasonably complete or replace it with the {{expand}} tag if the page is not yet complete. |
This class is used to create a network accessible beacon for responding to reservation requests for party matches. It handles all tracking of who has reserved space, how much space is available, and how many parties can reserve space.
Properties
bBestFitTeamAssignment
Type: bool
Force new reservations to teams with the smallest accommodating need size, otherwise team assignment is random
Clients
Type: array<ClientBeaconConnection>
Modifiers: const
The object that is used to send/receive data with the remote host/client
ConnectionBacklog
Type: int
Modifiers: config
The number of connections to allow before refusing them
NumConsumedReservations
Type: int
Modifiers: const
The number of slots that have been consumed by parties in total (saves having to iterate and sum)
NumPlayersPerTeam
Type: int
Modifiers: const
The number of players required for a full team
NumReservations
Type: int
Modifiers: const
The number of players that are allowed to reserve space
NumTeams
Type: int
Modifiers: const
The number of teams that these players will be divided amongst
OnlineSessionName
Type: name
The online session name that players will register with
Reservations
Type: array<PartyBeacon.PartyReservation>
Modifiers: const
The list of accepted reservations
ReservedHostTeamNum
Type: int
Modifiers: const
The team the host (owner of the beacon) is assigned to when random teams are chosen
Structs
ClientBeaconConnection
Modifiers: native
Holds the information for a client and whether they've timed out
- OnlineSubsystem.UniqueNetId PartyLeader
- The unique id of the party leader for this connection
- float ElapsedHeartbeatTime
- How long it's been since the last heartbeat
- pointer{FSocket} Socket
- The socket this client is communicating on
Delegates
OnClientCancellationReceived
Called by the beacon when a client cancels a reservation
Parameters:
- PartyLeader - the party leader that is cancelling the reservation
OnReservationChange
Called by the beacon when a reservation occurs or is cancelled so that UI can be updated, etc.
OnReservationsFull
Called by the beacon when all of the available reservations have been filled
Functions
Native functions
DestroyBeacon
Overrides: PartyBeacon.DestroyBeacon
Stops listening for clients and releases any allocated memory
AddPartyReservationEntry
Add a new party to the reservation list. Avoids adding duplicate entries based on party leader.
Parameters:
- PartyLeader - the party leader that is adding the reservation
- PlayerMembers - players (including party leader) being added to the reservation
- TeamNum - team assignment of the new party
- bIsHost - treat the party as the game host
Returns:
- EPartyReservationResult similar to a client update request
AppendReservationSkillsToSearch
Appends the skills from all reservations to the search object so that they can be included in the search information
Parameters:
- Search - the search object to update
GetMaxAvailableTeamSize
Determine the maximum team size that can be accommodated based on the current reservation slots occupied.
Returns:
- maximum team size that is currently available
HandlePlayerLogout
Called when a player logs out of the current game. The player's party reservation entry is freed up so that a new reservation request can be accepted.
Parameters:
- PlayerId - the net Id of the player that just logged out
- bMaintainParty - if TRUE then preserve party members of a reservation when the party leader logs out
InitHostBeacon
Creates a listening host beacon with the specified number of parties, players, and the session name that remote parties will be registered under
Parameters:
- InNumTeams - the number of teams that are expected to join
- InNumPlayersPerTeam - the number of players that are allowed to be on each team
- InNumReservations - the total number of players to allow to join (if different than team * players)
- InSessionName - the name of the session to add the players to when a reservation occurs
Returns:
- true if the beacon was created successfully, false otherwise
TellClientsHostHasCancelled
Tells all of the clients that the host has cancelled the matchmaking beacon and that they need to find a different host
TellClientsHostIsReady
Tells all of the clients that the host is ready for them to travel to the host connection
TellClientsToTravel
Tells all of the clients to go to a specific session (contained in platform specific info). Used to route clients that aren't in the same party to one destination.
Parameters:
- SessionName - the name of the session to register
- SearchClass - the search that should be populated with the session
- PlatformSpecificInfo - the binary data to place in the platform specific areas
UpdatePartyReservationEntry
Update a party with an existing reservation Avoids adding duplicate entries to the player members of a party.
Parameters:
- PartyLeader - the party leader for which the existing reservation entry is being updated
- PlayerMembers - players (not including party leader) being added to the existing reservation
Returns:
- EPartyReservationResult similar to a client update request
Events
RegisterPartyMembers
Registers all of the parties as part of the session that this beacon is associated with
UnregisterParty
Unregisters each of the party members that have the specified party leader
Parameters:
- PartyLeader - the leader to search for in the reservation array
UnregisterPartyMembers
Unregisters each of the party members at the specified reservation with the session
Other instance functions
AreReservationsFull
Determine if the beacon has filled all open reservation slots
Returns:
- TRUE if all reservations have been consumed by party members
DumpReservations
Logs the reservation information for this beacon
GetPartyLeaders
Gathers all the unique ids for party leaders that have reservations
GetPlayers
Gathers all the unique ids for players that have reservations