Skip to content

Commit

Permalink
#248 Added shield effect debug bot
Browse files Browse the repository at this point in the history
  • Loading branch information
xthebat committed Apr 29, 2024
1 parent ef98fbf commit f65804c
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 3 deletions.
Binary file modified Content/Characters/Blueprints/BP_Cloud9CharacterPlayer.uasset
Binary file not shown.
Binary file removed Content/Characters/Effects/BP_ShieldEffect.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Content/Maps/warmup.umap
Binary file not shown.
Binary file modified Content/Modes/BP_Cloud9Default.uasset
Binary file not shown.
7 changes: 7 additions & 0 deletions Source/Cloud9/Character/Cloud9Character.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ ACloud9Character::ACloud9Character(const FObjectInitializer& ObjectInitializer)
bUseControllerRotationYaw = false;
bUseControllerRotationRoll = false;

bNeedInitialize = true;

DestroyAfterTime = DefaultDestroyAfterTime;

let MyCapsuleComponent = GetCapsuleComponent();
Expand Down Expand Up @@ -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; }
Expand Down
10 changes: 7 additions & 3 deletions Source/Cloud9/Character/Cloud9Character.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions Source/Cloud9/Modes/Cloud9DefaultGameMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ bool ACloud9DefaultGameMode::OnWorldStart(FSavedInfo& SavedInfo)

TActorIterator<ACloud9Character>(MyWorld)
| ETContainer::FromIterator{}
| ETContainer::Filter{[](var& Character) { return Character.GetNeedInitialize(); }}
| ETContainer::ForEach{
[PlayerConfig, BotConfig](var& Character)
{
Expand Down

0 comments on commit f65804c

Please sign in to comment.