diff --git a/UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap b/UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap index e5681fe..59ad440 100644 --- a/UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap +++ b/UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:7d3271efaeb1c80fffe888881f52c68cc0c519354b8a4fd870a6a285e09f498a -size 2404056 +oid sha256:93b28cfefc43caa741d096a16d55d84f28847caa894b5a72478204d638a47967 +size 2556332 diff --git a/UnrealProject/Lost_Edge/Content/Levels/Test/Actors/RuntimeLoadTest/BP_Test_RuntimeLoad.uasset b/UnrealProject/Lost_Edge/Content/Levels/Test/Actors/RuntimeLoadTest/BP_Test_RuntimeLoad.uasset index 3d7f124..19ad1cd 100644 --- a/UnrealProject/Lost_Edge/Content/Levels/Test/Actors/RuntimeLoadTest/BP_Test_RuntimeLoad.uasset +++ b/UnrealProject/Lost_Edge/Content/Levels/Test/Actors/RuntimeLoadTest/BP_Test_RuntimeLoad.uasset @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:d25b5bfb6c1d5db31568e87c1fbae6296dec08e889f64512ac5c09125ac31893 -size 85074 +oid sha256:84ec0a3eaa47a89fb9aafc803a8585729f3bb9dc08b928a952d897490605c8eb +size 85814 diff --git a/UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap b/UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap index 06d40a0..b2297b9 100644 --- a/UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap +++ b/UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:386daf846b454ae8db416cfaf4905dca8da51a7b64268fe62ede197754bf8d39 -size 2916187 +oid sha256:22b4df730eb43da5587b60a25f4056519a7bffa33cab7645711fb382ee7b6d6b +size 2916247 diff --git a/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/BP_CompanionPipe.uasset b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/BP_CompanionPipe.uasset new file mode 100644 index 0000000..11f27dd --- /dev/null +++ b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/BP_CompanionPipe.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:93ca8967228212694d76ab5e4399eb187f7dfb42d858ef2749d32f17433a0650 +size 21929 diff --git a/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/DA_RAIMaquett_Level3_CompanionPipe.uasset b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/DA_RAIMaquett_Level3_CompanionPipe.uasset new file mode 100644 index 0000000..21d3555 --- /dev/null +++ b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPipe/DA_RAIMaquett_Level3_CompanionPipe.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:f35d93a374bb42d282f24847f72232da0700f607986b5e499a5dcbee7f30ee2a +size 3316 diff --git a/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/BP_CompanionPyramid.uasset b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/BP_CompanionPyramid.uasset new file mode 100644 index 0000000..70c75db --- /dev/null +++ b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/BP_CompanionPyramid.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8d73ecb8031c754b0c3e51d118813b78297a6eebb4d96fafd1c37c9f1a3b1de1 +size 23217 diff --git a/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/DA_RAIMaquett_Level3_CompanionPyramid.uasset b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/DA_RAIMaquett_Level3_CompanionPyramid.uasset new file mode 100644 index 0000000..91f7e79 --- /dev/null +++ b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionPyramid/DA_RAIMaquett_Level3_CompanionPyramid.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ceb6e27ce597f1759e5a2bef60855e7f166278c3810f5d112e0da726ec15a17f +size 3367 diff --git a/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/BP_CompanionSphere.uasset b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/BP_CompanionSphere.uasset new file mode 100644 index 0000000..d057a52 --- /dev/null +++ b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/BP_CompanionSphere.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bf1662e512ae26436aa42bc91b571d4395931a63ad2034664b578d8a87bfb753 +size 23739 diff --git a/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/DA_RAIMaquett_Level3_CompanionSphere.uasset b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/DA_RAIMaquett_Level3_CompanionSphere.uasset new file mode 100644 index 0000000..218490b --- /dev/null +++ b/UnrealProject/Lost_Edge/Content/Misc/RAIMaquetts/Level3/CompanionSphere/DA_RAIMaquett_Level3_CompanionSphere.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:33058a571310dc7fa5fe887fd6c68079044a4c035ad4a4673df88d35ac9492b8 +size 3350 diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.cpp b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.cpp index 8f9040c..4c367c9 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.cpp +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.cpp @@ -53,7 +53,7 @@ TArray UContentLoader::ParseDirectoryIndex(const TArray& content if(contentType == httpContentTypeHtml) { std::string contentHtml{ reinterpret_cast(content.GetData()), static_cast(content.Num()) }; - std::regex hrefRegex(R"(& content, co } } -void UContentLoader::DownloadPak(FContentDownloadedCallback downloadedCallback, const EContentDownloadMethod method) +void UContentLoader::DownloadPak(FContentDownloadedCallback downloadedCallback, const FString& directory, const EContentDownloadMethod method) { - UE_LOG(LogTemp, Log, TEXT("ContentLoader: Requesting pak http index at %s."), pakIndexUrl); + const FString url = FString::Printf(TEXT("%s%s/"), pakIndexUrl, *directory); + + UE_LOG(LogTemp, Log, TEXT("ContentLoader: Requesting pak http index at %s."), *url); FHttpRequestCompleteDelegate indexRequestCallback; indexRequestCallback.BindLambda([=, this](FHttpRequestPtr request, FHttpResponsePtr response, bool successful) @@ -151,10 +153,10 @@ void UContentLoader::DownloadPak(FContentDownloadedCallback downloadedCallback, }); UE_LOG(LogTemp, Log, TEXT("ContentLoader: Starting to download pak %s from index."), *pakToDownload); - HttpGet(FString::Printf(TEXT("%s%s"), pakIndexUrl, *pakToDownload), pakDownloadCallback); + HttpGet(FString::Printf(TEXT("%s%s"), *url, *pakToDownload), pakDownloadCallback); }); - HttpGet(pakIndexUrl, indexRequestCallback); + HttpGet(url, indexRequestCallback); } UClass* UContentLoader::LoadPak(const FString& pakFilePath) diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.h index 50e9dae..cf65ecb 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/ContentLoader.h @@ -27,7 +27,7 @@ class UContentLoader : public UGameInstanceSubsystem public: UFUNCTION(BlueprintCallable, Category = "ContentLoader") - void DownloadPak(FContentDownloadedCallback downloadedCallback, const EContentDownloadMethod method = EContentDownloadMethod::NonRepeatRandom); + void DownloadPak(FContentDownloadedCallback downloadedCallback, const FString& directory = "", const EContentDownloadMethod method = EContentDownloadMethod::NonRepeatRandom); UFUNCTION(BlueprintCallable, Category = "ContentLoader") UClass* LoadPak(const FString& pakFilePath); diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/DialogueManager.cpp b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/DialogueManager.cpp index 2f440bc..9f33343 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/DialogueManager.cpp +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/DialogueManager.cpp @@ -225,6 +225,9 @@ void UDialogueManager::BeginDestroy() void UDialogueManager::OnDialogueEnd() { + if(!IsValid(this)) + return; + timersLock.Lock(); timers.RemoveAt(leadDialogueTimerId); timersLock.Unlock(); diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.cpp b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.cpp index 271ced8..a853935 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.cpp +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.cpp @@ -144,6 +144,11 @@ void UMoveInteractableModificator::TurnOnRotating() FScopeLock lock1(&critical); rotating = true; player->LockPlayer({ .camera = true }); + if(positionUpdateType == PositionUpdateType::Physics) + { + primitive->SetEnableGravity(false); + //primitive->UpdatePhysicsVolume(false); + } ProcessState(); AMainGameModeBase::GetWidgetsManager()->AnimateInteractionHint(this, 1, EInputAnimatedWidgetAnimation::Hold); OnRotating.Broadcast(); @@ -153,6 +158,11 @@ void UMoveInteractableModificator::TurnOffRotating() FScopeLock lock1(&critical); rotating = false; player->UnlockPlayer({ .camera = true }); + if(positionUpdateType == PositionUpdateType::Physics) + { + primitive->SetEnableGravity(true); + //primitive->UpdatePhysicsVolume(false); + } ProcessState(); AMainGameModeBase::GetWidgetsManager()->AnimateInteractionHint(this, 1, EInputAnimatedWidgetAnimation::Unhold); } @@ -187,6 +197,8 @@ void UMoveInteractableModificator::UpdatePosition() auto camLoc = player->GetCameraLocation(); auto dir = player->GetCameraDirection(); auto newLoc = camLoc + dir * distance; + if(actor) + newLoc += actor->GetTransform().GetRotation().RotateVector(originOffset * actor->GetTransform().GetScale3D()); auto rot = actor->GetActorQuat(); bool blocked = MoveIsBlocked(newLoc, rot) || player->nearScanner->ComponentOverlapComponent(primitive, newLoc, actor->GetActorQuat(), {}); diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.h b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.h index fe1caae..d717995 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.h +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Interactable/Modificators/MoveInteractableModificator.h @@ -37,6 +37,9 @@ public: UPROPERTY(BlueprintAssignable) FRotatingMoveInteractableModificatorActivatedDelegate OnRotating; + UPROPERTY(EditDefaultsOnly) + FVector originOffset; + protected: float distance = 0; float minDistance = 100.0f; diff --git a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WidgetsManager.cpp b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WidgetsManager.cpp index 2931865..ba1d1e7 100644 --- a/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WidgetsManager.cpp +++ b/UnrealProject/Lost_Edge/Source/Lost_Edge/Private/Widgets/WidgetsManager.cpp @@ -160,7 +160,7 @@ void UWidgetsManager::AddOverlayWidget(UUserWidget* widget) void UWidgetsManager::RemoveOverlayWidget(UUserWidget* widget) { overlayWidgetsInstances.Remove(widget); - widget->RemoveFromViewport(); + widget->RemoveFromParent(); } @@ -189,7 +189,7 @@ void UWidgetsManager::SwitchCheatMenu() void UWidgetsManager::ShowCheatMenu() { - if(cheatMenuWidget || mainMenuWidget->Visibility == ESlateVisibility::Visible) + if(cheatMenuWidget || mainMenuWidget->GetVisibility() == ESlateVisibility::Visible) return; if(auto PC = UGameplayStatics::GetPlayerController(GetWorld(), 0))