Skip to content

Commit

Permalink
Use shorter name for EScopedGameType::DedicatedServer
Browse files Browse the repository at this point in the history
  • Loading branch information
slonopotamus committed Aug 5, 2024
1 parent e4aa7f3 commit c09301c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ TEST(MyGame, SimpleMultiplayerTest)
auto Tester = FScopedGame().Create();
// You can create a dedicated server
UGameInstance* Server = Tester.CreateGame(EScopedGameType::DedicatedServer, TEXT("/Engine/Maps/Entry"));
UGameInstance* Server = Tester.CreateGame(EScopedGameType::Server, TEXT("/Engine/Maps/Entry"));
// You can connect a client to it
UGameInstance* Client = Tester.CreateClientFor(Server);
Expand Down
4 changes: 2 additions & 2 deletions Source/UEST/Private/ScopedGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ UGameInstance* FScopedGameInstance::CreateGame(const EScopedGameType Type, const
auto* WorldContext = Game->GetWorldContext();
WorldContext->PIEInstance = ++LastInstanceId;
WorldContext->PIEPrefix = UWorld::BuildPIEPackagePrefix(WorldContext->PIEInstance);
WorldContext->RunAsDedicated = Type == EScopedGameType::DedicatedServer;
WorldContext->RunAsDedicated = Type == EScopedGameType::Server;

if (Type == EScopedGameType::Client)
{
Expand All @@ -133,7 +133,7 @@ UGameInstance* FScopedGameInstance::CreateGame(const EScopedGameType Type, const
{
FURL URL(nullptr, *MapToLoad, TRAVEL_Absolute);

if (Type == EScopedGameType::DedicatedServer)
if (Type == EScopedGameType::Server)
{
URL.AddOption(TEXT("listen"));
}
Expand Down
2 changes: 1 addition & 1 deletion Source/UEST/Private/ScopedGameTests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ TEST(UEST, ScopedGame, Simple)
auto Tester = FScopedGame().Create();

// You can create a dedicated server
UGameInstance* Server = Tester.CreateGame(EScopedGameType::DedicatedServer, TEXT("/Engine/Maps/Entry"));
UGameInstance* Server = Tester.CreateGame(EScopedGameType::Server, TEXT("/Engine/Maps/Entry"));

// You can connect a client to it
UGameInstance* Client = Tester.CreateClientFor(Server);
Expand Down
2 changes: 1 addition & 1 deletion Source/UEST/Public/ScopedGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

enum class EScopedGameType : uint8
{
DedicatedServer,
Server,
Client,
Empty,
};
Expand Down

0 comments on commit c09301c

Please sign in to comment.