Compare commits

..

2 Commits

Author SHA1 Message Date
eb9512c8eb wip 2025-04-26 00:26:23 +02:00
71ff7e773d Level 2 (#12)
Reviewed-on: #12
Co-authored-by: Oleg Petruny <oleg.petruny@gmail.com>
Co-committed-by: Oleg Petruny <oleg.petruny@gmail.com>
2025-04-25 21:17:41 +00:00
38 changed files with 76 additions and 63 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 201 KiB

After

Width:  |  Height:  |  Size: 351 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 218 KiB

After

Width:  |  Height:  |  Size: 378 KiB

View File

@ -158,9 +158,6 @@ ManualIPAddress=
+ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic") +ProfileRedirects=(OldName="StaticMeshComponent",NewName="BlockAllDynamic")
+ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor") +ProfileRedirects=(OldName="SkeletalMeshActor",NewName="PhysicsActor")
+ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic") +ProfileRedirects=(OldName="InvisibleActor",NewName="InvisibleWallDynamic")
+ProfileRedirects=(OldName="AgeOfWarUnitComputer",NewName="AgeOfWarUnitPlayerZone")
+ProfileRedirects=(OldName="AgeOfWarUnit",NewName="AgeOfWarUnitPlayer")
+ProfileRedirects=(OldName="AgeOfWarUnitPlayerZone",NewName="AgeOfWarUnitComputer")
-CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic") -CollisionChannelRedirects=(OldName="Static",NewName="WorldStatic")
-CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic") -CollisionChannelRedirects=(OldName="Dynamic",NewName="WorldDynamic")
-CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle") -CollisionChannelRedirects=(OldName="VehicleMovement",NewName="Vehicle")

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -7,16 +7,17 @@ public class Lost_Edge : ModuleRules
public Lost_Edge(ReadOnlyTargetRules Target) : base(Target) public Lost_Edge(ReadOnlyTargetRules Target) : base(Target)
{ {
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;
//MinCpuArchX64 = MinimumCpuArchitectureX64.AVX2;
PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OpenCV" }); PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore", "OpenCV" });
PrivateDependencyModuleNames.AddRange(new string[] { "EnhancedInput", "UMG", "RHI", "RenderCore", "Lost_EdgeShaders", "PakFile", //"TextureCompressor", PrivateDependencyModuleNames.AddRange(new string[] { "EnhancedInput", "UMG", "RHI", "RenderCore", "Lost_EdgeShaders", "PakFile", //"TextureCompressor",
"LevelSequence", "MovieScene", "HTTP", "Json", "ApplicationCore", "ProceduralMeshComponent", "Landscape", "MeshDescription", "StaticMeshDescription", "LevelSequence", "MovieScene", "HTTP", "Json", "ApplicationCore", "ProceduralMeshComponent", "Landscape", "MoviePlayer", "Slate", "SlateCore" });
"AssetRegistry", "LevelEditor", "MoviePlayer", "Slate", "SlateCore" });
if (Target.bBuildEditor) if (Target.bBuildEditor)
{ {
PrivateDependencyModuleNames.AddRange(new string[] { "UnrealEd" }); PrivateDependencyModuleNames.AddRange(new string[] { "UnrealEd", "LevelEditor",
"MeshDescription", "StaticMeshDescription", "AssetRegistry" });
} }
// UE_LOG(LogTemp, Log, TEXT("capture: %s"), (capture ? TEXT("true") : TEXT("false"))); // UE_LOG(LogTemp, Log, TEXT("capture: %s"), (capture ? TEXT("true") : TEXT("false")));

View File

@ -3,4 +3,4 @@
#include "Lost_Edge.h" #include "Lost_Edge.h"
#include "Modules/ModuleManager.h" #include "Modules/ModuleManager.h"
IMPLEMENT_PRIMARY_GAME_MODULE(FDefaultGameModuleImpl, Lost_Edge, "Lost_Edge"); IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Lost_Edge, "Lost_Edge" );

View File

@ -21,4 +21,4 @@ public:
return brush; return brush;
} }
}; };

View File

