Skip to content

Commit 008dc36

Browse files
committed
* FIX: фиксов
1 parent 0eddc27 commit 008dc36

File tree

10 files changed

+35
-6
lines changed

10 files changed

+35
-6
lines changed
2.67 KB
Binary file not shown.

Source/Stalker/Kernel/RBMK/Engine/RBMKDevice.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,12 @@ FRBMKDevice::~FRBMKDevice()
4141
{
4242

4343
}
44-
44+
#if !(UE_BUILD_SHIPPING||UE_BUILD_TEST)
4545
bool FRBMKDevice::IsEditorMode()
4646
{
4747
return GIsEditor;
4848
}
49+
#endif
4950

5051
bool FRBMKDevice::Paused() const
5152
{

Source/Stalker/Kernel/RBMK/Engine/RBMKDevice.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@ class FRBMKDevice :public XrDeviceInterface
55
public:
66
FRBMKDevice ();
77
~FRBMKDevice () override;
8+
#if !(UE_BUILD_SHIPPING||UE_BUILD_TEST)
89
bool IsEditorMode () override;
10+
#endif
911
bool Paused () const override;
1012
void Reset (bool precache = false) override;
1113
void Pause (BOOL bOn, BOOL bTimer, BOOL bSound, LPCSTR reason) override;

Source/Stalker/Kernel/RBMK/Render/Interface/WallMark/XRayWallMarkArray.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#include "XRayWallMarkArray.h"
2-
2+
#if !(UE_BUILD_SHIPPING||UE_BUILD_TEST)
33
FACTORY_PTR_INSTANCIATE(UIShader)
4+
#endif
45
XRayWallMarkArray::XRayWallMarkArray()
56
{
67
}

Source/Stalker/Kernel/RBMK/Render/Interface/XRayRenderInterface.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#include "XRayRenderInterface.h"
22

3+
#if WITH_EDITOR
34
#include "IDetailTreeNode.h"
5+
#endif
46
#include "XRayRenderTarget.h"
57
#include "../../../StalkerEngineManager.h"
68
#include "Resources/StalkerResourcesManager.h"
@@ -183,7 +185,10 @@ void XRayRenderInterface::SpawnStaticDecal(const shared_str& InTextureName, cons
183185
FQuat Rotation = FQuat(StalkerMath::RBMKNormalToUnreal(Normal).ToOrientationQuat())*FRotator(-90,0,0).Quaternion();
184186
Rotation = Rotation*FRotator(0,FMath::FRandRange(0.f,360.f),0).Quaternion();
185187
ADecalActor* DecalActor = GWorld->SpawnActor<ADecalActor>(FVector(StalkerMath::RBMKLocationToUnreal(Point)), Rotation.Rotator(),SpawnParameters);
188+
189+
#if WITH_EDITOR
186190
DecalActor->SetFolderPath(TEXT("Decals"));
191+
#endif
187192
DecalActor->GetDecal()->DecalSize = FVector(Size*12.5f,Size*75,Size*75);
188193
{
189194
UMaterialInstanceDynamic*Material = UKismetMaterialLibrary::CreateDynamicMaterialInstance(GWorld,GetDefault<UStalkerGameSettings>()->DefaultDecalMaterial.LoadSynchronous(),NAME_None,EMIDCreationFlags::Transient);
@@ -219,7 +224,10 @@ void XRayRenderInterface::SpawnSkeletalDecal(const IRenderVisual* InObject, cons
219224
FQuat Rotation = FQuat(HitResult.Normal.ToOrientationQuat())*FRotator(-90,0,0).Quaternion();
220225
Rotation = Rotation*FRotator(0,FMath::FRandRange(0.f,360.f),0).Quaternion();
221226
ADecalActor* DecalActor = GWorld->SpawnActor<ADecalActor>(HitResult.Location, Rotation.Rotator(),SpawnParameters);
227+
228+
#if WITH_EDITOR
222229
DecalActor->SetFolderPath(TEXT("Decals"));
230+
#endif
223231
DecalActor->GetDecal()->DecalSize = FVector(Size*50.f,Size*50,Size*50);
224232
{
225233
UMaterialInstanceDynamic*Material = UKismetMaterialLibrary::CreateDynamicMaterialInstance(GWorld,GetDefault<UStalkerGameSettings>()->DefaultDecalMaterial.LoadSynchronous(),NAME_None,EMIDCreationFlags::Transient);

Source/Stalker/Kernel/StalkerEngineManager.cpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,21 @@ static FRBMKMemory GXRayMemory;
3232
static FRBMKLog GXRayLog;
3333
static FRBMKDebug GXRayDebug;
3434

35+
#if UE_BUILD_SHIPPING||UE_BUILD_TEST
36+
void*xr_malloc (size_t size)
37+
{
38+
return FMemory::Malloc(size);
39+
}
40+
void xr_mfree (void*P)
41+
{
42+
return FMemory::Free(P);
43+
}
44+
void*xr_realloc (void* P, size_t size)
45+
{
46+
return FMemory::Realloc(P,size);
47+
}
48+
#endif
49+
3550
FStalkerEngineManager::FStalkerEngineManager()
3651
{
3752

@@ -601,7 +616,7 @@ void FStalkerEngineManager::OnPostLoadMap(UWorld* World)
601616
{
602617
FSoftObjectPath CurrentPostLoadWorldPath = UWorld::RemovePIEPrefix(*World->GetPathName());
603618
check(CurrentPostLoadWorldPath == CurrentWorldPath);
604-
#if !UE_BUILD_SHIPPING
619+
#if !(UE_BUILD_SHIPPING||UE_BUILD_TEST)
605620
if (!CheckCurrentWorld())
606621
{
607622
CurrentWorldName.Empty();

Source/Stalker/Kernel/Unreal/HUD/StalkerHUD.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ THIRD_PARTY_INCLUDES_START
66
#include "XrEngine/CustomHUD.h"
77
#include "XrEngine/IGame_Level.h"
88
THIRD_PARTY_INCLUDES_END
9-
ENGINE_API BOOL g_bRendering;
9+
extern ENGINE_API BOOL g_bRendering;
1010

1111
AStalkerHUD::AStalkerHUD()
1212
{

Source/Stalker/Resources/AIMap/StalkerAIMap.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,15 @@ void UStalkerAIMap::Serialize(FArchive& Ar)
8585
void UStalkerAIMap::PostInitProperties()
8686
{
8787
Super::PostInitProperties();
88+
#if WITH_EDITOR
8889
NodesHash.SetNum(NodesHashSize+1);
8990
NodesHashSelected.SetNum(NodesHashSize+1);
9091
for(int32 i = 0;i<=NodesHashSize;i++)
9192
{
9293
NodesHash[i].SetNum(NodesHashSize+1);
9394
NodesHashSelected[i].SetNum(NodesHashSize+1);
9495
}
96+
#endif
9597
}
9698

9799

Source/StalkerLoading/Private/StalkerLoading.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
void FStalkerLoadingModule::StartupModule()
99
{
10-
if (!IsRunningDedicatedServer())
10+
if (!IsRunningDedicatedServer()&&IsRunningGame())
1111
{
1212
FLoadingScreenAttributes LoadingScreen;
1313
LoadingScreen.WidgetLoadingScreen = SNew(SStalkerStartupScreen);

Source/XRayEngine

Submodule XRayEngine updated 40 files

0 commit comments

Comments
 (0)