bug fix 3
This commit is contained in:
parent
a7dcb72a2f
commit
cb905f62f1
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/Clock.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/Clock.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/Knock.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/Knock.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/SA_Default.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/SA_Default.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/SW_Clock.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/SW_Clock.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/SW_Knock.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Audio/Sounds/SW_Knock.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Decorations/BP_Door.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Decorations/BP_Door.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_1/Blueprints/BP_doorS.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_1/Blueprints/BP_doorS.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_1/L_Level1.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_1/L_Level1.umap
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/BP_Level2_BookSort.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/BP_Level2_BookSort.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/BP_Level2_MortisDoor.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/BP_Level2_MortisDoor.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/BP_Level2_Telescope.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/BP_Level2_Telescope.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_CrossyRoad.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_CrossyRoad.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_Fishing.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_Fishing.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_SubwaySurf.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_SubwaySurf.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/E_Level2_Event.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/E_Level2_Event.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/L_Level2.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/L_Level2.umap
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Sequencers/OnBeginPlay/Seq_Level2_clock.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Sequencers/OnBeginPlay/Seq_Level2_clock.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Sequencers/Seq_Level2_CarolRun.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Sequencers/Seq_Level2_CarolRun.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Sequencers/Seq_Level2_FromField.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Sequencers/Seq_Level2_FromField.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/MaterialsLibrary/M_InvisibleBarrier.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/MaterialsLibrary/M_InvisibleBarrier.uasset
(Stored with Git LFS)
Binary file not shown.
@ -107,9 +107,21 @@ void AInteractable::BeginPlay()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GetComponents(collisions, true);
|
GetComponents(collisions);
|
||||||
for(auto collision : collisions)
|
for(int32 i = 0; i < collisions.Num(); ++i)
|
||||||
{
|
{
|
||||||
|
auto collision = collisions[i];
|
||||||
|
switch(collision->GetCollisionResponseToChannel(GetCollisionChannel()))
|
||||||
|
{
|
||||||
|
case ECollisionResponse::ECR_Ignore:
|
||||||
|
case ECollisionResponse::ECR_Overlap:
|
||||||
|
collisions.RemoveAt(i, EAllowShrinking::No);
|
||||||
|
--i;
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if(activatorTypes)
|
if(activatorTypes)
|
||||||
{
|
{
|
||||||
collision->SetCollisionProfileName(collisionProfile);
|
collision->SetCollisionProfileName(collisionProfile);
|
||||||
@ -128,9 +140,13 @@ void AInteractable::BeginPlay()
|
|||||||
collision->SetRenderCustomDepth(true);
|
collision->SetRenderCustomDepth(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
collisions.Shrink();
|
||||||
|
|
||||||
if(auto PC = UGameplayStatics::GetPlayerController(GetWorld(), 0))
|
if(auto PC = UGameplayStatics::GetPlayerController(GetWorld(), 0))
|
||||||
player = Cast<APlayerBase>(PC->GetPawn());
|
player = Cast<APlayerBase>(PC->GetPawn());
|
||||||
|
|
||||||
|
if(lockOnBeginPlay)
|
||||||
|
Lock();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AInteractable::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
void AInteractable::EndPlay(const EEndPlayReason::Type EndPlayReason)
|
||||||
|
@ -87,6 +87,9 @@ protected:
|
|||||||
/** Mask of active activator types */
|
/** Mask of active activator types */
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (Bitmask, BitmaskEnum = "EActivatorType"))
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (Bitmask, BitmaskEnum = "EActivatorType"))
|
||||||
int32 activated = 0;
|
int32 activated = 0;
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
bool lockOnBeginPlay = false;
|
||||||
|
TArray<UPrimitiveComponent*> collisions;
|
||||||
|
|
||||||
/** TArray cannot be a value of a TMap */
|
/** TArray cannot be a value of a TMap */
|
||||||
struct FModificatorsArray
|
struct FModificatorsArray
|
||||||
@ -96,8 +99,6 @@ protected:
|
|||||||
|
|
||||||
/** Map of modificators to activator types initialized on BeginPlay */
|
/** Map of modificators to activator types initialized on BeginPlay */
|
||||||
TMap<EActivatorType, FModificatorsArray> modificators;
|
TMap<EActivatorType, FModificatorsArray> modificators;
|
||||||
|
|
||||||
TArray<UPrimitiveComponent*> collisions;
|
|
||||||
class APlayerBase* player = nullptr;
|
class APlayerBase* player = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user