@ -2,20 +2,20 @@
#include "GrassGenerator.h" #include "GrassGenerator.h"
#include "AssetRegistry/AssetRegistryModule.h"
#include "Components/BoxComponent.h" #include "Components/BoxComponent.h"
#include "ProceduralMeshComponent.h"
#if WITH_EDITOR
#include "AssetRegistry/AssetRegistryModule.h"
#include "Engine/SkyLight.h" #include "Engine/SkyLight.h"
#include "Engine/StaticMeshActor.h" #include "Engine/StaticMeshActor.h"
#include "Landscape.h"
#include "LandscapeComponent.h"
#include "LevelEditorSubsystem.h"
#include "MeshDescription.h" #include "MeshDescription.h"
#include "PhysicalMaterials/PhysicalMaterial.h" #include "PhysicalMaterials/PhysicalMaterial.h"
#include "ProceduralMeshComponent.h"
#include "ProceduralMeshConversion.h" #include "ProceduralMeshConversion.h"
#include "StaticMeshDescription.h" #include "StaticMeshDescription.h"
#if WITH_EDITOR
#include "Editor/EditorEngine.h" #include "Editor/EditorEngine.h"
#include "LevelEditorSubsystem.h"
#include "Landscape.h"
#include "LandscapeComponent.h"
#endif #endif
AGrassGenerator::AGrassGenerator() AGrassGenerator::AGrassGenerator()
@ -34,6 +34,7 @@ void AGrassGenerator::PostLoad()
Update(); Update();
} }
#if WITH_EDITOR
void AGrassGenerator::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) void AGrassGenerator::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
{ {
Super::PostEditChangeProperty(PropertyChangedEvent); Super::PostEditChangeProperty(PropertyChangedEvent);
@ -43,6 +44,7 @@ void AGrassGenerator::PostEditChangeProperty(FPropertyChangedEvent& PropertyChan
// || PropertyChangedEvent.GetPropertyName() == TEXT("Tile Size")) // || PropertyChangedEvent.GetPropertyName() == TEXT("Tile Size"))
// Update(); // Update();
} }
#endif
void AGrassGenerator::Generate() void AGrassGenerator::Generate()
{ {
@ -235,8 +237,10 @@ void AGrassGenerator::Export()
void AGrassGenerator::Update() void AGrassGenerator::Update()
{ {
#if WITH_EDITOR
areaBrush->SetBoxExtent({ tileCount.X * tileSize * 0.5, tileCount.Y * tileSize * 0.5, 200 }, false); areaBrush->SetBoxExtent({ tileCount.X * tileSize * 0.5, tileCount.Y * tileSize * 0.5, 200 }, false);
mesh->SetMaterial(0, grassMaterial.LoadSynchronous()); mesh->SetMaterial(0, grassMaterial.LoadSynchronous());
//for(int32 i = 0; i < sectionsCount; ++i) //for(int32 i = 0; i < sectionsCount; ++i)
// mesh->SetMaterSetMaterial(i, grassMaterial.LoadSynchronous()); // mesh->SetMaterSetMaterial(i, grassMaterial.LoadSynchronous());
#endif
} }

View File

@ -22,13 +22,13 @@
ALevelBase* ALevelBase::Get() ALevelBase* ALevelBase::Get()
{ {
if(auto GM = AMainGameModeBase::Get()) if(auto GM = AMainGameModeBase::Get())
return GM->leadLevel.Get(); return GM->leadLevel;
return nullptr; return nullptr;
} }
void ALevelBase::BeginPlay() void ALevelBase::BeginPlay()
{ {
AMainGameModeBase::leadLevel = TStrongObjectPtr<ALevelBase>{ this }; AMainGameModeBase::leadLevel = this;
ALevelScriptActor::BeginPlay(); ALevelScriptActor::BeginPlay();

View File

@ -19,7 +19,7 @@ TStrongObjectPtr<UWidgetsManager> AMainGameModeBase::widgetsManager = nullptr;
TStrongObjectPtr<UCutsceneManager> AMainGameModeBase::cutsceneManager = nullptr; TStrongObjectPtr<UCutsceneManager> AMainGameModeBase::cutsceneManager = nullptr;
TStrongObjectPtr<UQuickTimeEventManager> AMainGameModeBase::quickTimeEventManager = nullptr; TStrongObjectPtr<UQuickTimeEventManager> AMainGameModeBase::quickTimeEventManager = nullptr;
TStrongObjectPtr<UDialogueManager> AMainGameModeBase::dialogueManager = nullptr; TStrongObjectPtr<UDialogueManager> AMainGameModeBase::dialogueManager = nullptr;
TStrongObjectPtr<ALevelBase> AMainGameModeBase::leadLevel = nullptr; ALevelBase* AMainGameModeBase::leadLevel = nullptr;
void AMainGameModeBase::StartPlay() void AMainGameModeBase::StartPlay()
{ {
@ -38,11 +38,11 @@ void AMainGameModeBase::EndPlay(const EEndPlayReason::Type EndPlayReason)
{ {
cutsceneManager->LockCallback(true); cutsceneManager->LockCallback(true);
cutsceneManager->Clear(); cutsceneManager->Clear();
leadLevel.Reset();
widgetsManager.Reset(); widgetsManager.Reset();
cutsceneManager.Reset(); cutsceneManager.Reset();
quickTimeEventManager.Reset(); quickTimeEventManager.Reset();
dialogueManager.Reset(); dialogueManager.Reset();
leadLevel = nullptr;
Super::EndPlay(EndPlayReason); Super::EndPlay(EndPlayReason);
} }

View File

@ -44,7 +44,7 @@ public:
void SwitchCameraMode(); void SwitchCameraMode();
static TStrongObjectPtr<class ALevelBase> leadLevel; static class ALevelBase* leadLevel;
FQuestsUpdateDelegate questsUpdateDelegate; FQuestsUpdateDelegate questsUpdateDelegate;

View File

@ -66,6 +66,7 @@ void AAgeOfWarUnit::EndPlay(const EEndPlayReason::Type EndPlayReason)
AAgeOfWarUnit::AAgeOfWarUnit() AAgeOfWarUnit::AAgeOfWarUnit()
{ {
root = CreateDefaultSubobject<UBoxComponent>(TEXT("Collision")); root = CreateDefaultSubobject<UBoxComponent>(TEXT("Collision"));
SetRootComponent(root);
allyblocker = CreateDefaultSubobject<UBoxComponent>(TEXT("AllyBlocker")); allyblocker = CreateDefaultSubobject<UBoxComponent>(TEXT("AllyBlocker"));
allyblocker->SetupAttachment(root); allyblocker->SetupAttachment(root);
traceStart = CreateDefaultSubobject<USceneComponent>(TEXT("TraceStart")); traceStart = CreateDefaultSubobject<USceneComponent>(TEXT("TraceStart"));

View File

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