Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ue5.1.1 update #6

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
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
17 changes: 17 additions & 0 deletions .vsconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"version": "1.0",
"components": [
"Microsoft.Net.Component.4.6.2.TargetingPack",
"Microsoft.VisualStudio.Component.VC.14.33.17.3.ARM64",
"Microsoft.VisualStudio.Component.VC.14.33.17.3.x86.x64",
"Microsoft.VisualStudio.Component.VC.Tools.ARM64",
"Microsoft.VisualStudio.Component.VC.Tools.x86.x64",
"Microsoft.VisualStudio.Component.Windows10SDK",
"Microsoft.VisualStudio.Workload.CoreEditor",
"Microsoft.VisualStudio.Workload.ManagedDesktop",
"Microsoft.VisualStudio.Workload.NativeCrossPlat",
"Microsoft.VisualStudio.Workload.NativeDesktop",
"Microsoft.VisualStudio.Workload.NativeGame",
"Microsoft.VisualStudio.Workload.Universal"
]
}
2 changes: 1 addition & 1 deletion Blaster.uproject
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"FileVersion": 3,
"EngineAssociation": "5.0",
"EngineAssociation": "5.1",
"Category": "",
"Description": "",
"Modules": [
Expand Down
68 changes: 34 additions & 34 deletions Config/DefaultGame.ini
Original file line number Diff line number Diff line change
Expand Up @@ -46,40 +46,40 @@ bCookMapsOnly=False
bCompressed=False
bSkipEditorContent=False
bSkipMovies=False
-IniKeyBlacklist=KeyStorePassword
-IniKeyBlacklist=KeyPassword
-IniKeyBlacklist=rsa.privateexp
-IniKeyBlacklist=rsa.modulus
-IniKeyBlacklist=rsa.publicexp
-IniKeyBlacklist=aes.key
-IniKeyBlacklist=SigningPublicExponent
-IniKeyBlacklist=SigningModulus
-IniKeyBlacklist=SigningPrivateExponent
-IniKeyBlacklist=EncryptionKey
-IniKeyBlacklist=DevCenterUsername
-IniKeyBlacklist=DevCenterPassword
-IniKeyBlacklist=IOSTeamID
-IniKeyBlacklist=SigningCertificate
-IniKeyBlacklist=MobileProvision
-IniKeyBlacklist=IniKeyBlacklist
-IniKeyBlacklist=IniSectionBlacklist
+IniKeyBlacklist=KeyStorePassword
+IniKeyBlacklist=KeyPassword
+IniKeyBlacklist=rsa.privateexp
+IniKeyBlacklist=rsa.modulus
+IniKeyBlacklist=rsa.publicexp
+IniKeyBlacklist=aes.key
+IniKeyBlacklist=SigningPublicExponent
+IniKeyBlacklist=SigningModulus
+IniKeyBlacklist=SigningPrivateExponent
+IniKeyBlacklist=EncryptionKey
+IniKeyBlacklist=DevCenterUsername
+IniKeyBlacklist=DevCenterPassword
+IniKeyBlacklist=IOSTeamID
+IniKeyBlacklist=SigningCertificate
+IniKeyBlacklist=MobileProvision
+IniKeyBlacklist=IniKeyBlacklist
+IniKeyBlacklist=IniSectionBlacklist
-IniKeyDenylist=KeyStorePassword
-IniKeyDenylist=KeyPassword
-IniKeyDenylist=rsa.privateexp
-IniKeyDenylist=rsa.modulus
-IniKeyDenylist=rsa.publicexp
-IniKeyDenylist=aes.key
-IniKeyDenylist=SigningPublicExponent
-IniKeyDenylist=SigningModulus
-IniKeyDenylist=SigningPrivateExponent
-IniKeyDenylist=EncryptionKey
-IniKeyDenylist=DevCenterUsername
-IniKeyDenylist=DevCenterPassword
-IniKeyDenylist=IOSTeamID
-IniKeyDenylist=SigningCertificate
-IniKeyDenylist=MobileProvision
-IniKeyDenylist=IniKeyDenylist
-IniKeyDenylist=IniSectionBlacklist
+IniKeyDenylist=KeyStorePassword
+IniKeyDenylist=KeyPassword
+IniKeyDenylist=rsa.privateexp
+IniKeyDenylist=rsa.modulus
+IniKeyDenylist=rsa.publicexp
+IniKeyDenylist=aes.key
+IniKeyDenylist=SigningPublicExponent
+IniKeyDenylist=SigningModulus
+IniKeyDenylist=SigningPrivateExponent
+IniKeyDenylist=EncryptionKey
+IniKeyDenylist=DevCenterUsername
+IniKeyDenylist=DevCenterPassword
+IniKeyDenylist=IOSTeamID
+IniKeyDenylist=SigningCertificate
+IniKeyDenylist=MobileProvision
+IniKeyDenylist=IniKeyDenylist
+IniKeyDenylist=IniSectionBlacklist
+MapsToCook=(FilePath="/Game/Maps/Lobby")
+MapsToCook=(FilePath="/Game/Maps/GameStartupMap")
+MapsToCook=(FilePath="/Game/Maps/TransitionMap")
Expand Down
9 changes: 7 additions & 2 deletions Config/DefaultInput.ini
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,11 @@ bUseMouseForTouch=False
bEnableMouseSmoothing=True
bEnableFOVScaling=True
bCaptureMouseOnLaunch=True
bEnableLegacyInputScales=True
bEnableMotionControls=True
bFilterInputByPlatformUser=False
bShouldFlushPressedKeysOnViewportFocusLost=True
bEnableDynamicComponentInputBinding=True
bAlwaysShowTouchInterface=False
bShowConsoleOnFourFingerTap=True
bEnableGestureRecognizer=False
Expand All @@ -93,8 +98,8 @@ DoubleClickTime=0.200000
+AxisMappings=(AxisName="MoveRight",Scale=-1.000000,Key=A)
+AxisMappings=(AxisName="Turn",Scale=1.000000,Key=MouseX)
+AxisMappings=(AxisName="LookUp",Scale=-1.000000,Key=MouseY)
DefaultPlayerInputClass=/Script/Engine.PlayerInput
DefaultInputComponentClass=/Script/Engine.InputComponent
DefaultPlayerInputClass=/Script/EnhancedInput.EnhancedPlayerInput
DefaultInputComponentClass=/Script/EnhancedInput.EnhancedInputComponent
DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.DefaultVirtualJoysticks
-ConsoleKeys=Tilde
+ConsoleKeys=Tilde
Expand Down
Binary file modified Content/Maps/GameStartupMap.umap
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,18 @@ bool UMenu::Initialize()
return true;
}

