Skip to content

Commit 96d2e88

Browse files
Merge pull request #178 from spatialos/0.10.0-rc
Release 0.10.0
2 parents c8ba083 + d0c86fa commit 96d2e88

File tree

170 files changed

+1038
-575
lines changed

Some content is hidden

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

170 files changed

+1038
-575
lines changed

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
**/Intermediate/
1616
**/Saved/
1717

18+
# Built data for maps
19+
*_BuiltData.uasset
20+
1821
# SpatialOS files
1922
logs
2023
build/

DeployGame.bat

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ set deploymentname=%gamename%%formatdate%
1414
cd spatial/
1515
spatial build build-config || goto :error
1616
spatial cloud upload %deploymentname% --force || goto :error
17-
spatial cloud launch %deploymentname% one_worker_test.json %deploymentname% --snapshot=snapshots/default.snapshot --cluster_region=eu || goto :error
17+
spatial cloud launch %deploymentname% one_worker_test.json %deploymentname% --snapshot=snapshots/default.snapshot --cluster_region=eu --runtime_version=0.4.3 || goto :error
1818
spatial project deployment tags add %deploymentname% dev_login || goto :error
1919
spatial project deployment tags add %deploymentname% status_lobby || goto :error
2020

Game/Config/DefaultEngine.ini

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[/Script/EngineSettings.GameMapsSettings]
2-
GameDefaultMap=/Game/Maps/Deployments.Deployments
3-
EditorStartupMap=/Game/Maps/FPS-Start_Tiny.FPS-Start_Tiny
4-
GlobalDefaultGameMode=/Game/GameMode/BP_DeathmatchGameMode.BP_DeathmatchGameMode_C
5-
GameInstanceClass=/Script/SpatialGDK.SpatialGameInstance
2+
GameDefaultMap=/Engine/Maps/Entry.Entry
3+
EditorStartupMap=/Game/Maps/Control_Small.Control_Small
4+
GlobalDefaultGameMode=/Game/GameMode/BP_ControlGameMode.BP_ControlGameMode_C
5+
GameInstanceClass=/Game/GameMode/BP_GDKShooterGameInstance.BP_GDKShooterGameInstance_C
66
GlobalDefaultServerGameMode=None
7-
ServerDefaultMap=/Game/Maps/FPS-Start_Medium.FPS-Start_Medium
7+
ServerDefaultMap=/Game/Maps/Control_Small.Control_Small
88

