diff --git a/Config/DefaultGame.ini b/Config/DefaultGame.ini index 82ead2b..e77086e 100644 --- a/Config/DefaultGame.ini +++ b/Config/DefaultGame.ini @@ -62,7 +62,7 @@ InternationalizationPreset=English -CulturesToStage=en +CulturesToStage=en LocalizationTargetCatchAllChunkId=0 -bCookAll=True +bCookAll=False bCookMapsOnly=False bSkipEditorContent=True bSkipMovies=False diff --git a/Content/Blueprints/Minigames/RythmClick/UI_Minigame_RythmClickCanvas.uasset b/Content/Blueprints/Minigames/RythmClick/UI_Minigame_RythmClickCanvas.uasset index 8acc85c..f14d0ae 100644 --- a/Content/Blueprints/Minigames/RythmClick/UI_Minigame_RythmClickCanvas.uasset +++ b/Content/Blueprints/Minigames/RythmClick/UI_Minigame_RythmClickCanvas.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:5c5dd18920d8f0e17a1a1e5c5351ed1b31c6aaee324b74882b8c826ec256e26b -size 162842 +oid sha256:3770033eabb585fd3c125c92d180c677642c11e4d8268dc2588082d7020daefd +size 164680 diff --git a/Content/Levels/Test/Actors/DialogueTest/BP_Test_DialogueSecondary.uasset b/Content/Levels/Test/Actors/DialogueTest/BP_Test_DialogueSecondary.uasset index 2ecfd0c..2ee9432 100644 --- a/Content/Levels/Test/Actors/DialogueTest/BP_Test_DialogueSecondary.uasset +++ b/Content/Levels/Test/Actors/DialogueTest/BP_Test_DialogueSecondary.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bb56002ee2b480656d397c4a3958e87d5a9b61935c9e034525ea4783d5122015 -size 58303 +oid sha256:2b0bb5d18430fb7579661adffde0f10ed788e17a9accef5072e9eaee5100e11d +size 61349 diff --git a/Content/UI/Materials/MM_EWord.uasset b/Content/UI/Materials/MM_EWord.uasset deleted file mode 100644 index 4961d2a..0000000 Binary files a/Content/UI/Materials/MM_EWord.uasset and /dev/null differ diff --git a/Source/Lost_Edge/Private/Interactable/Activators/InCameraInteractableActivator.h b/Source/Lost_Edge/Private/Interactable/Activators/InCameraInteractableActivator.h index fe872e4..6b42bf2 100644 --- a/Source/Lost_Edge/Private/Interactable/Activators/InCameraInteractableActivator.h +++ b/Source/Lost_Edge/Private/Interactable/Activators/InCameraInteractableActivator.h @@ -19,11 +19,10 @@ public: protected: virtual void OnRegister() override; - void Scan(); virtual void Scan_Implementation() override; UFUNCTION(BlueprintNativeEvent, BlueprintCallable) - void NewSeenInteractable(class AInteractable* interactable); + LOST_EDGE_API void NewSeenInteractable(class AInteractable* interactable); virtual void NewSeenInteractable_Implementation(class AInteractable* interactable); private: diff --git a/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.cpp b/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.cpp index 350eb52..402c680 100644 --- a/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.cpp +++ b/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.cpp @@ -49,7 +49,7 @@ void UInteractableActivator::TickComponent(float DeltaTime, enum ELevelTick Tick case ELevelTick::LEVELTICK_ViewportsOnly: case ELevelTick::LEVELTICK_All: USceneComponent::TickComponent(DeltaTime, TickType, ThisTickFunction); - Scan_Implementation(); + Scan(); break; default: break; diff --git a/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.h b/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.h index cdfac51..0ac6122 100644 --- a/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.h +++ b/Source/Lost_Edge/Private/Interactable/Activators/InteractableActivator.h @@ -21,13 +21,17 @@ public: UInteractableActivator(const FObjectInitializer& ObjectInitializer); virtual void TickComponent(float DeltaTime, enum ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; + UFUNCTION(BlueprintNativeEvent, BlueprintCallable) + LOST_EDGE_API void Rescan(); + virtual void Rescan_Implementation() {} + FInteractableActivated interactableActivatedDelegate; FInteractableActivated interactableDeactivatedDelegate; protected: UFUNCTION(BlueprintNativeEvent, BlueprintCallable) - inline void Scan(); - inline virtual void Scan_Implementation() PURE_VIRTUAL(UInteractableActivator::Scan_Implementation, ); + LOST_EDGE_API void Scan(); + virtual void Scan_Implementation() PURE_VIRTUAL(UInteractableActivator::Scan_Implementation, ); UPROPERTY(EditDefaultsOnly) EActivatorType activatorType; diff --git a/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.cpp b/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.cpp index 12e2a14..d9be978 100644 --- a/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.cpp +++ b/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.cpp @@ -12,6 +12,11 @@ URaycastInteractableActivator::URaycastInteractableActivator(const FObjectInitia activatorType = EActivatorType::Use; } +void URaycastInteractableActivator::Rescan_Implementation() +{ + _last = nullptr; +} + void URaycastInteractableActivator::Scan_Implementation() { FHitResult result{}; @@ -48,7 +53,7 @@ void URaycastInteractableActivator::Scan_Implementation() #ifdef INTERACTABLE_ACTIVATOR_DEBUG DrawDebugLine(GetWorld(), startLocation, endLocation, FColor::Green, false, PrimaryComponentTick.TickInterval, 0, 0.1f); #endif // INTERACTABLE_ACTIVATOR_DEBUG - } + } else { if(_activated) @@ -64,5 +69,5 @@ void URaycastInteractableActivator::Scan_Implementation() #ifdef INTERACTABLE_ACTIVATOR_DEBUG DrawDebugLine(GetWorld(), startLocation, endLocation, FColor::Red, false, PrimaryComponentTick.TickInterval, 10, 0.1f); #endif // INTERACTABLE_ACTIVATOR_DEBUG - } -} \ No newline at end of file + } + } \ No newline at end of file diff --git a/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.h b/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.h index 7161a4f..66d09fd 100644 --- a/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.h +++ b/Source/Lost_Edge/Private/Interactable/Activators/RaycastInteractableActivator.h @@ -15,8 +15,9 @@ class URaycastInteractableActivator : public UInteractableActivator public: URaycastInteractableActivator(const FObjectInitializer& ObjectInitializer); + virtual void Rescan_Implementation() override; + protected: - void Scan(); virtual void Scan_Implementation() override; private: diff --git a/Source/Lost_Edge/Private/PlayerBase.cpp b/Source/Lost_Edge/Private/PlayerBase.cpp index b3ef5f2..b866fbb 100644 --- a/Source/Lost_Edge/Private/PlayerBase.cpp +++ b/Source/Lost_Edge/Private/PlayerBase.cpp @@ -12,7 +12,6 @@ #include "Kismet/GameplayStatics.h" #include "Kismet/KismetMathLibrary.h" - #include "CustomGameInstanceBase.h" #include "CustomGameUserSettings.h" #include "Interactable/Activators/InteractableActivator.h" @@ -154,6 +153,9 @@ void APlayerBase::UnlockPlayer(FPlayerLock lock) interactionLocked -= lock.interaction; cameraLocked -= lock.camera; inventoryLocked -= lock.inventory; + + if(!interactionLocked) + ResetIntractions(); } void APlayerBase::FlyMode(bool on) @@ -164,6 +166,8 @@ void APlayerBase::FlyMode(bool on) void APlayerBase::ResetIntractions() { InteractableDeactivated(lastInteractable, static_cast(0xFF)); + for(auto activator : interactableActivators) + activator->Rescan(); } FVector APlayerBase::GetCameraDirection() @@ -267,6 +271,7 @@ void APlayerBase::LoadInteractablesActivators() component->interactableDeactivatedDelegate.BindUObject(this, &APlayerBase::InteractableDeactivated); component->SetupAttachment(camera); component->RegisterComponent(); + interactableActivators.Add(component); } } } @@ -290,9 +295,6 @@ void APlayerBase::InteractableDeactivated(AInteractable* interactable, EActivato if(!interactable) return; - if(interactionLocked) - return; - interactable->_Deactivate(type); if(interactable->GetActivatedFlags() == 0) diff --git a/Source/Lost_Edge/Private/PlayerBase.h b/Source/Lost_Edge/Private/PlayerBase.h index a07f7ee..5fd59dd 100644 --- a/Source/Lost_Edge/Private/PlayerBase.h +++ b/Source/Lost_Edge/Private/PlayerBase.h @@ -136,6 +136,7 @@ protected: bool bIsMoving = false; class AInteractable* lastInteractable = nullptr; + TArray interactableActivators; UPROPERTY() class USpringArmComponent* itemDropSpringArm;