Merge branch 'BackupBuild' into dev
# Conflicts: # EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset # EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
This commit is contained in:
commit
8f951c3927
@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
@ -26,6 +26,7 @@ r.Mobile.EnableNoPrecomputedLightingCSMShader=1
|
|||||||
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
|
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
|
||||||
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=true
|
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=true
|
||||||
r.Shadow.Virtual.Enable=1
|
r.Shadow.Virtual.Enable=1
|
||||||
|
r.DefaultFeature.AutoExposure=False
|
||||||
|
|
||||||
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
|
[/Script/WindowsTargetPlatform.WindowsTargetSettings]
|
||||||
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12
|
||||||
@ -88,3 +89,8 @@ ManualIPAddress=
|
|||||||
|
|
||||||
[CoreRedirects]
|
[CoreRedirects]
|
||||||
+PropertyRedirects=(OldName="/Script/EndlessVendetta.BaseWeaponClass.player",NewName="/Script/EndlessVendetta.BaseWeaponClass.playerInWorld")
|
+PropertyRedirects=(OldName="/Script/EndlessVendetta.BaseWeaponClass.player",NewName="/Script/EndlessVendetta.BaseWeaponClass.playerInWorld")
|
||||||
|
|
||||||
|
[/Script/NavigationSystem.RecastNavMesh]
|
||||||
|
AgentMaxStepHeight=73.434059
|
||||||
|
AgentMaxSlope=64.648003
|
||||||
|
|
||||||
|
BIN
EndlessVendetta/Content/AI/Enemy/Basic/BP_BasicEnemyCharacter.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/AI/Enemy/Basic/BP_BasicEnemyCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/AssaultRifles/BP_BaseAssaultRifle.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/AssaultRifles/BP_BaseAssaultRifle.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_BaseWeapon.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_GunCameraShake.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/BP_GunCameraShake.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/BP_BasePistolWeapon.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/Pistols/BP_BasePistolWeapon.uasset
(Stored with Git LFS)
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:d593d68d5b9a9fc58b1b7ecc44936b84e361aaa1762ab04c5924e36bfd45bee9
|
||||||
|
size 61494
|
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/WeaonRecoil/AssaultRecoilPattern.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BaseWeapons/WeaonRecoil/AssaultRecoilPattern.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/WBP_Crosshair.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/WBP_Crosshair.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/Gadgets/GM_GadgetManager.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Gadgets/GM_GadgetManager.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/M_Concrete.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/M_Concrete.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/Panel_Concrete_BaseColor.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/Panel_Concrete_BaseColor.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/Panel_Concrete_Normal.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/Panel_Concrete_Normal.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/Panel_Concrete_OcclusionRoughnessMetallic.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/LevelPrototyping/Materials/Panel_Concrete_OcclusionRoughnessMetallic.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3ffb6c31ffcde26ae8a0f677a27ced553a7f10e9a7a41786f4c7a319f02205bc
|
||||||
|
size 411380
|
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/HDRI/HDRI_Epic_Courtyard_Daylight.uasset
(Stored with Git LFS)
Binary file not shown.
@ -24,6 +24,9 @@ void ABaseWeaponClass::BeginPlay()
|
|||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
collisionParams.AddIgnoredActor(playerInWorld);
|
||||||
|
collisionParams.AddIgnoredActor(this);
|
||||||
|
|
||||||
// Attempt to find the player character
|
// Attempt to find the player character
|
||||||
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(this, 0);
|
APlayerController* PlayerController = UGameplayStatics::GetPlayerController(this, 0);
|
||||||
playerInWorld = Cast<AEndlessVendettaCharacter>(PlayerController->GetCharacter());
|
playerInWorld = Cast<AEndlessVendettaCharacter>(PlayerController->GetCharacter());
|
||||||
@ -60,6 +63,13 @@ void ABaseWeaponClass::Tick(float DeltaTime)
|
|||||||
{
|
{
|
||||||
ApplyRecoil(DeltaTime);
|
ApplyRecoil(DeltaTime);
|
||||||
}
|
}
|
||||||
|
UE_LOG(LogTemp, Display, TEXT("currnt pitch: %f"), currentPitch);
|
||||||
|
if (currentPitch < 0 && bStopShooting)
|
||||||
|
{
|
||||||
|
float increment = currentPitch * DeltaTime * 8;
|
||||||
|
currentPitch -= increment;
|
||||||
|
playerInWorld->AddControllerPitchInput(-increment);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -73,6 +83,10 @@ void ABaseWeaponClass::GenerateRecoilVector()
|
|||||||
recoilResultYaw = FMath::Sin(FMath::DegreesToRadians(angle));
|
recoilResultYaw = FMath::Sin(FMath::DegreesToRadians(angle));
|
||||||
recoilResultPitch = FMath::Cos(FMath::DegreesToRadians(angle));
|
recoilResultPitch = FMath::Cos(FMath::DegreesToRadians(angle));
|
||||||
|
|
||||||
|
if (bulletCountShoot >= howMnyShotsTillRclStop)
|
||||||
|
{
|
||||||
|
recoilResultPitch = 0;
|
||||||
|
}
|
||||||
//scaling direction to magnitude
|
//scaling direction to magnitude
|
||||||
recoilResultPitch *= -tempMag;
|
recoilResultPitch *= -tempMag;
|
||||||
recoilResultYaw *= tempMag;
|
recoilResultYaw *= tempMag;
|
||||||
@ -87,11 +101,14 @@ void ABaseWeaponClass::ApplyRecoil(float DeltaTime)
|
|||||||
{
|
{
|
||||||
float amplitude = RecoilCurve->GetFloatValue(recoilTime); //get current value of curve in time
|
float amplitude = RecoilCurve->GetFloatValue(recoilTime); //get current value of curve in time
|
||||||
recoilTime += DeltaTime;
|
recoilTime += DeltaTime;
|
||||||
if (bulletCountShoot <= 3) playerInWorld->AddControllerPitchInput(GetRecoilPitch(amplitude, recoilTime));
|
if (bulletCountShoot <= 3)
|
||||||
traceEnd = traceStart + (UKismetMathLibrary::GetForwardVector(playerInWorld->GetControlRotation() * GetRecoilPitch(amplitude, recoilTime)));
|
{
|
||||||
//UE_LOG(LogTemp, Warning, TEXT("Controller pitch: Pitch: %f Yaw: %f, Roll: %f"), playerInWorld->GetControlRotation().Pitch, playerInWorld->GetControlRotation().Yaw, playerInWorld->GetControlRotation().Roll);
|
playerInWorld->AddControllerPitchInput(GetRecoilPitch(amplitude, recoilTime));
|
||||||
|
currentPitch += GetRecoilPitch(amplitude,recoilTime);
|
||||||
|
}
|
||||||
|
playerInWorld->AddControllerPitchInput(FMath::RandRange(-5 * DeltaTime, 5* DeltaTime));
|
||||||
|
GunStartArrow->AddRelativeRotation(FRotator(-GetRecoilPitch(amplitude, recoilTime), 0, 0));
|
||||||
playerInWorld->AddControllerYawInput(GetRecoilYaw(amplitude, recoilTime));
|
playerInWorld->AddControllerYawInput(GetRecoilYaw(amplitude, recoilTime));
|
||||||
//UE_LOG(LogTemp, Warning, TEXT("recoilTime: %f"), recoilTime);
|
|
||||||
UpdateSamples(amplitude, recoilTime);
|
UpdateSamples(amplitude, recoilTime);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -139,8 +156,13 @@ void ABaseWeaponClass::ClickDetectionTimer()
|
|||||||
void ABaseWeaponClass::CancelFire()
|
void ABaseWeaponClass::CancelFire()
|
||||||
{
|
{
|
||||||
GetWorldTimerManager().ClearTimer(timerHandle);
|
GetWorldTimerManager().ClearTimer(timerHandle);
|
||||||
|
if (bulletCountShoot <= 0) return;
|
||||||
UE_LOG(LogTemp, Display, TEXT("FireCancelled"));
|
UE_LOG(LogTemp, Display, TEXT("FireCancelled"));
|
||||||
bulletCountShoot = 0;
|
bulletCountShoot = 0;
|
||||||
|
GunStartArrow->SetRelativeRotation(FRotator(0));
|
||||||
|
//playerInWorld->GetController()->SetControlRotation(FRotator(0, playerInWorld->GetActorRotation().Yaw, playerInWorld->GetActorRotation().Roll));
|
||||||
|
bStopShooting = true;
|
||||||
|
nullSamples();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ABaseWeaponClass::Fire()
|
void ABaseWeaponClass::Fire()
|
||||||
@ -150,26 +172,17 @@ void ABaseWeaponClass::Fire()
|
|||||||
//do damage fallof based off distance
|
//do damage fallof based off distance
|
||||||
traceStart = GunStartArrow->GetComponentLocation();
|
traceStart = GunStartArrow->GetComponentLocation();
|
||||||
traceEnd = traceStart + (GunStartArrow->GetForwardVector() * BulletDistance);
|
traceEnd = traceStart + (GunStartArrow->GetForwardVector() * BulletDistance);
|
||||||
FCollisionQueryParams collisionParams;
|
if (GetWorldTimerManager().IsTimerActive(timerHandle)) return;
|
||||||
collisionParams.AddIgnoredActor(playerInWorld);
|
|
||||||
collisionParams.AddIgnoredActor(this);
|
|
||||||
/*RecoilVerticalLimit(outHit);*/
|
|
||||||
if (GetWorldTimerManager().IsTimerActive(timerHandle))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
GetWorld()->LineTraceSingleByChannel(outHit, traceStart, traceEnd, ECC_Visibility, collisionParams);
|
GetWorld()->LineTraceSingleByChannel(outHit, traceStart, traceEnd, ECC_Visibility, collisionParams);
|
||||||
//Debug line to see where the trace hit
|
DrawDebugLine(this->GetWorld(), traceStart, traceEnd, FColor::Black , false, 0.2f, 0U, 0.2f);
|
||||||
DrawDebugLine(this->GetWorld(), traceStart, traceEnd, FColor::Red, false, 5.0f, 0U, 2.5f);
|
|
||||||
playerControllerRef->PlayerCameraManager->StartCameraShake(CameraShakeClass, 1);
|
playerControllerRef->PlayerCameraManager->StartCameraShake(CameraShakeClass, 1);
|
||||||
currentAmmoCount -= 1;
|
currentAmmoCount -= 1;
|
||||||
UE_LOG(LogTemp, Display, TEXT("Ammo Count: %d"), currentAmmoCount);
|
|
||||||
GenerateRecoilVector();
|
GenerateRecoilVector();
|
||||||
ClickDetectionTimer();
|
ClickDetectionTimer();
|
||||||
bulletCountShoot += 1;
|
bulletCountShoot += 1;
|
||||||
|
bStopShooting = false;
|
||||||
if (outHit.bBlockingHit)
|
if (outHit.bBlockingHit)
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Display, TEXT("Ammo Count: %s"), *outHit.GetActor()->GetName());
|
|
||||||
if (!Cast<AAICharacter>(outHit.GetActor())) return;
|
if (!Cast<AAICharacter>(outHit.GetActor())) return;
|
||||||
Cast<AAICharacter>(outHit.GetActor())->TakeDamage(WeaponDamage, FPointDamageEvent(), GetWorld()->GetFirstPlayerController(), this);
|
Cast<AAICharacter>(outHit.GetActor())->TakeDamage(WeaponDamage, FPointDamageEvent(), GetWorld()->GetFirstPlayerController(), this);
|
||||||
}
|
}
|
||||||
@ -185,10 +198,10 @@ void ABaseWeaponClass::WeaponScopedFire()
|
|||||||
{
|
{
|
||||||
if (endlessVendettaChar->bIsScoped)
|
if (endlessVendettaChar->bIsScoped)
|
||||||
{
|
{
|
||||||
recoilMagnitude -= 0.2f;
|
recoilMagnitude = scopedRecoilMag;
|
||||||
recoilMaxAngleLeft /= 2.f;
|
recoilMaxAngleLeft = scopedMaxAngleLeft;
|
||||||
recoilMaxAngleRight /= 2.f;
|
recoilMaxAngleRight = scopedMaxAngleRight;
|
||||||
recoilMinMultiplier -= 0.2f;
|
recoilMinMultiplier = scopedMinMultiplier;
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -24,10 +24,10 @@ protected:
|
|||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
void GenerateRecoilVector();
|
|
||||||
|
|
||||||
void ApplyRecoil(float DeltaTime);
|
void ApplyRecoil(float DeltaTime);
|
||||||
|
|
||||||
|
void GenerateRecoilVector();
|
||||||
|
|
||||||
void nullSamples();
|
void nullSamples();
|
||||||
|
|
||||||
//recoil previous curve
|
//recoil previous curve
|
||||||
@ -54,19 +54,38 @@ public:
|
|||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
float FireRate;
|
float FireRate;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
int MagazineSize;
|
int MagazineSize;
|
||||||
|
|
||||||
|
//how many bullets until the recoil stops going up
|
||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
|
int howMnyShotsTillRclStop;
|
||||||
|
|
||||||
|
UPROPERTY(BlueprintReadWrite)
|
||||||
|
int currentAmmoCount;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
UTexture2D* WeaponImage;
|
UTexture2D* WeaponImage;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category = "ScopedFire")
|
||||||
|
float scopedRecoilMag;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category = "ScopedFire")
|
||||||
|
float scopedMaxAngleLeft;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category = "ScopedFire")
|
||||||
|
float scopedMaxAngleRight;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, Category = "ScopedFire")
|
||||||
|
float scopedMinMultiplier;
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Weapons")
|
UFUNCTION(BlueprintCallable, Category = "Weapons")
|
||||||
virtual void Fire();
|
virtual void Fire();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "Weapons")
|
UFUNCTION(BlueprintCallable, Category = "Weapons")
|
||||||
void ClickDetectionTimer();
|
virtual void ClickDetectionTimer();
|
||||||
|
|
||||||
void CancelFire();
|
virtual void CancelFire();
|
||||||
|
|
||||||
UPROPERTY(VisibleAnywhere)
|
UPROPERTY(VisibleAnywhere)
|
||||||
ACharacter* playerInWorld;
|
ACharacter* playerInWorld;
|
||||||
@ -116,6 +135,8 @@ public:
|
|||||||
FHitResult outHit;
|
FHitResult outHit;
|
||||||
FVector traceStart;
|
FVector traceStart;
|
||||||
FVector traceEnd;
|
FVector traceEnd;
|
||||||
|
FVector newTraceEnd;
|
||||||
|
FCollisionQueryParams collisionParams;
|
||||||
|
|
||||||
//UFUNCTION(BlueprintCallable, Category = "Weapons")
|
//UFUNCTION(BlueprintCallable, Category = "Weapons")
|
||||||
//void RecoilVerticalLimit(FHitResult Outhit);
|
//void RecoilVerticalLimit(FHitResult Outhit);
|
||||||
@ -123,9 +144,12 @@ public:
|
|||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
int bulletCountShoot; //Gets how many bullets shot per
|
int bulletCountShoot; //Gets how many bullets shot per
|
||||||
|
|
||||||
private:
|
|
||||||
|
|
||||||
|
protected:
|
||||||
UArrowComponent* GunStartArrow;
|
UArrowComponent* GunStartArrow;
|
||||||
|
bool bStopShooting = false;
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
float BulletDistance;
|
float BulletDistance;
|
||||||
@ -135,6 +159,6 @@ private:
|
|||||||
float originalMaxAngleRight;
|
float originalMaxAngleRight;
|
||||||
float originalMinMultiplier;
|
float originalMinMultiplier;
|
||||||
|
|
||||||
int currentAmmoCount;
|
float currentPitch;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -30,3 +30,19 @@ void APistolClass::Fire()
|
|||||||
UE_LOG(LogTemp, Display, TEXT("Testing overrides: Pistol has been fired"));
|
UE_LOG(LogTemp, Display, TEXT("Testing overrides: Pistol has been fired"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void APistolClass::ClickDetectionTimer()
|
||||||
|
{
|
||||||
|
Super::ClickDetectionTimer();
|
||||||
|
}
|
||||||
|
|
||||||
|
void APistolClass::CancelFire()
|
||||||
|
{
|
||||||
|
if (bulletCountShoot <= 0) return;
|
||||||
|
UE_LOG(LogTemp, Display, TEXT("FireCancelled"));
|
||||||
|
bulletCountShoot = 0;
|
||||||
|
GunStartArrow->SetRelativeRotation(FRotator(0));
|
||||||
|
//playerInWorld->GetController()->SetControlRotation(FRotator(0, playerInWorld->GetActorRotation().Yaw, playerInWorld->GetActorRotation().Roll));
|
||||||
|
bStopShooting = true;
|
||||||
|
nullSamples();
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -24,4 +24,6 @@ public:
|
|||||||
virtual void Tick(float DeltaTime) override;
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
|
||||||
virtual void Fire() override;
|
virtual void Fire() override;
|
||||||
|
virtual void ClickDetectionTimer() override;
|
||||||
|
virtual void CancelFire() override;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user