From 3c0a358e66e1f56aa58806186dbf24c54502ac65 Mon Sep 17 00:00:00 2001 From: Kingsmedia Date: Thu, 26 May 2022 17:32:23 +0200 Subject: [PATCH] 181 - Lag Compensation Component --- .../Components/LagCompensationComponent.cpp | 20 +++++++++++++++ .../Components/LagCompensationComponent.h | 25 +++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 Source/Blaster/Components/LagCompensationComponent.cpp create mode 100644 Source/Blaster/Components/LagCompensationComponent.h diff --git a/Source/Blaster/Components/LagCompensationComponent.cpp b/Source/Blaster/Components/LagCompensationComponent.cpp new file mode 100644 index 0000000..bcea332 --- /dev/null +++ b/Source/Blaster/Components/LagCompensationComponent.cpp @@ -0,0 +1,20 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "LagCompensationComponent.h" + +ULagCompensationComponent::ULagCompensationComponent() +{ + PrimaryComponentTick.bCanEverTick = true; +} + +void ULagCompensationComponent::BeginPlay() +{ + Super::BeginPlay(); +} + +void ULagCompensationComponent::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) +{ + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); +} + diff --git a/Source/Blaster/Components/LagCompensationComponent.h b/Source/Blaster/Components/LagCompensationComponent.h new file mode 100644 index 0000000..cb55632 --- /dev/null +++ b/Source/Blaster/Components/LagCompensationComponent.h @@ -0,0 +1,25 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Components/ActorComponent.h" +#include "LagCompensationComponent.generated.h" + + +UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) +class BLASTER_API ULagCompensationComponent : public UActorComponent +{ + GENERATED_BODY() + +public: + ULagCompensationComponent(); + virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; + +protected: + virtual void BeginPlay() override; + +public: + + +};