diff --git a/Content/Characters/Blueprints/BP_Cloud9CharacterPlayer.uasset b/Content/Characters/Blueprints/BP_Cloud9CharacterPlayer.uasset index d95de49d3..4ecd6a36c 100644 Binary files a/Content/Characters/Blueprints/BP_Cloud9CharacterPlayer.uasset and b/Content/Characters/Blueprints/BP_Cloud9CharacterPlayer.uasset differ diff --git a/Content/Characters/Effects/BP_ShieldEffect.uasset b/Content/Characters/Effects/BP_ShieldEffect.uasset deleted file mode 100644 index a4dca625f..000000000 Binary files a/Content/Characters/Effects/BP_ShieldEffect.uasset and /dev/null differ diff --git a/Content/Characters/Effects/BP_ShieldEffectBot.uasset b/Content/Characters/Effects/BP_ShieldEffectBot.uasset new file mode 100644 index 000000000..503b41171 Binary files /dev/null and b/Content/Characters/Effects/BP_ShieldEffectBot.uasset differ diff --git a/Content/Characters/Effects/BP_ShieldEffectPlayer.uasset b/Content/Characters/Effects/BP_ShieldEffectPlayer.uasset new file mode 100644 index 000000000..13d0929ef Binary files /dev/null and b/Content/Characters/Effects/BP_ShieldEffectPlayer.uasset differ diff --git a/Content/Maps/warmup.umap b/Content/Maps/warmup.umap index cd885d1f2..558590b05 100644 Binary files a/Content/Maps/warmup.umap and b/Content/Maps/warmup.umap differ diff --git a/Content/Modes/BP_Cloud9Default.uasset b/Content/Modes/BP_Cloud9Default.uasset index d08af2fdc..c9666bcea 100644 Binary files a/Content/Modes/BP_Cloud9Default.uasset and b/Content/Modes/BP_Cloud9Default.uasset differ diff --git a/Source/Cloud9/Character/Cloud9Character.cpp b/Source/Cloud9/Character/Cloud9Character.cpp index e3c2862ef..4fff06b1c 100644 --- a/Source/Cloud9/Character/Cloud9Character.cpp +++ b/Source/Cloud9/Character/Cloud9Character.cpp @@ -67,6 +67,8 @@ ACloud9Character::ACloud9Character(const FObjectInitializer& ObjectInitializer) bUseControllerRotationYaw = false; bUseControllerRotationRoll = false; + bNeedInitialize = true; + DestroyAfterTime = DefaultDestroyAfterTime; let MyCapsuleComponent = GetCapsuleComponent(); @@ -276,6 +278,11 @@ void ACloud9Character::SetCameraZoomHeight(float Value) const CameraBoom->TargetArmLength = Value; } +bool ACloud9Character::GetNeedInitialize() const +{ + return bNeedInitialize; +} + UCloud9InventoryComponent* ACloud9Character::GetInventoryComponent() const { return InventoryComponent; } UCloud9HealthComponent* ACloud9Character::GetHealthComponent() const { return HealthComponent; } diff --git a/Source/Cloud9/Character/Cloud9Character.h b/Source/Cloud9/Character/Cloud9Character.h index da9a640f0..e14f51b4f 100644 --- a/Source/Cloud9/Character/Cloud9Character.h +++ b/Source/Cloud9/Character/Cloud9Character.h @@ -112,6 +112,8 @@ class ACloud9Character : public ACharacter float GetCameraZoomHeight() const; void SetCameraZoomHeight(float Value) const; + bool GetNeedInitialize() const; + UCloud9InventoryComponent* GetInventoryComponent() const; UCloud9HealthComponent* GetHealthComponent() const; @@ -146,9 +148,11 @@ class ACloud9Character : public ACharacter AActor* DamageCauser) override; private: - /** - * Time after which character will be destroyed after death - */ + /** "Temporary" hack field to control whether initialize character using game mode */ + UPROPERTY(EditAnywhere, BlueprintReadOnly, Category=Config, meta=(AllowPrivateAccess)) + bool bNeedInitialize; + + /** Time after which character will be destroyed after death */ UPROPERTY(EditAnywhere, Category=Config) float DestroyAfterTime; diff --git a/Source/Cloud9/Modes/Cloud9DefaultGameMode.cpp b/Source/Cloud9/Modes/Cloud9DefaultGameMode.cpp index 6c3ae280f..23fa7ae49 100644 --- a/Source/Cloud9/Modes/Cloud9DefaultGameMode.cpp +++ b/Source/Cloud9/Modes/Cloud9DefaultGameMode.cpp @@ -82,6 +82,7 @@ bool ACloud9DefaultGameMode::OnWorldStart(FSavedInfo& SavedInfo) TActorIterator(MyWorld) | ETContainer::FromIterator{} + | ETContainer::Filter{[](var& Character) { return Character.GetNeedInitialize(); }} | ETContainer::ForEach{ [PlayerConfig, BotConfig](var& Character) {