Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,45 @@ ServerDefaultMap=/Engine/Maps/Entry
GlobalDefaultGameMode=/Script/Defragr.DefragrGameMode
GlobalDefaultServerGameMode=None

[/Script/Engine.PhysicsSettings]
DefaultGravityZ=-980.000000
DefaultTerminalVelocity=4000.000000
DefaultFluidFriction=0.300000
SimulateScratchMemorySize=262144
RagdollAggregateThreshold=4
TriangleMeshTriangleMinAreaThreshold=5.000000
bEnableAsyncScene=False
bEnableShapeSharing=False
bEnablePCM=True
bEnableStabilization=False
bWarnMissingLocks=True
bEnable2DPhysics=False
LockedAxis=Invalid
DefaultDegreesOfFreedom=Full3D
BounceThresholdVelocity=200.000000
FrictionCombineMode=Average
RestitutionCombineMode=Average
MaxAngularVelocity=3600.000000
MaxDepenetrationVelocity=0.000000
ContactOffsetMultiplier=0.020000
MinContactOffset=2.000000
MaxContactOffset=8.000000
bSimulateSkeletalMeshOnDedicatedServer=True
DefaultShapeComplexity=CTF_UseSimpleAndComplex
bDefaultHasComplexCollision=True
bSuppressFaceRemapTable=False
bSupportUVFromHitResults=False
bDisableActiveActors=False
bDisableCCD=False
bEnableEnhancedDeterminism=False
MaxPhysicsDeltaTime=0.033333
bSubstepping=False
bSubsteppingAsync=False
MaxSubstepDeltaTime=0.016667
MaxSubsteps=6
SyncSceneSmoothingFactor=0.000000
AsyncSceneSmoothingFactor=0.990000
InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10


8 changes: 7 additions & 1 deletion Defragr.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "4.8",
"EngineAssociation": "4.18",
"Category": "",
"Description": "",
"Modules": [
Expand All @@ -12,5 +12,11 @@
"Engine"
]
}
],
"Plugins": [
{
"Name": "HoudiniEngine",
"Enabled": true
}
]
}
14 changes: 1 addition & 13 deletions Source/Defragr.Target.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,6 @@ public class DefragrTarget : TargetRules
public DefragrTarget(TargetInfo Target)
{
Type = TargetType.Game;
}

//
// TargetRules interface.
//

public override void SetupBinaries(
TargetInfo Target,
ref List<UEBuildBinaryConfiguration> OutBuildBinaryConfigurations,
ref List<string> OutExtraModuleNames
)
{
OutExtraModuleNames.Add("Defragr");
ExtraModuleNames.AddRange( new string[] { "Defragr" } );
}
}
6 changes: 3 additions & 3 deletions Source/Defragr/Checkpoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
*/


#include "Checkpoint.h"
#include "Defragr.h"
#include "Components/BrushComponent.h"
#include "Checkpoint.h"

#include "DefragrPlayer.h"

Expand All @@ -30,7 +30,7 @@ ACheckpoint::ACheckpoint(const FObjectInitializer& ObjectInitializer)
BrushColor.A = 255;
}

void ACheckpoint::OnActorEnteredVolume(AActor* Actor)
void ACheckpoint::OnActorEnteredVolume(AActor* Actor, AActor* Actor2)
{
if(CheckpointType == ECheckpointType::End)
{
Expand All @@ -41,7 +41,7 @@ void ACheckpoint::OnActorEnteredVolume(AActor* Actor)
}
}

void ACheckpoint::OnActorExitedVolume(AActor* Actor)
void ACheckpoint::OnActorExitedVolume(AActor* Actor, AActor* Actor2)
{
// If the checkpoint is a starting checkpoint then start the
// race timer for the player.
Expand Down
4 changes: 2 additions & 2 deletions Source/Defragr/Checkpoint.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ class DEFRAGR_API ACheckpoint : public AVolume

public:
UFUNCTION()
virtual void OnActorEnteredVolume(class AActor* Actor);
virtual void OnActorEnteredVolume(class AActor* Actor, class AActor* Actor2);

UFUNCTION()
virtual void OnActorExitedVolume(class AActor* Actor);
virtual void OnActorExitedVolume(class AActor* Actor, class AActor* Actor2);
};
6 changes: 5 additions & 1 deletion Source/Defragr/Defragr.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