99
[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
1010
MinimumiOSVersion=IOS_11

Game/Config/DefaultGame.ini

+5-3
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,14 @@ ProjectName=SpatialOS Unreal GDK Shooter
44
CopyrightNotice=Copyright (c) Improbable Worlds Ltd, All Rights Reserved
55
bSpatialNetworking=True
66

7-
[/Script/UnrealEd.ProjectPackagingSettings]
8-
+DirectoriesToAlwaysCook=(Path="Spatial")
9-
107
[/Script/Engine.RendererSettings]
118
r.LightPropagationVolume = 1
129

1310
[/Script/Engine.GameSession]
1411
MaxPlayers=100
1512
MaxSpectators=100
13+
14+
[/Script/UnrealEd.ProjectPackagingSettings]
15+
+MapsToCook=(FilePath="/Game/Maps/Control_Medium")
16+
+MapsToCook=(FilePath="/Game/Maps/Control_Small")
17+
+DirectoriesToAlwaysCook=(Path="/Game/Spatial")

Game/Config/DefaultSpatialGDKSettings.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,5 +43,5 @@ UdpServerUpstreamUpdateIntervalMS=1
4343
UdpServerDownstreamUpdateIntervalMS=1
4444
UdpClientUpstreamUpdateIntervalMS=1
4545
UdpClientDownstreamUpdateIntervalMS=1
46-
SpatialDebugger=BlueprintGeneratedClass'/Game/Blueprints/LoadBalancing/BP_VerboseSpatialDebugger.BP_VerboseSpatialDebugger_C'
46+
SpatialDebugger=None
4747

Game/Content/AI/BB_NPC.uasset

-2.13 KB
Binary file not shown.

Game/Content/AI/BB_Wander.uasset

2.46 KB
Binary file not shown.

Game/Content/AI/BT_Wander.uasset

70 Bytes
Binary file not shown.
826 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.
5.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.
32.6 KB
Binary file not shown.
Binary file not shown.
181 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-10.8 KB
Binary file not shown.
-134 KB
Binary file not shown.
Binary file not shown.
4.49 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.
29.8 KB
Binary file not shown.
18.9 KB
Binary file not shown.
Binary file not shown.
-17.7 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.
-17.8 KB
Binary file not shown.
-33.2 KB
Binary file not shown.
701 Bytes
Binary file not shown.
Binary file not shown.

Game/Content/Maps/Control_Medium.umap

2.41 MB
Binary file not shown.

Game/Content/Maps/Control_Small.umap

452 KB
Binary file not shown.

Game/Content/Maps/Corridor_Gym.umap

-166 KB
Binary file not shown.
Binary file not shown.

Game/Content/Maps/CrashBot_Gym.umap

-291 KB
Binary file not shown.
Binary file not shown.

Game/Content/Maps/Deployments.umap

-28 KB
Binary file not shown.
-34.4 MB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-1.84 MB
Binary file not shown.
Binary file not shown.
-1.65 MB
Binary file not shown.
-572 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

Game/Content/Maps/FPS-Start_Tiny.umap

-352 KB
Binary file not shown.
Binary file not shown.
-833 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
24.6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-25.9 KB
Binary file not shown.
Binary file not shown.
23.2 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.
-8.22 KB
Binary file not shown.
-9.59 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
-6.86 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.

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

+8-2
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ void UHealthComponent::TakeDamage(float Damage, const FDamageEvent& DamageEvent,
8080
if (InstigatorPlayerState != nullptr)
8181
{
8282
InstigatorPlayerId = InstigatorPlayerState->PlayerId;
83+
if (const UTeamComponent* TeamComponent = InstigatorPlayerState->FindComponentByClass<UTeamComponent>())
84+
{
85+
InstigatorTeamId = TeamComponent->GetTeam();
86+
}
8387
}
8488
}
8589
if (IGenericTeamAgentInterface* InstgatorTeam = Cast<IGenericTeamAgentInterface>(EventInstigator))
@@ -157,6 +161,8 @@ void UHealthComponent::TakeDamage(float Damage, const FDamageEvent& DamageEvent,
157161
{
158162
GetOwner()->GetWorldTimerManager().SetTimer(ArmourRegenerationHandle, this, &UHealthComponent::RegenerateArmour, ArmourRegenInterval, true, ArmourRegenCooldown);
159163
}
164+
165+
AuthoritativeDamage.Broadcast(EventInstigator);
160166
}
161167
}
162168

@@ -214,7 +220,7 @@ void UHealthComponent::OnRep_CurrentHealth()
214220
}
215221
}
216222

217-
void UHealthComponent::MulticastDamageTaken_Implementation(float Value, FVector Source, FVector Impact, int32 PlayerId, FGenericTeamId TeamId)
223+
void UHealthComponent::MulticastDamageTaken_Implementation(float Value, FVector Source, FVector Impact, int32 InstigatorPlayerId, FGenericTeamId InstigatorTeamId)
218224
{
219-
DamageTaken.Broadcast(Value, Source, Impact, PlayerId, TeamId);
225+
DamageTaken.Broadcast(Value, Source, Impact, InstigatorPlayerId, InstigatorTeamId);
220226
}

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

+5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ void UTeamComponent::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>& OutLi
2121

