diff --git a/Content/BP_BugPlacerPawn.uasset b/Content/BP_BugPlacerPawn.uasset index 41551a3..71f8b7d 100644 Binary files a/Content/BP_BugPlacerPawn.uasset and b/Content/BP_BugPlacerPawn.uasset differ diff --git a/Content/IA_BugPlacerArbitraryPlacement.uasset b/Content/IA_BugPlacerArbitraryPlacement.uasset index 5ca2e31..73f2e5f 100644 Binary files a/Content/IA_BugPlacerArbitraryPlacement.uasset and b/Content/IA_BugPlacerArbitraryPlacement.uasset differ diff --git a/Content/IA_BugPlacerCamera.uasset b/Content/IA_BugPlacerCamera.uasset index 00d516d..031f7de 100644 Binary files a/Content/IA_BugPlacerCamera.uasset and b/Content/IA_BugPlacerCamera.uasset differ diff --git a/Content/IA_BugPlacerSpeedAdjust.uasset b/Content/IA_BugPlacerSpeedAdjust.uasset index f0429bb..aeb5adc 100644 Binary files a/Content/IA_BugPlacerSpeedAdjust.uasset and b/Content/IA_BugPlacerSpeedAdjust.uasset differ diff --git a/Content/IA_BugPlacerSpeedDown.uasset b/Content/IA_BugPlacerSpeedDown.uasset index 4d17d50..b206a58 100644 Binary files a/Content/IA_BugPlacerSpeedDown.uasset and b/Content/IA_BugPlacerSpeedDown.uasset differ diff --git a/Content/IA_BugPlacerSpeedUp.uasset b/Content/IA_BugPlacerSpeedUp.uasset index da38eed..232d1ac 100644 Binary files a/Content/IA_BugPlacerSpeedUp.uasset and b/Content/IA_BugPlacerSpeedUp.uasset differ diff --git a/Content/IA_ExitBugPlacing.uasset b/Content/IA_ExitBugPlacing.uasset index f7abeda..cbbde1e 100644 Binary files a/Content/IA_ExitBugPlacing.uasset and b/Content/IA_ExitBugPlacing.uasset differ diff --git a/Content/IA_MoveBugPlacer.uasset b/Content/IA_MoveBugPlacer.uasset index f2abd7b..9541cb4 100644 Binary files a/Content/IA_MoveBugPlacer.uasset and b/Content/IA_MoveBugPlacer.uasset differ diff --git a/Content/IA_PlaceBug.uasset b/Content/IA_PlaceBug.uasset index 82ae0e9..a215b64 100644 Binary files a/Content/IA_PlaceBug.uasset and b/Content/IA_PlaceBug.uasset differ diff --git a/Content/UI/UMG_BugPlacementOverlay.uasset b/Content/UI/UMG_BugPlacementOverlay.uasset index 04263b8..133bcbc 100644 Binary files a/Content/UI/UMG_BugPlacementOverlay.uasset and b/Content/UI/UMG_BugPlacementOverlay.uasset differ diff --git a/Source Files/T_BugPlacementReticle.xcf b/Source Files/T_BugPlacementReticle.xcf new file mode 100644 index 0000000..72e4185 Binary files /dev/null and b/Source Files/T_BugPlacementReticle.xcf differ diff --git a/Source/Unrealzilla/Private/BugPlacerPawn.cpp b/Source/Unrealzilla/Private/BugPlacerPawn.cpp index eb8e05b..09287d6 100644 --- a/Source/Unrealzilla/Private/BugPlacerPawn.cpp +++ b/Source/Unrealzilla/Private/BugPlacerPawn.cpp @@ -49,8 +49,6 @@ ABugPlacerPawn::ABugPlacerPawn() void ABugPlacerPawn::BeginPlay() { - this->OriginalPlayer = UGameplayStatics::GetPlayerCharacter(this, 0); - this->Activate(); Super::BeginPlay(); @@ -129,6 +127,9 @@ void ABugPlacerPawn::TraceTimerElapsed() this->TraceOriginComponent->SetRelativeScale3D(FVector(TraceOriginScale.X, TraceOriginScale.Y, (TraceEnd - TraceStart).Length())); } } + + float TraceInterval = this->GetActorTickInterval() > 0.0f ? this->GetActorTickInterval() : (1.0f / 60.0f) * World->GetWorldSettings()->MinGlobalTimeDilation; + this->GetWorldTimerManager().SetTimer(this->TraceTimerHandle, this, &ABugPlacerPawn::TraceTimerElapsed, TraceInterval, false); } @@ -159,14 +160,17 @@ void ABugPlacerPawn::Activate() { this->SavedMaxSpeed = this->PawnMovement->GetMaxSpeed(); - UGameplayStatics::GetPlayerController(this, 0)->Possess(this); + APlayerController *Controller = UGameplayStatics::GetPlayerController(this, 0); + this->OriginalPawn = Controller->GetPawn(); + this->OriginalPawn->DisableInput(Controller); + Controller->Possess(this); const float &MinTimeDilation = this->GetWorldSettings()->MinGlobalTimeDilation; - this->GetWorldSettings()->SetTimeDilation(MinTimeDilation); - this->CustomTimeDilation = 1.0 / MinTimeDilation; + //this->GetWorldSettings()->SetTimeDilation(MinTimeDilation); + //this->CustomTimeDilation = 1.0 / MinTimeDilation; float TraceInterval = this->GetActorTickInterval() > 0.0f ? this->GetActorTickInterval() : (1.0f / 60.0f) * MinTimeDilation; - this->GetWorldTimerManager().SetTimer(this->TraceTimerHandle, this, &ABugPlacerPawn::TraceTimerElapsed, TraceInterval, true); + this->GetWorldTimerManager().SetTimer(this->TraceTimerHandle, this, &ABugPlacerPawn::TraceTimerElapsed, TraceInterval, false); } void ABugPlacerPawn::Deactivate() @@ -174,7 +178,9 @@ void ABugPlacerPawn::Deactivate() this->GetWorldTimerManager().ClearAllTimersForObject(this); this->GetWorldSettings()->SetTimeDilation(1.0f); - UGameplayStatics::GetPlayerController(this, 0)->Possess(this->OriginalPlayer); + APlayerController *Controller = UGameplayStatics::GetPlayerController(this, 0); + Controller->Possess(this->OriginalPawn); + this->OriginalPawn->EnableInput(Controller); this->Destroy(); } diff --git a/Source/Unrealzilla/Public/BugPlacerPawn.h b/Source/Unrealzilla/Public/BugPlacerPawn.h index e70565a..fc96696 100644 --- a/Source/Unrealzilla/Public/BugPlacerPawn.h +++ b/Source/Unrealzilla/Public/BugPlacerPawn.h @@ -84,7 +84,7 @@ private: uint8 bArbitraryPlacement : 1; uint8 bCurrentTraceHit : 1; - TObjectPtr OriginalPlayer; + TObjectPtr OriginalPawn; TObjectPtr BugMarker;