public class Defragr : ModuleRules
{
public Defragr(TargetInfo Target)
public Defragr(ReadOnlyTargetRules Target): base(Target)
{
PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs;

PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" });

PrivateDependencyModuleNames.AddRange(new string[] { });
}
}
1 change: 1 addition & 0 deletions Source/Defragr/Defragr.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "Defragr.h"
#include "Modules/ModuleManager.h"


IMPLEMENT_PRIMARY_GAME_MODULE( FDefaultGameModuleImpl, Defragr, "Defragr" );
Expand Down
2 changes: 1 addition & 1 deletion Source/Defragr/DefragrGameMode.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "Defragr.h"
#include "DefragrGameMode.h"
#include "Defragr.h"
#include "DefragrHUD.h"
#include "DefragrPlayer.h"

Expand Down
2 changes: 1 addition & 1 deletion Source/Defragr/DefragrHUD.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Copyright 1998-2015 Epic Games, Inc. All Rights Reserved.

#include "Defragr.h"
#include "DefragrHUD.h"
#include "Defragr.h"
#include "Engine/Canvas.h"
#include "TextureResource.h"
#include "CanvasItem.h"
Expand Down
8 changes: 4 additions & 4 deletions Source/Defragr/DefragrPlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Written by Terence-Lee 'Zinglish' Davis <zinglish[at]gmail.com>
*/

#include "Defragr.h"
#include "DefragrPlayer.h"
#include "Defragr.h"
#include "DefragrPlayerMoveComponent.h"
#include "DefragrPlayerCollisionComponent.h"
#include "Weapon.h"
Expand Down Expand Up @@ -35,7 +35,7 @@ ADefragrPlayer::ADefragrPlayer()
// Add physical reference to the player's forward vector
PlayerForwardRefComponent = CreateDefaultSubobject<USceneComponent>(TEXT("Player Forward"));
if(PlayerForwardRefComponent)
PlayerForwardRefComponent->AttachParent = Collider;
PlayerForwardRefComponent->SetupAttachment(Collider);

// Add a helper
#if WITH_EDITORONLY_DATA
Expand All @@ -46,14 +46,14 @@ ADefragrPlayer::ADefragrPlayer()
ArrowComponent->bTreatAsASprite = true;
ArrowComponent->SpriteInfo.Category = ConstructorStatics.ID_Characters;
ArrowComponent->SpriteInfo.DisplayName = ConstructorStatics.NAME_Characters;
ArrowComponent->AttachParent = PlayerForwardRefComponent;
ArrowComponent->SetupAttachment(PlayerForwardRefComponent);
ArrowComponent->bIsScreenSizeScaled = true;
}
#endif

// Initialize the camera
FirstPersonCameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("First Person Camera"));
FirstPersonCameraComponent->AttachParent = PlayerForwardRefComponent;
FirstPersonCameraComponent->SetupAttachment(PlayerForwardRefComponent);
FirstPersonCameraComponent->SetRelativeLocation(FVector(0.f, 0.f, 56.f - 4.f));

// Add the character collision and movement component
Expand Down
4 changes: 4 additions & 0 deletions Source/Defragr/DefragrPlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@
#pragma once

#include "GameFramework/Pawn.h"
#include "Runtime/Engine/Classes/Sound/SoundCue.h"
#include "Runtime/Engine/Classes/Components/BoxComponent.h"
#include "Runtime/Engine/Classes/Camera/CameraComponent.h"
#include "Runtime/Engine/Classes/Components/ArrowComponent.h"

#include "DefragrPlayer.generated.h"

