Kronos Matchmaking
Buy NowContact
  • About
    • Kronos LTS
    • Support
    • Accolades
  • Examples
    • Playable Demo
    • Sample Project
    • Example Content
  • Configuration
  • Testing & Debugging
  • Usage
    • Getting Started
    • Authentication
      • Authenticating Users
      • Customizing The Auth Widget
      • Creating Custom Auth Tasks
    • Matchmaking
      • Overview
      • Creating Matches
      • Starting Matchmaking
      • Canceling Matchmaking
      • Using Skill Ratings
      • Sending Match Invites
      • Joining Matches
      • Leaving Matches
    • Party
      • Overview
      • Creating Parties
      • Sending Party Invites
      • Joining Parties
      • Managing Party Players
      • Party Player Actors
      • Leaving Parties
    • Reservations
      • Overview
      • Using Reservations
      • The Host Reservation
      • Completing Reservations
    • Lobby
      • Overview
      • Lobby Setup
      • Set Players Ready
      • Lobby Player Data
      • Starting The Match
      • Updating Lobby Session
      • Leaving The Lobby
    • Widgets
  • Guides
    • Creating a Level Selector
    • Integrating with Lyra Game
    • Integrating with EIK
  • Advanced
    • Steam Sockets
    • Reconnect Parties
    • Custom Party Variables
    • Player Groups
  • Changelog
    • API Upgrades
    • Legacy
Powered by GitBook
On this page
  1. Usage
  2. Reservations

Completing Reservations

PreviousThe Host ReservationNextLobby

Last updated 10 months ago

Completing a reservation means that the given player has arrived in the game, so his reservation no longer needs to be timed out.

How To Complete Reservations

Reservations are completed automatically when a player has loaded the map and joined the game.

The exception to this is when the host uses seamless travel to change maps (e.g. from lobby to game). Whether seamless traveling is used is set in the GameMode blueprint.

IMPORTANT: When seamless traveling is used, the host must complete the reservation of each seamless traveling player when they arrive on the new map.

For Blueprint projects, the game mode's OnSwapPlayerControllers event is a good place to complete the reservation of seamless traveling players. C++ projects can override the game mode's InitSeamlessTravelPlayer function directly.

#include "KronosReservationManager.h"
#include "GameFramework/PlayerState.h"
void AMyGameModeBase::InitSeamlessTravelPlayer(AController* NewController)
{
    Super::InitSeamlessTravelPlayer(NewController);
    
    // Make sure that the player state is valid.
    if (NewController->PlayerState)
    {
        // Get the reservation manager.
        UKronosReservationManager* ReservationManager = UKronosReservationManager::Get(this);
        
        // Check if we are managing reservations.
        if (ReservationManager->IsReservationHost())
        {
            // Complete the reservation of the player.
            ReservationManager->CompleteReservation(NewController->PlayerState->GetUniqueId());
        }
    }
}