2022-04-28 23:33:04 +00:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
|
|
|
|
#include "LobbyGameMode.h"
|
|
|
|
|
|
|
|
#include "GameFramework/GameStateBase.h"
|
|
|
|
|
|
|
|
void ALobbyGameMode::PostLogin(APlayerController* NewPlayer)
|
|
|
|
{
|
|
|
|
Super::PostLogin(NewPlayer);
|
|
|
|
|
|
|
|
int32 NumberOfPlayers = GameState.Get()->PlayerArray.Num();
|
|
|
|
if (NumberOfPlayers == 2)
|
|
|
|
{
|
|
|
|
UWorld* World = GetWorld();
|
|
|
|
if (World)
|
|
|
|
{
|
|
|
|
bUseSeamlessTravel = true;
|
|
|
|
World->ServerTravel(FString("/Game/Maps/BlasterMap?listen"));
|
|
|
|
}
|
|
|
|
}
|
2022-05-10 20:34:28 +00:00
|
|
|
}
|