Skip to content

Commit d383ce3

Browse files
Merging final GDK for Unreal 0.11.0 release
Release 0.11.0
2 parents 96d2e88 + 1a08127 commit d383ce3

File tree

59 files changed

+76
-81
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+76
-81
lines changed
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
1.54 KB
Binary file not shown.
Binary file not shown.
32.1 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
14.5 KB
Binary file not shown.
1.07 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-268 Bytes
Binary file not shown.

Game/Source/GDKShooter/Private/Characters/Components/HealthComponent.cpp

+9-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
22

33
#include "Characters/Components/HealthComponent.h"
4+
5+
#include "GameFramework/Pawn.h"
6+
#include "Net/UnrealNetwork.h"
7+
#include "Runtime/Launch/Resources/Version.h"
8+
49
#include "Controllers/Components/ControllerEventsComponent.h"
510
#include "Game/Components/ScorePublisher.h"
6-
#include "GameFramework/Pawn.h"
711
#include "Characters/Components/TeamComponent.h"
8-
#include "Net/UnrealNetwork.h"
912

1013
UHealthComponent::UHealthComponent()
1114
{
@@ -79,7 +82,11 @@ void UHealthComponent::TakeDamage(float Damage, const FDamageEvent& DamageEvent,
7982
APlayerState* InstigatorPlayerState = EventInstigator->PlayerState;
8083
if (InstigatorPlayerState != nullptr)
8184
{
85+
#if ENGINE_MINOR_VERSION <= 24
8286
InstigatorPlayerId = InstigatorPlayerState->PlayerId;
87+
#else
88+
InstigatorPlayerId = InstigatorPlayerState->GetPlayerId();
89+
#endif
8390
if (const UTeamComponent* TeamComponent = InstigatorPlayerState->FindComponentByClass<UTeamComponent>())
8491
{
8592
InstigatorTeamId = TeamComponent->GetTeam();

Game/Source/GDKShooter/Private/Controllers/Components/ControllerEventsComponent.cpp

+10-1
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
22

33
#include "Controllers/Components/ControllerEventsComponent.h"
4+
45
#include "GameFramework/Controller.h"
56
#include "GameFramework/PlayerState.h"
6-
7+
#include "Runtime/Launch/Resources/Version.h"
78

89
UControllerEventsComponent::UControllerEventsComponent()
910
{
@@ -19,7 +20,11 @@ void UControllerEventsComponent::Death_Implementation(const AController* Killer)
1920
APlayerState* KillerPlayerState = Killer->PlayerState;
2021
if (KillerPlayerState != nullptr)
2122
{
23+
#if ENGINE_MINOR_VERSION <= 24
2224
ClientInformOfDeath(KillerPlayerState->GetPlayerName(), KillerPlayerState->PlayerId);
25+
#else
26+
ClientInformOfDeath(KillerPlayerState->GetPlayerName(), KillerPlayerState->GetPlayerId());
27+
#endif
2328
}
2429
else
2530
{
@@ -37,7 +42,11 @@ void UControllerEventsComponent::Kill_Implementation(const AController* Victim)
3742
APlayerState* VictimPlayerState = Victim->PlayerState;
3843
if (VictimPlayerState != nullptr)
3944
{
45+
#if ENGINE_MINOR_VERSION <= 24
4046
ClientInformOfKill(VictimPlayerState->GetPlayerName(), VictimPlayerState->PlayerId);
47+
#else
48+
ClientInformOfKill(VictimPlayerState->GetPlayerName(), VictimPlayerState->GetPlayerId());
49+
#endif
4150
}
4251
}
4352
}

Game/Source/GDKShooter/Private/Game/Components/DeathmatchScoreComponent.cpp

+10-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
22

33
#include "Game/Components/DeathmatchScoreComponent.h"
4+
45
#include "Net/UnrealNetwork.h"
6+
#include "Runtime/Launch/Resources/Version.h"
57

68
UDeathmatchScoreComponent::UDeathmatchScoreComponent()
79
{
@@ -18,10 +20,16 @@ void UDeathmatchScoreComponent::GetLifetimeReplicatedProps(TArray<FLifetimePrope
1820

1921
void UDeathmatchScoreComponent::RecordNewPlayer(APlayerState* PlayerState)
2022
{
21-
if (!PlayerScoreMap.Contains(PlayerState->PlayerId))
23+
#if ENGINE_MINOR_VERSION <= 24
24+
const int32 NewPlayerId = PlayerState->PlayerId;
25+
#else
26+
const int32 NewPlayerId = PlayerState->GetPlayerId();
27+
#endif
28+
29+
if (!PlayerScoreMap.Contains(NewPlayerId))
2230
{
2331
FPlayerScore NewPlayerScore;
24-
NewPlayerScore.PlayerId = PlayerState->PlayerId;
32+
NewPlayerScore.PlayerId = NewPlayerId;
2533
NewPlayerScore.PlayerName = PlayerState->GetPlayerName();
2634
NewPlayerScore.Kills = 0;
2735
NewPlayerScore.Deaths = 0;

Game/Source/GDKShooter/Private/Game/Components/TeamDeathmatchScoreComponent.cpp

+30-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
22

3-
43
#include "Game/Components/TeamDeathmatchScoreComponent.h"
4+
55
#include "Net/UnrealNetwork.h"
6+
#include "Runtime/Launch/Resources/Version.h"
7+
68
#include "Characters/Components/TeamComponent.h"
79

810
UTeamDeathmatchScoreComponent::UTeamDeathmatchScoreComponent()
@@ -29,12 +31,18 @@ void UTeamDeathmatchScoreComponent::SetTeamScores(TArray<FTeamScore> InitialTeam
2931

3032
void UTeamDeathmatchScoreComponent::RecordNewPlayer(APlayerState* PlayerState)
3133
{
32-
if (!PlayerScoreMap.Contains(PlayerState->PlayerId))
34+
#if ENGINE_MINOR_VERSION <= 24
35+
const int32 NewPlayerId = PlayerState->PlayerId;
36+
#else
37+
const int32 NewPlayerId = PlayerState->GetPlayerId();
38+
#endif
39+
40+
if (!PlayerScoreMap.Contains(NewPlayerId))
3341
{
3442
if (const UTeamComponent* TeamComponent = PlayerState->FindComponentByClass<UTeamComponent>())
3543
{
3644
FPlayerScore NewPlayerScore;
37-
NewPlayerScore.PlayerId = PlayerState->PlayerId;
45+
NewPlayerScore.PlayerId = NewPlayerId;
3846
NewPlayerScore.PlayerName = PlayerState->GetPlayerName();
3947
NewPlayerScore.Kills = 0;
4048
NewPlayerScore.Deaths = 0;
@@ -70,15 +78,21 @@ void UTeamDeathmatchScoreComponent::RecordNewPlayer(APlayerState* PlayerState)
7078

7179
void UTeamDeathmatchScoreComponent::RemovePlayer(APlayerState* PlayerState)
7280
{
73-
if (PlayerScoreMap.Contains(PlayerState->PlayerId))
81+
#if ENGINE_MINOR_VERSION <= 24
82+
const int32 RemovedPlayerId = PlayerState->PlayerId;
83+
#else
84+
const int32 RemovedPlayerId = PlayerState->GetPlayerId();
85+
#endif
86+
87+
if (PlayerScoreMap.Contains(RemovedPlayerId))
7488
{
7589
if (const UTeamComponent* TeamComponent = PlayerState->FindComponentByClass<UTeamComponent>())
7690
{
7791
const uint8 TeamId = TeamComponent->GetTeam().GetId();
7892
if (TeamScoreMap.Contains(TeamId))
7993
{
8094
TArray<FPlayerScore>* PlayerScores = &TeamScoreArray[TeamScoreMap[TeamId]].PlayerScores;
81-
PlayerScores->RemoveAt(PlayerScoreMap[PlayerState->PlayerId]);
95+
PlayerScores->RemoveAt(PlayerScoreMap[RemovedPlayerId]);
8296
for (int i = 0; i < PlayerScores->Num(); i++)
8397
{
8498
int32 PlayerId = (*PlayerScores)[i].PlayerId;
@@ -87,23 +101,29 @@ void UTeamDeathmatchScoreComponent::RemovePlayer(APlayerState* PlayerState)
87101
}
88102
}
89103

90-
PlayerScoreMap.Remove(PlayerState->PlayerId);
104+
PlayerScoreMap.Remove(RemovedPlayerId);
91105
}
92106
}
93107

94108
void UTeamDeathmatchScoreComponent::RecordKill(APlayerState* KillerState, APlayerState* VictimState)
95109
{
96-
if (PlayerScoreMap.Contains(KillerState->PlayerId))
110+
#if ENGINE_MINOR_VERSION <= 24
111+
const int32 KillerId = KillerState->PlayerId;
112+
const int32 VictimId = VictimState->PlayerId;
113+
#else
114+
const int32 KillerId = KillerState->GetPlayerId();
115+
const int32 VictimId = VictimState->GetPlayerId();
116+
#endif
117+
118+
if (PlayerScoreMap.Contains(KillerId))
97119
{
98-
const int32 KillerId = KillerState->PlayerId;
99120
const uint8 KillerTeamId = KillerState->FindComponentByClass<UTeamComponent>()->GetTeam().GetId();
100121

101122
++TeamScoreArray[TeamScoreMap[KillerTeamId]].PlayerScores[PlayerScoreMap[KillerId]].Kills;
102123
}
103124

104-
if (PlayerScoreMap.Contains(VictimState->PlayerId))
125+
if (PlayerScoreMap.Contains(VictimId))
105126
{
106-
const int32 VictimId = VictimState->PlayerId;
107127
const uint8 VictimTeamId = VictimState->FindComponentByClass<UTeamComponent>()->GetTeam().GetId();
108128

109129
++TeamScoreArray[TeamScoreMap[VictimTeamId]].PlayerScores[PlayerScoreMap[VictimId]].Deaths;

Game/Source/GDKShooter/Private/Game/Components/TeamDeathmatchSpawnerComponent.cpp

+6
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,12 @@ void UTeamDeathmatchSpawnerComponent::SetTeams(TArray<FGenericTeamId> TeamIds)
6363

6464
void UTeamDeathmatchSpawnerComponent::RequestSpawn(APlayerController* Controller)
6565
{
66+
if (TeamAssignments.Num() == 0)
67+
{
68+
UE_LOG(LogTeamDeathmatchSpawnerComponent, Error, TEXT("Requested spawn but Spawner component hasn't been initialized! Controller: %s"), *GetNameSafe(Controller));
69+
return;
70+
}
71+
6672
int32 TeamId = -1;
6773
if (SpawnedPlayers.Contains(Controller))
6874
{

UnrealGDKVersion.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
0.10.0
1+
0.11.0

ci/nightly.template.steps.yaml

+2-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ windows: &windows
2222
- "permission_set=builder"
2323
- "platform=windows"
2424
- "scaler_version=2"
25-
- "queue=${CI_WINDOWS_BUILDER_QUEUE:-v4-20-03-26-102432-bk9951-8afe0ffb}"
25+
- "queue=${CI_WINDOWS_BUILDER_QUEUE:-v4-20-07-20-102655-bk13456-70b30abf-d}"
2626
- "boot_disk_size_gb=500"
2727
timeout_in_minutes: 60 # TODO(ENG-548): reduce timeout once agent-cold-start is optimised.
2828
retry:
@@ -63,3 +63,4 @@ steps:
6363
STEP_NUMBER: "${STEP_NUMBER}"
6464
GDK_BRANCH: "${GDK_BRANCH}"
6565
UE-SharedDataCachePath: "\\\\gdk-for-unreal-cache.${CI_ENVIRONMENT}-intinf-eu1.i8e.io\\samba\\ddc"
66+
NDKROOT: "c:/Android/android-ndk-r21d"

ci/setup-and-build.ps1

+7-6
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,9 @@ pushd "$exampleproject_home"
133133
"GDKShooter", `
134134
"Win64", `
135135
"Development", `
136-
"GDKShooter.uproject"
137-
)
136+
"GDKShooter.uproject", `
137+
"-nocompile"
138+
)
138139
$build_client_handle = $build_client_proc.Handle
139140
Wait-Process -InputObject $build_client_proc
140141
if ($build_client_proc.ExitCode -ne 0) {
@@ -148,8 +149,9 @@ pushd "$exampleproject_home"
148149
"GDKShooterServer", `
149150
"Linux", `
150151
"Development", `
151-
"GDKShooter.uproject"
152-
)
152+
"GDKShooter.uproject", `
153+
"-nocompile"
154+
)
153155
$build_server_handle = $build_server_proc.Handle
154156
Wait-Process -InputObject $build_server_proc
155157

@@ -180,8 +182,7 @@ pushd "$exampleproject_home"
180182
"-targetplatform=Android", `
181183
"-cookflavor=Multi", `
182184
"-build", `
183-
"-utf8output", `
184-
"-compile"
185+
"-utf8output"
185186
)
186187

187188
$build_server_handle = $build_server_proc.Handle

spatial/default_launch.json

-57
This file was deleted.

spatial/workers/improbable/spatialos.SimulatedPlayerCoordinator.worker.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"${IMPROBABLE_WORKER_ID}",
4141
"coordinator_start_delay_millis=10000",
4242

43-
"connect.to.spatialos",
43+
"127.0.0.1",
4444
"+workerType",
4545
"UnrealClient",
4646
"+deployment",

0 commit comments

Comments
 (0)