/*
void UMenu::OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld)
{
MenuTearDown();
Super::OnLevelRemovedFromWorld(InLevel, InWorld);
}

*/
void UMenu::NativeDestruct()
{
MenuTearDown();
Super::NativeDestruct();
}
void UMenu::OnCreateSession(bool bWasSuccessful)
{
if (bWasSuccessful)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ UMultiplayerSessionsSubsystem::UMultiplayerSessionsSubsystem():
DestroySessionCompleteDelegate(FOnDestroySessionCompleteDelegate::CreateUObject(this, &ThisClass::OnDestroySessionComplete)),
StartSessionCompleteDelegate(FOnStartSessionCompleteDelegate::CreateUObject(this, &ThisClass::OnStartSessionComplete))
{
IOnlineSubsystem* Subsystem = IOnlineSubsystem::Get();
if (Subsystem)
{
SessionInterface = Subsystem->GetSessionInterface();
}

}

void UMultiplayerSessionsSubsystem::CreateSession(int32 NumPublicConnections, FString MatchType)
Expand Down Expand Up @@ -64,7 +60,7 @@ void UMultiplayerSessionsSubsystem::CreateSession(int32 NumPublicConnections, FS

void UMultiplayerSessionsSubsystem::FindSessions(int32 MaxSearchResults)
{
if (!SessionInterface.IsValid())
if (!IsValidSessionInterface())
{
return;
}
Expand Down Expand Up @@ -178,3 +174,20 @@ void UMultiplayerSessionsSubsystem::OnDestroySessionComplete(FName SessionName,
void UMultiplayerSessionsSubsystem::OnStartSessionComplete(FName SessionName, bool bWasSuccessful)
{
}

bool UMultiplayerSessionsSubsystem::IsValidSessionInterface()
{
if (!SessionInterface)
{
IOnlineSubsystem* Subsystem = IOnlineSubsystem::Get();

if (Subsystem)
{
SessionInterface = Subsystem->GetSessionInterface();
}

}


return SessionInterface.IsValid();
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ class MULTIPLAYERSESSIONS_API UMenu : public UUserWidget
protected:

virtual bool Initialize() override;
virtual void OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld) override;

//virtual void OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld) override;
virtual void NativeDestruct() override;
//
// Callbacks for the custom delegates on the MultiplayerSessionsSubsystem
//
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ class MULTIPLAYERSESSIONS_API UMultiplayerSessionsSubsystem : public UGameInstan
void OnDestroySessionComplete(FName SessionName, bool bWasSuccessful);
void OnStartSessionComplete(FName SessionName, bool bWasSuccessful);

bool IsValidSessionInterface();

private:
IOnlineSessionPtr SessionInterface;
TSharedPtr<FOnlineSessionSettings> LastSessionSettings;
Expand Down
43 changes: 43 additions & 0 deletions Source/Blaster/BlasterComponents/LagCompensationComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ void ULagCompensationComponent::CacheBoxPositions(ABlasterCharacter* HitCharacte
}
}

/*
void ULagCompensationComponent::MoveBoxes(ABlasterCharacter* HitCharacter, const FFramePackage& Package)
{
if (HitCharacter == nullptr) return;
Expand All @@ -300,8 +301,30 @@ void ULagCompensationComponent::MoveBoxes(ABlasterCharacter* HitCharacter, const
HitBoxPair.Value->SetBoxExtent(Package.HitBoxInfo[HitBoxPair.Key].BoxExtent);
}
}
}*/

void ULagCompensationComponent::MoveBoxes(ABlasterCharacter* HitCharacter, const FFramePackage& FramePackage)
{
for (TTuple<FName, UBoxComponent*>& HitBoxPair : HitCharacter->HitCollisionBoxes)
{

if (HitBoxPair.Value != nullptr)
{

const FBoxInformation* BoxValue = FramePackage.HitBoxInfo.Find(HitBoxPair.Key);

if (BoxValue)
{
HitBoxPair.Value->SetWorldLocation(BoxValue->Location);
HitBoxPair.Value->SetWorldRotation(BoxValue->Rotation);
HitBoxPair.Value->SetBoxExtent(BoxValue->BoxExtent);
}

}
}
}

/*
void ULagCompensationComponent::ResetHitBoxes(ABlasterCharacter* HitCharacter, const FFramePackage& Package)
{
if (HitCharacter == nullptr) return;
Expand All @@ -315,6 +338,26 @@ void ULagCompensationComponent::ResetHitBoxes(ABlasterCharacter* HitCharacter, c
HitBoxPair.Value->SetCollisionEnabled(ECollisionEnabled::NoCollision);
}
}
}*/
void ULagCompensationComponent::ResetHitBoxes(ABlasterCharacter* HitCharacter, const FFramePackage& FramePackage)
{
if (HitCharacter == nullptr) return;

for (TTuple<FName, UBoxComponent*>& HitBoxPair : HitCharacter->HitCollisionBoxes)
{
if (HitBoxPair.Value != nullptr)
{
const FBoxInformation* BoxValue = FramePackage.HitBoxInfo.Find(HitBoxPair.Key);

if (BoxValue)
{
HitBoxPair.Value->SetWorldLocation(BoxValue->Location);
HitBoxPair.Value->SetWorldRotation(BoxValue->Rotation);
HitBoxPair.Value->SetBoxExtent(BoxValue->BoxExtent);
HitBoxPair.Value->SetCollisionEnabled(ECollisionEnabled::NoCollision);
}
}
}
}

void ULagCompensationComponent::EnableCharacterMeshCollision(ABlasterCharacter* HitCharacter, ECollisionEnabled::Type CollisionEnabled)
Expand Down
27 changes: 27 additions & 0 deletions Source/Blaster/BlasterComponents/LagCompensationComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@
USTRUCT(BlueprintType)
struct FBoxInformation
{
// Constructor
FBoxInformation()
: Location(0.0f, 0.0f, 0.0f)
, Rotation(0.0f, 0.0f, 0.0f)
, BoxExtent(0.0f, 0.0f, 0.0f)
{
}
GENERATED_BODY()

UPROPERTY()
Expand All @@ -19,11 +26,21 @@ struct FBoxInformation

UPROPERTY()
FVector BoxExtent;


};

USTRUCT(BlueprintType)
struct FFramePackage
{

// Constructor
FFramePackage()
: Time(0.0f)
, Character(nullptr)
{
}

GENERATED_BODY()

UPROPERTY()
Expand All @@ -34,23 +51,31 @@ struct FFramePackage

UPROPERTY()
ABlasterCharacter* Character;


};

USTRUCT(BlueprintType)
struct FServerSideRewindResult
{

GENERATED_BODY()

UPROPERTY()
bool bHitConfirmed;

UPROPERTY()
bool bHeadShot;

};

USTRUCT(BlueprintType)
struct FShotgunServerSideRewindResult
{
// Constructor
FShotgunServerSideRewindResult()
{
}
GENERATED_BODY()

UPROPERTY()
Expand All @@ -59,6 +84,8 @@ struct FShotgunServerSideRewindResult
UPROPERTY()
TMap<ABlasterCharacter*, uint32> BodyShots;



};

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
Expand Down
10 changes: 9 additions & 1 deletion Source/Blaster/HUD/OverheadWidget.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,16 @@ void UOverheadWidget::ShowPlayerNetRole(APawn* InPawn)
SetDisplayText(RemoteRoleString);
}

void UOverheadWidget::OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld)
/*void UOverheadWidget::OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld)
{
RemoveFromParent();
Super::OnLevelRemovedFromWorld(InLevel, InWorld);
}
*/
void UOverheadWidget::NativeDestruct()
{

RemoveFromParent();
Super::NativeDestruct();

}
9 changes: 5 additions & 4 deletions Source/Blaster/HUD/OverheadWidget.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ class BLASTER_API UOverheadWidget : public UUserWidget
GENERATED_BODY()
public:
UPROPERTY(meta = (BindWidget))
class UTextBlock* DisplayText;
class UTextBlock* DisplayText;

void SetDisplayText(FString TextToDisplay);

UFUNCTION(BlueprintCallable)
void ShowPlayerNetRole(APawn* InPawn);
void ShowPlayerNetRole(APawn* InPawn);

protected:
virtual void OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld) override;
//virtual void OnLevelRemovedFromWorld(ULevel* InLevel, UWorld* InWorld) override;
virtual void NativeDestruct() override;

};
};
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ void ABlasterPlayerController::CheckPing(float DeltaTime)
PlayerState = PlayerState == nullptr ? GetPlayerState<APlayerState>() : PlayerState;
if (PlayerState)
{
if (PlayerState->GetPing() * 4 > HighPingThreshold) // ping is compressed; it's actually ping / 4
if (PlayerState->GetPingInMilliseconds() * 4 > HighPingThreshold) // ping is compressed; it's actually ping / 4
{
HighPingWarning();
PingAnimationRunningTime = 0.f;
Expand Down
Loading