Bugfix Primary Rifles Appear off screen
This commit is contained in:
parent
3633e1fe24
commit
530c9580ff
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/BP_MainCharacter.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BP_MainCharacter.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.
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/FP/C223QQ2RGQBAGPV9BEDZ77.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/AITest/0/FP/C223QQ2RGQBAGPV9BEDZ77.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -397,6 +397,7 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
|||||||
if (bIsReloading) return;
|
if (bIsReloading) return;
|
||||||
if (IsValid(PrimaryWeapon))
|
if (IsValid(PrimaryWeapon))
|
||||||
{
|
{
|
||||||
|
TempUnequippedPrimary();
|
||||||
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Red, TEXT("IsPrimaryWeapon valid check running"));
|
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Red, TEXT("IsPrimaryWeapon valid check running"));
|
||||||
PrimaryWeapon->DetachFromActor(DetatchRules);
|
PrimaryWeapon->DetachFromActor(DetatchRules);
|
||||||
PrimaryWeapon->AttachToComponent(FirstPersonArms, AttachmentRules, FName("UnEquipGunSocket"));
|
PrimaryWeapon->AttachToComponent(FirstPersonArms, AttachmentRules, FName("UnEquipGunSocket"));
|
||||||
@ -449,6 +450,7 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
|||||||
bIsCurrentlyHoldingWeapon = true;
|
bIsCurrentlyHoldingWeapon = true;
|
||||||
bHasRifle = true;
|
bHasRifle = true;
|
||||||
SetOverlayState(EOverlayState::AssaultRifle);
|
SetOverlayState(EOverlayState::AssaultRifle);
|
||||||
|
TempEquippedPrimary();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -35,6 +35,11 @@ UCLASS(config=Game)
|
|||||||
class AEndlessVendettaCharacter : public ACharacter
|
class AEndlessVendettaCharacter : public ACharacter
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
public:
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void TempEquippedPrimary();
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void TempUnequippedPrimary();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/** Pawn mesh: 1st person view (arms; seen only by self) */
|
/** Pawn mesh: 1st person view (arms; seen only by self) */
|
||||||
@ -311,7 +316,9 @@ public:
|
|||||||
|
|
||||||
void WeaponPickUpSystem();
|
void WeaponPickUpSystem();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
void EquipPrimary();
|
void EquipPrimary();
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
void EquipSecondary();
|
void EquipSecondary();
|
||||||
|
|
||||||
void WeaponSwitcher(AActor* Outhit);
|
void WeaponSwitcher(AActor* Outhit);
|
||||||
|
@ -47,7 +47,7 @@ void ABaseWeaponClass::BeginPlay()
|
|||||||
|
|
||||||
if (!IsValid(endlessVendettaChar)) return;
|
if (!IsValid(endlessVendettaChar)) return;
|
||||||
|
|
||||||
for (UActorComponent* actorComp : endlessVendettaChar->GetComponentsByTag(UArrowComponent::StaticClass(), FName("GunStart")))
|
for (UActorComponent* actorComp : playerInWorld->GetComponentsByTag(UArrowComponent::StaticClass(), FName("GunStart")))
|
||||||
{
|
{
|
||||||
GunStartArrow = Cast<UArrowComponent>(actorComp);
|
GunStartArrow = Cast<UArrowComponent>(actorComp);
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user