Expand Down
5 changes: 2 additions & 3 deletions Source/Defragr/DefragrPlayerCollisionComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Written by Terence-Lee 'Zinglish' Davis <zinglish[at]gmail.com>
*/

#include "DefragrPlayerCollisionComponent.h"
#include "Defragr.h"
#include "DefragrPlayer.h"
#include "DefragrPlayerCollisionComponent.h"
#include "DefragrPlayerMoveComponent.h"

#include "Engine.h"
Expand All @@ -13,7 +13,6 @@
// Sets default values for this component's properties
UDefragrPlayerCollisionComponent::UDefragrPlayerCollisionComponent()
{
bWantsBeginPlay = true;
PrimaryComponentTick.bCanEverTick = true;
}

Expand Down Expand Up @@ -299,7 +298,7 @@ bool UDefragrPlayerCollisionComponent::Trace(FHitResult& Result, FVector Start,
FCollisionQueryParams QueryParams(TEXT(""), false);
FCollisionObjectQueryParams ObjectQueryParams(ECC_WorldStatic);

bool Hit = GetWorld()->SweepSingle(Result, Start, End, FQuat::Identity, CollisionShape, QueryParams, ObjectQueryParams);
bool Hit = GetWorld()->SweepSingleByObjectType(Result, Start, End, FQuat::Identity, ObjectQueryParams, CollisionShape, QueryParams);

return Hit;
}
Expand Down
10 changes: 5 additions & 5 deletions Source/Defragr/DefragrPlayerMoveComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
* Written by Terence-Lee 'Zinglish' Davis <zinglish[at]gmail.com>
*/

#include "DefragrPlayerMoveComponent.h"
#include "Defragr.h"
#include "DefragrPlayer.h"
#include "DefragrPlayerMoveComponent.h"
#include "DefragrPlayerCollisionComponent.h"
#include "Runtime/Core/Public/GenericPlatform/GenericPlatformMath.h"

#include "Engine.h"

Expand All @@ -16,7 +17,6 @@ UDefragrPlayerMoveComponent::UDefragrPlayerMoveComponent(const FObjectInitialize
{
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
// off to improve performance if you don't need them.
bWantsBeginPlay = true;
PrimaryComponentTick.bCanEverTick = true;
}

Expand Down Expand Up @@ -318,9 +318,9 @@ float UDefragrPlayerMoveComponent::CmdScale()
float total;
float scale;

max = abs(WishMove.X);
if (abs(WishMove.Y) > max) {
max = abs(WishMove.Y);
max = FGenericPlatformMath::Abs(WishMove.X);
if (FGenericPlatformMath::Abs(WishMove.Y) > max) {
max = FGenericPlatformMath::Abs(WishMove.Y);
}
/*if (abs(cmd->upmove) > max) {
max = abs(cmd->upmove);
Expand Down
4 changes: 2 additions & 2 deletions Source/Defragr/JumpPadVolume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
* Written by Terence-Lee 'Zinglish' Davis <zinglish[at]gmail.com>
*/

#include "JumpPadVolume.h"
#include "Defragr.h"
#include "Components/BrushComponent.h"
#include "JumpPadVolume.h"

#include "DefragrPlayer.h"

Expand All @@ -26,7 +26,7 @@ AJumpPadVolume::AJumpPadVolume(const FObjectInitializer& ObjectInitializer)
BrushColor.A = 255;
}

void AJumpPadVolume::OnActorEnteredVolume(AActor* Actor)
void AJumpPadVolume::OnActorEnteredVolume(AActor * Actor, AActor * Actor2)
{
ADefragrPlayer* Player = Cast<ADefragrPlayer>(Actor);

Expand Down
2 changes: 1 addition & 1 deletion Source/Defragr/JumpPadVolume.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ class DEFRAGR_API AJumpPadVolume : public AVolume

public:
UFUNCTION()
virtual void OnActorEnteredVolume(class AActor* Actor);
void OnActorEnteredVolume(class AActor* Actor, class AActor* Actor2);
};
6 changes: 3 additions & 3 deletions Source/Defragr/Pickup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
* Written by Terence-Lee 'Zinglish' Davis <zinglish[at]gmail.com>
*/

#include "Pickup.h"
#include "Defragr.h"

#include "Engine.h"

#include "DefragrPlayer.h"

#include "Pickup.h"


// Sets default values
Expand All @@ -32,7 +32,7 @@ APickup::APickup()

// Create the pickup mesh
PickupMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("PickupMesh"));
PickupMesh->AttachTo(RootComponent);
PickupMesh->SetupAttachment(RootComponent);
}

