Skip to content

Commit

Permalink
Prepared plugin for UE Marketplace and removed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
QLaVell committed May 24, 2022
1 parent 0d07a28 commit c4b539a
Show file tree
Hide file tree
Showing 21 changed files with 142 additions and 367 deletions.
10 changes: 10 additions & 0 deletions Config/FilterPlugin.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[FilterPlugin]
; This section lists additional files which will be packaged along with your plugin. Paths should be listed relative to the root plugin directory, and
; may include "...", "*", and "?" wildcards to match directories, files, and individual characters respectively.
;
; Examples:
; /README.txt
; /Extras/...
; /Binaries/ThirdParty/*.dll
/README.md
LICENSE
8 changes: 5 additions & 3 deletions GRILLDISForUnreal.uplugin
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,19 @@
"IsBetaVersion": true,
"IsExperimentalVersion": false,
"CanContainContent": true,
"Installed": false,
"Installed": true,
"Modules": [
{
"Name": "DISRuntime",
"Type": "Runtime",
"LoadingPhase": "Default"
"LoadingPhase": "Default",
"WhitelistPlatforms": [ "Win64"]
},
{
"Name": "DISEditor",
"Type": "Editor",
"LoadingPhase": "PostEngineInit"
"LoadingPhase": "PostEngineInit",
"WhitelistPlatforms": [ "Win64" ]
}
],
"Plugins": [
Expand Down
2 changes: 1 addition & 1 deletion Source/DISRuntime/DISRuntime.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public DISRuntime(ReadOnlyTargetRules Target) : base(Target)
PublicIncludePaths.Add(Path.Combine(ThirdPartyPath, "include"));

PublicDelayLoadDLLs.Add("OpenDIS6.dll");
RuntimeDependencies.Add(new RuntimeDependency(Path.Combine(WinPath, "OpenDIS6.dll")));
RuntimeDependencies.Add(Path.Combine(WinPath, "OpenDIS6.dll"));
}
}
6 changes: 5 additions & 1 deletion Source/DISRuntime/Private/DISComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
#include "DISComponent.h"

#include "DIS_BPFL.h"
#include "CollisionQueryParams.h"
#include "Camera/PlayerCameraManager.h"
#include "Engine/World.h"
#include "GameFramework/PlayerController.h"
#include "Kismet/KismetMathLibrary.h"

DEFINE_LOG_CATEGORY(LogDISComponent);
Expand All @@ -20,7 +24,7 @@ void UDISComponent::BeginPlay()
Super::BeginPlay();

EntityECEFLocationDifference.Init(0, 3);
GeoReferencingSystem = AGeoReferencingSystem::GetGeoReferencingSystem(GetWorld());
GeoReferencingSystem = AGeoReferencingSystem::GetGeoReferencingSystem(Cast<UObject>(GetWorld()));
}

bool UDISComponent::GetLocalEulerAngles(TArray<uint8> OtherDeadReckoningParameters, FRotator& LocalRotator)
Expand Down
3 changes: 2 additions & 1 deletion Source/DISRuntime/Private/DISGameManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include "DISGameManager.h"
#include "Kismet/GameplayStatics.h"
#include "DISComponent.h"
#include "Engine/Engine.h"
#include "PDUProcessor.h"

DEFINE_LOG_CATEGORY(LogDISGameManager);
Expand All @@ -19,7 +20,7 @@ ADISGameManager* ADISGameManager::GetDISGameManager(UObject* WorldContextObject)
if (UWorld* World = GEngine->GetWorldFromContextObject(WorldContextObject, EGetWorldErrorMode::LogAndReturnNull))
{
TArray<AActor*> Actors;
UGameplayStatics::GetAllActorsOfClass(World, ADISGameManager::StaticClass(), Actors);
UGameplayStatics::GetAllActorsOfClass(Cast<UObject>(World), ADISGameManager::StaticClass(), Actors);
int NbActors = Actors.Num();
if (NbActors == 0)
{
Expand Down
243 changes: 0 additions & 243 deletions Source/DISRuntime/Private/Tests/UEOpenDISTests.cpp

This file was deleted.

1 change: 1 addition & 0 deletions Source/DISRuntime/Private/UDPSubsystem.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "UDPSubsystem.h"
#include "Async/Async.h"
#include "DISRuntimeSettings.h"

DEFINE_LOG_CATEGORY(LogUDPSubsystem);
Expand Down
12 changes: 6 additions & 6 deletions Source/DISRuntime/Public/DISClassEnumMappings.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,26 @@ struct FDISClassEnumStruct
{
GENERATED_BODY()

UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category = "GRILL DIS|Structs")
FString FriendlyName;

UPROPERTY(EditAnywhere, meta = (MustImplement = "DISInterface"))
UPROPERTY(EditAnywhere, meta = (MustImplement = "DISInterface"), Category = "GRILL DIS|Structs")
TSoftClassPtr<AActor> DISEntity;

UPROPERTY(EditAnywhere)
UPROPERTY(EditAnywhere, Category = "GRILL DIS|Structs")
TArray<FEntityType> AssociatedDISEnumerations;
};

/**
*
*
*/
UCLASS(BlueprintType)
class DISRUNTIME_API UDISClassEnumMappings : public UObject
{
GENERATED_BODY()

public:

UPROPERTY(EditAnywhere, Meta = (DisplayName = "DIS Class Enumeration Mappings", Tooltip = "Mappings between DIS enumerations and associated actors.", TitleProperty = "FriendlyName"))
UPROPERTY(EditAnywhere, Meta = (DisplayName = "DIS Class Enumeration Mappings", Tooltip = "Mappings between DIS enumerations and associated actors.", TitleProperty = "FriendlyName"), Category = "GRILL_DIS")
TArray<FDISClassEnumStruct> DISClassEnumArray;
};
98 changes: 49 additions & 49 deletions Source/DISRuntime/Public/DISEnumsAndStructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -234,11 +234,11 @@ struct FEarthCenteredEarthFixedFloat
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float X;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Y;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Z;