2222
bool UTeamComponent::CanDamageActor(AActor* OtherActor)
2323
{
24+
if (!IsValid(OtherActor))
25+
{
26+
return false;
27+
}
28+
2429
if (bAllowFriendlyFire)
2530
{
2631
return true;

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

+4
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,10 @@ void UControllerEventsComponent::Death_Implementation(const AController* Killer)
2121
{
2222
ClientInformOfDeath(KillerPlayerState->GetPlayerName(), KillerPlayerState->PlayerId);
2323
}
24+
else
25+
{
26+
ClientInformOfDeath(TEXT("") /*PlayerName*/, -1 /*PlayerID*/);
27+
}
2428
}
2529
}
2630

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

+9-3
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,22 @@ UTeamSettingComponent::UTeamSettingComponent()
99
PrimaryComponentTick.bCanEverTick = false;
1010
}
1111

12-
void UTeamSettingComponent::BeginPlay()
12+
void UTeamSettingComponent::UpdateTeam(FGenericTeamId InTeamId)
1313
{
14-
Super::BeginPlay();
14+
TeamId = InTeamId;
1515
if (AAIController* OwningController = Cast<AAIController>(GetOwner()))
1616
{
1717
OwningController->SetGenericTeamId(TeamId);
1818
}
19-
else
19+
else
2020
{
2121
UE_LOG(LogGDK, Error, TEXT("TeamSettingComponent is designed to work with AIControllers, will not work with %s"), *GetOwner()->GetName());
2222
}
2323
}
2424

25+
void UTeamSettingComponent::BeginPlay()
26+
{
27+
Super::BeginPlay();
28+
UpdateTeam(TeamId);
29+
}
30+

Game/Source/GDKShooter/Private/Deployments/DeploymentsPlayerController.cpp

-128
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
// Copyright (c) Improbable Worlds Ltd, All Rights Reserved
2+
3+
#include "GDKShooterFunctionLibrary.h"
4+
#include "GameFramework/Pawn.h"
5+
#include "Perception/AIPerceptionStimuliSourceComponent.h"
6+
7+
8+
void UGDKShooterFunctionLibrary::SetGenericTeamId(AActor* Actor, FGenericTeamId NewTeamId)
9+
{
10+
IGenericTeamAgentInterface* TeamAgentActor = Cast<IGenericTeamAgentInterface>(Actor);
11+
IGenericTeamAgentInterface* TeamAgentController = nullptr;
12+
if (APawn* AsPawn = Cast<APawn>(Actor))
13+
{
14+
TeamAgentController = Cast<IGenericTeamAgentInterface>(AsPawn->GetController());
15+
}
16+
17+
if (TeamAgentActor != nullptr)
18+
{
19+
TeamAgentActor->SetGenericTeamId(NewTeamId);
20+
}
21+
22+
if (TeamAgentController != nullptr)
23+
{
24+
TeamAgentController->SetGenericTeamId(NewTeamId);
25+
}
26+
27+
if (UAIPerceptionStimuliSourceComponent* PerceptionStimuli = Actor->FindComponentByClass<UAIPerceptionStimuliSourceComponent>())
28+
{
29+
PerceptionStimuli->UnregisterFromPerceptionSystem();
30+
PerceptionStimuli->RegisterWithPerceptionSystem();
31+
}
32+
}
33+
34+
FGenericTeamId UGDKShooterFunctionLibrary::GetGenericTeamId(AActor* Actor)
35+
{
36+
IGenericTeamAgentInterface* TeamAgent = Cast<IGenericTeamAgentInterface>(Actor);
37+
38+
if (TeamAgent == nullptr)
39+
{
40+
if (APawn* AsPawn = Cast<APawn>(Actor))
41+
{
42+
TeamAgent = Cast<IGenericTeamAgentInterface>(AsPawn->GetController());
43+
}
44+
}
45+
46+
if (TeamAgent != nullptr)
47+
{
48+
return TeamAgent->GetGenericTeamId();
49+
}
50+
51+
return FGenericTeamId::NoTeam;
52+
}

0 commit comments

Comments
 (0)