void APickup::BeginPlay() {Super::BeginPlay();}
Expand All @@ -41,7 +41,7 @@ void APickup::Tick(float DeltaTime) {Super::Tick(DeltaTime);}
void APickup::OnPlayerPickup(ADefragrPlayer* Player) {}
void APickup::OnPickedUp_Implementation() {}

void APickup::OnActorOverlapPickup(class AActor* Actor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
void APickup::OnActorOverlapPickup(class UPrimitiveComponent* Comp, class AActor* Actor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult)
{
ADefragrPlayer* Player = Cast<ADefragrPlayer>(Actor);

Expand Down
4 changes: 3 additions & 1 deletion Source/Defragr/Pickup.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
#pragma once

#include "GameFramework/Actor.h"
#include "Runtime/Engine/Classes/Components/StaticMeshComponent.h"
#include "Runtime/Engine/Classes/Components/BoxComponent.h"
#include "Pickup.generated.h"

class ADefragrPlayer;
Expand Down Expand Up @@ -48,5 +50,5 @@ class DEFRAGR_API APickup : public AActor

private:
UFUNCTION()
void OnActorOverlapPickup(class AActor* Actor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);
void OnActorOverlapPickup(class UPrimitiveComponent* Comp, class AActor* Actor, class UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult & SweepResult);
};
2 changes: 1 addition & 1 deletion Source/Defragr/Projectile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
* Written by Terence-Lee 'Zinglish' Davis <zinglish[at]gmail.com>
*/

#include "Projectile.h"
#include "Defragr.h"

#include "Weapon.h"
#include "DefragrPlayer.h"

#include "Projectile.h"


AProjectile::AProjectile()
Expand Down
6 changes: 3 additions & 3 deletions Source/Defragr/TeleportTarget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
* Written by Terence-Lee 'Zinglish' Davis <zinglish[at]gmail.com>
*/

#include "Defragr.h"
#include "TeleportTarget.h"
#include "Defragr.h"

#include "Components/BillboardComponent.h"
#include "Components/ArrowComponent.h"
Expand Down Expand Up @@ -45,7 +45,7 @@ ATeleportTarget::ATeleportTarget(const FObjectInitializer& ObjectInitializer)
SpriteComponent->Sprite = ConstructorStatics.TextureObject.Get(); // Get the sprite texture from helper class object
SpriteComponent->SpriteInfo.Category = ConstructorStatics.ID_TeleportTarget; // Assign sprite category name
SpriteComponent->SpriteInfo.DisplayName = ConstructorStatics.NAME_TeleportTarget; // Assign sprite display name
SpriteComponent->AttachParent = RootComponent; // Attach sprite to scene component
SpriteComponent->SetupAttachment(RootComponent); // Attach sprite to scene component
SpriteComponent->Mobility = EComponentMobility::Static;
SpriteComponent->bIsScreenSizeScaled = true;
}
Expand All @@ -57,7 +57,7 @@ ATeleportTarget::ATeleportTarget(const FObjectInitializer& ObjectInitializer)
ArrowComponent->bTreatAsASprite = true;
ArrowComponent->SpriteInfo.Category = ConstructorStatics.ID_TeleportTarget;
ArrowComponent->SpriteInfo.DisplayName = ConstructorStatics.NAME_TeleportTarget;
ArrowComponent->AttachParent = RootComponent;
ArrowComponent->SetupAttachment(RootComponent);
ArrowComponent->bIsScreenSizeScaled = true;
}

Expand Down
Loading