FEarthCenteredEarthFixedFloat()
Expand Down Expand Up @@ -288,11 +288,11 @@ struct FLatLonHeightFloat
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Latitude;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Longitude;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Height;

FLatLonHeightFloat()
Expand All @@ -315,11 +315,11 @@ struct FEastNorthUp
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector EastVector;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector NorthVector;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector UpVector;

FEastNorthUp()
Expand All @@ -342,11 +342,11 @@ struct FNorthEastDown
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector NorthVector;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector EastVector;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector DownVector;

FNorthEastDown()
Expand All @@ -369,11 +369,11 @@ struct FHeadingPitchRoll
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Heading;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Pitch;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Roll;

FHeadingPitchRoll()
Expand All @@ -396,11 +396,11 @@ struct FPsiThetaPhi
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Psi;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Theta;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float Phi;

FPsiThetaPhi()
Expand All @@ -423,9 +423,9 @@ struct FWorldOrigin
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FLatLonHeightFloat WorldOriginLLH;
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FNorthEastDown WorldOriginNED;
};

Expand All @@ -434,9 +434,9 @@ struct FClockTime
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
int32 Hour;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "4294967295"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "4294967295"), Category = "GRILL DIS|Structs")
int64 TimePastHour;

FClockTime()
Expand All @@ -461,11 +461,11 @@ struct FEntityID
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Site;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Application;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Entity;

FEntityID()
Expand Down Expand Up @@ -549,11 +549,11 @@ struct FEventID
{
GENERATED_BODY()

UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Site;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Application;
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 EventNumber;

FEventID()
Expand Down Expand Up @@ -586,25 +586,25 @@ struct FEntityType
GENERATED_BODY()

/** Kind of entity */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin="0", ClampMax="255"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin="0", ClampMax="255"), Category = "GRILL DIS|Structs")
int32 EntityKind;
/** Domain of entity (air, surface, subsurface, space, etc) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"), Category = "GRILL DIS|Structs")
int32 Domain;
/** Country to which the design of the entity is attributed */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Country;
/** The main category that describes the entity */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"), Category = "GRILL DIS|Structs")
int32 Category;
/** The particular subcategory to which the entity belongs based on the `Category` field */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"), Category = "GRILL DIS|Structs")
int32 Subcategory;
/** Specific information about the entity based on `Subcategory` field */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"), Category = "GRILL DIS|Structs")
int32 Specific;
/** Extra information required to describe a particular entity */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"), Category = "GRILL DIS|Structs")
int32 Extra;

FEntityType()
Expand Down Expand Up @@ -769,19 +769,19 @@ struct FArticulationParameters
GENERATED_BODY()

/** Identification of whether the Parameter Type Record is for an articulated (0) or attached part (1) shall be designated by this field */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin="0", ClampMax="1"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin="0", ClampMax="1"), Category = "GRILL DIS|Structs")
int32 ParameterTypeDesignator;
/** Indicates the change of any paramater for any articulated part. Increments by 1 for each change. */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "255"), Category = "GRILL DIS|Structs")
int32 ChangeIndicator;
/** The ID of the part to which this part is attached */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 PartAttachedTo;
/** The type class (multiples of 32 in the range 1,024-4,294,967,264) and type metric (0-31) of the articulated part. */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
int32 ParameterType;
/** The parameter value as defined by the ParameterType variable */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
float ParameterValue;

FArticulationParameters()
Expand Down Expand Up @@ -811,19 +811,19 @@ struct FBurstDescriptor
GENERATED_BODY()

/** The type of the entity */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FEntityType EntityType;
/** The type of warhead (0-65,535) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Warhead;
/** The type of fuse (0-65,535) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Fuse;
/** The number of bursts represented (0-65,535) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Quantity;
/** The number of rounds per minute for the munition (0-65,535) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "65535"), Category = "GRILL DIS|Structs")
int32 Rate;

FBurstDescriptor()
Expand Down Expand Up @@ -852,16 +852,16 @@ struct FDeadReckoningParameters
GENERATED_BODY()

/** The type of dead reackoning algorithm used by the entity (0-9) */
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "9"))
UPROPERTY(EditAnywhere, BlueprintReadWrite, meta = (ClampMin = "0", ClampMax = "9"), Category="GRILL DIS|Structs")
uint8 DeadReckoningAlgorithm;
/** Field used to specify other dead reckoning parameters which are currently undefined */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category="GRILL DIS|Structs")
TArray<uint8> OtherParameters;
/** The entity's linear acceleration in m/s^2 in either the World Coordinate System or the Entity's Coordinate System depending on the `DeadReckoningAlgorithm` field. */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector EntityLinearAcceleration;
/** The entity's angular acceleration in radians per second about each of the entity's own coordinate axes. Positive acceleration is defined by the right hand rule. */
UPROPERTY(EditAnywhere, BlueprintReadWrite)
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "GRILL DIS|Structs")
FVector EntityAngularVelocity;

FDeadReckoningParameters()
Expand Down
Loading

0 comments on commit c4b539a

Please sign in to comment.