bug fixes

This commit is contained in:
Oleg Petruny 2025-03-15 09:49:11 +01:00
parent bfc8efd5fd
commit 14b4244237
16 changed files with 37 additions and 33 deletions

Binary file not shown.

Binary file not shown.

View File

@ -221,7 +221,7 @@ void AInteractable::Lock()
Deactivate(static_cast<EActivatorType>(i));
activationLockers.Add(nullptr);
for(auto collision : collisions)
collision->SetCollisionProfileName(TEXT("NoCollision"));
collision->SetCollisionProfileName(TEXT("BlockAll"));
}
void AInteractable::Unlock()

View File

@ -159,6 +159,7 @@ void ACrossyRoadManager::CreateObstacle(int32 index)
FActorSpawnParameters spawnParams{};
spawnParams.Owner = this;
auto obstacle = GetWorld()->SpawnActor<ACrossyRoadObstacle>(*obstacleClass, spline->GetComponentLocation(), GetActorRotation(), spawnParams);
obstacle->AttachToActor(this, FAttachmentTransformRules{ EAttachmentRule::KeepWorld, false });
obstacle->manager = this;
if(index < 0)
@ -197,7 +198,7 @@ void ACrossyRoadManager::RotateLine(USplineComponent* line)
void ACrossyRoadManager::Up()
{
auto line = lines[0];
auto diffY = lines[0]->GetComponentLocation().Y - lines[1]->GetComponentLocation().Y;
auto diffY = lines[0]->GetRelativeLocation().Y - lines[1]->GetRelativeLocation().Y;
for(int32 i = 1; i < lines.Num(); ++i)
{
lines[i]->AddRelativeLocation(FVector{ 0, diffY, 0 });

View File

@ -157,11 +157,9 @@ void ASubwaySurfManager::CreateObstacle(int32 index)
for(int32 i = 0; i < FMath::RandRange(0, obstacleClasses.Num() - 1); ++i) // std::advance not works :(
++obstacleClass;
int32 lineId;
do
{
lineId = FMath::RandRange(0, lines.Num() - 1);
} while(lineId == lastSpawnedLine);
int32 lineId = FMath::RandRange(0, lines.Num() - 1);
if(lineId == lastSpawnedLine)
lineId = (lineId + 1) % (lines.Num() - 1);
auto spline = lines[lineId];
FActorSpawnParameters spawnParams{};
@ -169,6 +167,8 @@ void ASubwaySurfManager::CreateObstacle(int32 index)
lastSpawnedLine = lineId;
auto obstacle = GetWorld()->SpawnActor<ASubwaySurfObstacle>(*obstacleClass, spline->GetComponentLocation(), GetActorRotation(), spawnParams);
obstacle->AttachToActor(this, FAttachmentTransformRules{ EAttachmentRule::KeepWorld, false });
obstacle->subwaySurf = this;
if(index < 0)

View File

@ -13,8 +13,8 @@ class UInteractableHintWidget : public UResolutionResponsiveWidget, public IInpu
GENERATED_BODY()
public:
UPROPERTY(meta = (BindWidget))
UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
class UTextBlock* keyText;
UPROPERTY(meta = (BindWidget))
UPROPERTY(BlueprintReadOnly, meta = (BindWidget))
class UTextBlock* descriptionText;
};

View File

@ -2,8 +2,11 @@
using UnrealBuildTool;
public class Lost_EdgeShaders : ModuleRules {
public Lost_EdgeShaders(ReadOnlyTargetRules Target) : base(Target) {
public class Lost_EdgeShaders : ModuleRules
{
public Lost_EdgeShaders(ReadOnlyTargetRules Target) : base(Target)
{
bUsePrecompiled = true;
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
PublicDependencyModuleNames.AddRange(new string[] { });
PrivateDependencyModuleNames.AddRange(new string[] { "Core",