bug fix & Level2 without end dialogue
This commit is contained in:
parent
c3f07fcd6e
commit
cb5a2a834f
BIN
UnrealProject/Lost_Edge/Content/Blueprints/BP_DirectionPoint.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Blueprints/BP_DirectionPoint.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/BP_InWorlTextLine.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/BP_InWorlTextLine.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_Tree.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Blueprints/SM_Level2_Tree.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/Seq_Level2_TreeFall.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/Sequencers/Seq_Level2_TreeFall.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/UI/Blueprints/UI_CutsceneSkip.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/UI/Blueprints/UI_CutsceneSkip.uasset
(Stored with Git LFS)
Binary file not shown.
@ -105,10 +105,10 @@ void UInteractableScreenCapturer::Process()
|
|||||||
ENQUEUE_RENDER_COMMAND(GetInteractablesFromScreen)(
|
ENQUEUE_RENDER_COMMAND(GetInteractablesFromScreen)(
|
||||||
[
|
[
|
||||||
capture = TextureTarget->GetResource()->TextureRHI,
|
capture = TextureTarget->GetResource()->TextureRHI,
|
||||||
world = GetWorld(),
|
world = GetWorld(),
|
||||||
view = view,
|
view = view,
|
||||||
//output = _output->GetResource()->TextureRHI,
|
//output = _output->GetResource()->TextureRHI,
|
||||||
this
|
this
|
||||||
]
|
]
|
||||||
(FRHICommandListImmediate& RHICmdList)
|
(FRHICommandListImmediate& RHICmdList)
|
||||||
{
|
{
|
||||||
@ -238,7 +238,7 @@ void UInteractableScreenCapturer::Process()
|
|||||||
(FTranslationMatrix(-(view.Location))
|
(FTranslationMatrix(-(view.Location))
|
||||||
* (FInverseRotationMatrix(view.Rotation) * FMatrix(FPlane(0, 0, 1, 0), FPlane(1, 0, 0, 0), FPlane(0, 1, 0, 0), FPlane(0, 0, 0, 1)))
|
* (FInverseRotationMatrix(view.Rotation) * FMatrix(FPlane(0, 0, 1, 0), FPlane(1, 0, 0, 0), FPlane(0, 1, 0, 0), FPlane(0, 0, 0, 1)))
|
||||||
* view.CalculateProjectionMatrix())
|
* view.CalculateProjectionMatrix())
|
||||||
.InverseFast();
|
.InverseFast(); // fast inverse errors about NIL matrix, aren't from here...
|
||||||
FVector worldLoc, worldDir;
|
FVector worldLoc, worldDir;
|
||||||
for(int i = 1; i < components; ++i)
|
for(int i = 1; i < components; ++i)
|
||||||
{
|
{
|
||||||
|
@ -116,13 +116,19 @@ void APlayerBase::ResetInteractions()
|
|||||||
activator->Rescan();
|
activator->Rescan();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FVector APlayerBase::GetCameraLocation()
|
||||||
|
{
|
||||||
|
return camera->GetComponentLocation();
|
||||||
|
}
|
||||||
FVector APlayerBase::GetCameraDirection()
|
FVector APlayerBase::GetCameraDirection()
|
||||||
{
|
{
|
||||||
return camera->GetForwardVector();
|
return camera->GetForwardVector();
|
||||||
}
|
}
|
||||||
FVector APlayerBase::GetCameraLocation()
|
|
||||||
|
void APlayerBase::SetTransform(const FTransform transform)
|
||||||
{
|
{
|
||||||
return camera->GetComponentLocation();
|
SetActorLocation(transform.GetLocation(), false, nullptr, ETeleportType::ResetPhysics);
|
||||||
|
Controller->SetControlRotation(transform.GetRotation().Rotator());
|
||||||
}
|
}
|
||||||
|
|
||||||
void APlayerBase::SwitchToCameraPawn()
|
void APlayerBase::SwitchToCameraPawn()
|
||||||
|
@ -57,6 +57,9 @@ public:
|
|||||||
UFUNCTION(BlueprintPure)
|
UFUNCTION(BlueprintPure)
|
||||||
FVector GetCameraDirection();
|
FVector GetCameraDirection();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, meta = (DisplayName = "Set Player Transform"))
|
||||||
|
void SetTransform(const FTransform transform);
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
void LockPlayer(const FPlayerLock lock);
|
void LockPlayer(const FPlayerLock lock);
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
|
@ -10,6 +10,11 @@
|
|||||||
#include "PlayerBase.h"
|
#include "PlayerBase.h"
|
||||||
#include "Widgets/WidgetsManager.h"
|
#include "Widgets/WidgetsManager.h"
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
constexpr float failBlockAfterBegin = 0.2f;
|
||||||
|
}
|
||||||
|
|
||||||
int32 Event::counter = 0;
|
int32 Event::counter = 0;
|
||||||
|
|
||||||
Event::Event()
|
Event::Event()
|
||||||
@ -33,38 +38,31 @@ inline int32 Event::GetId()
|
|||||||
|
|
||||||
void UQuickTimeEventManager::ShowQuickTimeEvent(FQuickTimeEventEnqueProperties properties)
|
void UQuickTimeEventManager::ShowQuickTimeEvent(FQuickTimeEventEnqueProperties properties)
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Log, TEXT("ShowQuickTimeEvent Start"));
|
|
||||||
OnFirstEventInit();
|
OnFirstEventInit();
|
||||||
FScopeLock lock1(&lock);
|
FScopeLock lock1(&lock);
|
||||||
CreateEvent(properties, false);
|
CreateEvent(properties, false);
|
||||||
UE_LOG(LogTemp, Log, TEXT("ShowQuickTimeEvent End"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UQuickTimeEventManager::EnqueQuickTimeEvent(FQuickTimeEventEnqueProperties properties)
|
void UQuickTimeEventManager::EnqueQuickTimeEvent(FQuickTimeEventEnqueProperties properties)
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Log, TEXT("EnqueQuickTimeEvent Start"));
|
|
||||||
OnFirstEventInit();
|
OnFirstEventInit();
|
||||||
{
|
{
|
||||||
FScopeLock lock1(&lock);
|
FScopeLock lock1(&lock);
|
||||||
nextEvents.Enqueue(properties);
|
nextEvents.Enqueue(properties);
|
||||||
}
|
}
|
||||||
ShowNextEvent();
|
ShowNextEvent();
|
||||||
UE_LOG(LogTemp, Log, TEXT("EnqueQuickTimeEvent End"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UQuickTimeEventManager::ShowNextEvent()
|
void UQuickTimeEventManager::ShowNextEvent()
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Log, TEXT("ShowNextEvent Start"));
|
|
||||||
FScopeLock lock1(&lock);
|
FScopeLock lock1(&lock);
|
||||||
FQuickTimeEventEnqueProperties properties;
|
FQuickTimeEventEnqueProperties properties;
|
||||||
nextEvents.Dequeue(properties);
|
nextEvents.Dequeue(properties);
|
||||||
CreateEvent(properties, true);
|
CreateEvent(properties, true);
|
||||||
UE_LOG(LogTemp, Log, TEXT("ShowNextEvent End"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UQuickTimeEventManager::OnEventEnd(int32 id, EQuickTimeEventResult result)
|
void UQuickTimeEventManager::OnEventEnd(int32 id, EQuickTimeEventResult result)
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Log, TEXT("OnEventEnd Start"));
|
|
||||||
FScopeLock lock1(&lock);
|
FScopeLock lock1(&lock);
|
||||||
Event event;
|
Event event;
|
||||||
if(!events.RemoveAndCopyValue(id, event))
|
if(!events.RemoveAndCopyValue(id, event))
|
||||||
@ -78,7 +76,6 @@ void UQuickTimeEventManager::OnEventEnd(int32 id, EQuickTimeEventResult result)
|
|||||||
if(event.sequence && !nextEvents.IsEmpty())
|
if(event.sequence && !nextEvents.IsEmpty())
|
||||||
{
|
{
|
||||||
ShowNextEvent();
|
ShowNextEvent();
|
||||||
UE_LOG(LogTemp, Log, TEXT("OnEventEnd End"));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -90,8 +87,8 @@ void UQuickTimeEventManager::OnEventEnd(int32 id, EQuickTimeEventResult result)
|
|||||||
PC->onAnyKeyReleased.RemoveDynamic(this, &UQuickTimeEventManager::OnInputReleased);
|
PC->onAnyKeyReleased.RemoveDynamic(this, &UQuickTimeEventManager::OnInputReleased);
|
||||||
}
|
}
|
||||||
UCommonFunctions::ExitSlowMotion();
|
UCommonFunctions::ExitSlowMotion();
|
||||||
|
inputBinded = false;
|
||||||
}
|
}
|
||||||
UE_LOG(LogTemp, Log, TEXT("OnEventEnd End"));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void UQuickTimeEventManager::OnInput(const FKey& key, bool released)
|
void UQuickTimeEventManager::OnInput(const FKey& key, bool released)
|
||||||
@ -124,6 +121,10 @@ void UQuickTimeEventManager::OnInput(const FKey& key, bool released)
|
|||||||
if(released)
|
if(released)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
// events failed
|
||||||
|
if(sequenceBeginTimeStamp + failBlockAfterBegin > GetWorld()->GetTimeSeconds())
|
||||||
|
return;
|
||||||
|
|
||||||
if(auto WM = AMainGameModeBase::GetWidgetsManager())
|
if(auto WM = AMainGameModeBase::GetWidgetsManager())
|
||||||
{
|
{
|
||||||
while(events.Num() > 0)
|
while(events.Num() > 0)
|
||||||
@ -141,24 +142,25 @@ void UQuickTimeEventManager::OnInput(const FKey& key, bool released)
|
|||||||
|
|
||||||
void UQuickTimeEventManager::OnInputPressed(FKey key)
|
void UQuickTimeEventManager::OnInputPressed(FKey key)
|
||||||
{
|
{
|
||||||
if(key == EKeys::W || key == EKeys::A || key == EKeys::S || key == EKeys::D)
|
//if(key == EKeys::W || key == EKeys::A || key == EKeys::S || key == EKeys::D)
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
OnInput(key, false);
|
OnInput(key, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UQuickTimeEventManager::OnInputReleased(FKey key)
|
void UQuickTimeEventManager::OnInputReleased(FKey key)
|
||||||
{
|
{
|
||||||
if(key == EKeys::W || key == EKeys::A || key == EKeys::S || key == EKeys::D)
|
//if(key == EKeys::W || key == EKeys::A || key == EKeys::S || key == EKeys::D)
|
||||||
return;
|
// return;
|
||||||
|
|
||||||
OnInput(key, true);
|
OnInput(key, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UQuickTimeEventManager::OnFirstEventInit()
|
void UQuickTimeEventManager::OnFirstEventInit()
|
||||||
{
|
{
|
||||||
if(!events.IsEmpty())
|
if(!events.IsEmpty() || inputBinded)
|
||||||
return;
|
return;
|
||||||
|
inputBinded = true;
|
||||||
|
|
||||||
if(auto PC = ACustomPlayerController::Get())
|
if(auto PC = ACustomPlayerController::Get())
|
||||||
{
|
{
|
||||||
@ -168,6 +170,7 @@ void UQuickTimeEventManager::OnFirstEventInit()
|
|||||||
PC->onAnyKeyReleased.AddDynamic(this, &UQuickTimeEventManager::OnInputReleased);
|
PC->onAnyKeyReleased.AddDynamic(this, &UQuickTimeEventManager::OnInputReleased);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
sequenceBeginTimeStamp = GetWorld()->GetTimeSeconds();
|
||||||
UCommonFunctions::EnterSlowMotion();
|
UCommonFunctions::EnterSlowMotion();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -92,4 +92,6 @@ protected:
|
|||||||
TQueue<FQuickTimeEventEnqueProperties> nextEvents;
|
TQueue<FQuickTimeEventEnqueProperties> nextEvents;
|
||||||
TMap<int32, Event> events;
|
TMap<int32, Event> events;
|
||||||
FCriticalSection lock;
|
FCriticalSection lock;
|
||||||
|
float sequenceBeginTimeStamp = 0; // used to block player fails right at begin
|
||||||
|
bool inputBinded = false;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user