Fixed Player BP Issues
This commit is contained in:
parent
0b12f2e0df
commit
3633e1fe24
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/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/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/AITest/0/30/II3E4UW0LD8MICL6FWYKWT.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/AITest/0/30/II3E4UW0LD8MICL6FWYKWT.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/AITest/3/YQ/PXB4WSHORDZW4LPFJWMR2F.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/AITest/3/YQ/PXB4WSHORDZW4LPFJWMR2F.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/AITest/4/LG/NYVOKCFE6YHCG70FME5BSE.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/AITest/4/LG/NYVOKCFE6YHCG70FME5BSE.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -173,12 +173,18 @@ void ABaseWeaponClass::CancelFire()
|
|||||||
|
|
||||||
void ABaseWeaponClass::Fire()
|
void ABaseWeaponClass::Fire()
|
||||||
{
|
{
|
||||||
if (currentAmmoCount > 0)
|
if (currentAmmoCount <= 0)
|
||||||
{
|
{
|
||||||
//do damage fallof based off distance
|
UE_LOG(LogTemp, Display, TEXT("No ammo, Ammo count: %d"), currentAmmoCount);
|
||||||
traceStart = Cast<USkeletalMeshComponent>(GetComponentByClass(USkeletalMeshComponent::StaticClass()))->GetSocketLocation("Muzzle");
|
ShowNeedReloadUI();
|
||||||
traceEnd = traceStart + Cast<AEndlessVendettaCharacter>(GetWorld()->GetFirstPlayerController()->GetPawn())->GetFirstPersonCameraComponent()->GetForwardVector() * BulletDistance;
|
return;
|
||||||
|
}
|
||||||
if (GetWorldTimerManager().IsTimerActive(timerHandle)) return;
|
if (GetWorldTimerManager().IsTimerActive(timerHandle)) return;
|
||||||
|
|
||||||
|
//do damage fallof based off distance
|
||||||
|
UCameraComponent* CamComp = Cast<AEndlessVendettaCharacter>(GetWorld()->GetFirstPlayerController()->GetPawn())->GetFirstPersonCameraComponent();
|
||||||
|
traceStart = Cast<USkeletalMeshComponent>(GetComponentByClass(USkeletalMeshComponent::StaticClass()))->GetSocketLocation("Muzzle");
|
||||||
|
traceEnd = CamComp->GetComponentLocation() + CamComp->GetForwardVector() * BulletDistance;
|
||||||
FCollisionObjectQueryParams ObjectQueryParams;
|
FCollisionObjectQueryParams ObjectQueryParams;
|
||||||
ObjectQueryParams.AddObjectTypesToQuery(ECC_Pawn);
|
ObjectQueryParams.AddObjectTypesToQuery(ECC_Pawn);
|
||||||
ObjectQueryParams.AddObjectTypesToQuery(ECC_WorldStatic);
|
ObjectQueryParams.AddObjectTypesToQuery(ECC_WorldStatic);
|
||||||
@ -221,12 +227,7 @@ void ABaseWeaponClass::Fire()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
HideNeedReloadUI();
|
HideNeedReloadUI();
|
||||||
}
|
|
||||||
else if (currentAmmoCount <= 0)
|
|
||||||
{
|
|
||||||
UE_LOG(LogTemp, Display, TEXT("No ammo, Ammo count: %d"), currentAmmoCount);
|
|
||||||
ShowNeedReloadUI();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ABaseWeaponClass::WeaponScopedFire()
|
void ABaseWeaponClass::WeaponScopedFire()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user