Player Sessions Completed - working project at this point

This commit is contained in:
Norman Lansing
2026-04-07 06:36:11 -04:00
parent b7c4a07d00
commit 1370b05ff4
458 changed files with 287 additions and 36 deletions

View File

@@ -167,6 +167,15 @@ void UPortalManager::FindPlayerSession_Response(FHttpRequestPtr Request, FHttpRe
const FString IPAndPort = PlayerSession.IpAddress + TEXT(":") + FString::FromInt(PlayerSession.Port);
const FName Address(*IPAndPort);
APlayerController* LocalPlayerController = GEngine->GetFirstLocalPlayerController(GetWorld());
if (IsValid(LocalPlayerController))
{
FInputModeGameOnly InputModeData;
LocalPlayerController->SetInputMode(InputModeData);
LocalPlayerController->SetShowMouseCursor(false);
}
UGameplayStatics::OpenLevel(this, Address);
}
}

View File

@@ -7,6 +7,7 @@ public class FPSTemplateTarget : TargetRules
{
public FPSTemplateTarget(TargetInfo Target) : base(Target)
{
BuildEnvironment = TargetBuildEnvironment.Unique;
Type = TargetType.Game;
DefaultBuildSettings = BuildSettingsVersion.V6;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_7;

View File

@@ -1,8 +1,6 @@
// Copyright Epic Games, Inc. All Rights Reserved.
using System.IO;
using UnrealBuildTool;
using System.Linq;
public class FPSTemplate : ModuleRules
{
@@ -18,7 +16,6 @@ public class FPSTemplate : ModuleRules
"InputCore",
"EnhancedInput",
"PhysicsCore",
"OpenSSL",
"DedicatedServers"
});
@@ -26,13 +23,12 @@ public class FPSTemplate : ModuleRules
{
"GameplayTags",
"Slate",
"SlateCore",
"OpenSSL",
"SlateCore"
});
// Uncomment if you are using Slate UI
// PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" });
// Uncomment if you are using online features
// PrivateDependencyModuleNames.Add("OnlineSubsystem");

View File

@@ -359,10 +359,7 @@ void UCombatComponent::Server_FireWeapon_Implementation(const FVector_NetQuantiz
bLethal = IPlayerInterface::Execute_DoDamage(Impact.GetActor(), Damage, GetOwner());
bHit = true;
}
else
{
bHit = false;
}
OnRoundReported.Broadcast(GetOwner(), Impact.GetActor(), bHit, bHeadShot, bLethal);
if (GetNetMode() != NM_ListenServer || !Cast<APawn>(GetOwner())->IsLocallyControlled())
@@ -549,7 +546,7 @@ void UCombatComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActo
if (APlayerController* PC = Cast<APlayerController>(OwningPawn->GetController()); IsValid(PC))
{
FVector2D ViewportSize;
FVector2D ViewportSize{};
if (GEngine && GEngine->GameViewport)
{
GEngine->GameViewport->GetViewportSize(ViewportSize);
@@ -615,7 +612,7 @@ FVector UCombatComponent::HitScanTrace(float SweepRadius, FHitResult& OutHit)
ResponseParams.CollisionResponse.SetResponse(ECC_WorldDynamic, ECR_Block);
ResponseParams.CollisionResponse.SetResponse(ECC_PhysicsBody, ECR_Block);
FVector2D ViewportSize;
FVector2D ViewportSize{};
if (GEngine && GEngine->GameViewport)
{
GEngine->GameViewport->GetViewportSize(ViewportSize);

View File

@@ -3,7 +3,8 @@
#pragma once
#include "CoreMinimal.h"
#include "DedicatedServers/Public/Game/DS_GameMode.h"
#include "Game/DS_GameMode.h"
#include "GameFramework/GameMode.h"
#include "ShooterGameModeBase.generated.h"
/**

View File

@@ -7,6 +7,7 @@ public class FPSTemplateEditorTarget : TargetRules
{
public FPSTemplateEditorTarget( TargetInfo Target) : base(Target)
{
BuildEnvironment = TargetBuildEnvironment.Unique;
Type = TargetType.Editor;
DefaultBuildSettings = BuildSettingsVersion.V6;
IncludeOrderVersion = EngineIncludeOrderVersion.Unreal5_7;