// Fill out your copyright notice in the Description page of Project Settings.


#include "CM_PlayerController.h"

#include "CorruptedMemoryGameMode.h"

void ACM_PlayerController::BeginPlay()
{
	Super::BeginPlay();
	FString MapName = GetWorld()->GetMapName();
	MapName.RemoveFromStart(GetWorld()->StreamingLevelsPrefix);
	if (MapName == "ClientEntry") return;
	if (!GetWorld()->GetAuthGameMode()) return;
	Cast<ACorruptedMemoryGameMode>(GetWorld()->GetAuthGameMode())->ServerSpawnPlayer(this);
}
