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 (IsValid(PrimaryWeapon))
|
||||
{
|
||||
TempUnequippedPrimary();
|
||||
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Red, TEXT("IsPrimaryWeapon valid check running"));
|
||||
PrimaryWeapon->DetachFromActor(DetatchRules);
|
||||
PrimaryWeapon->AttachToComponent(FirstPersonArms, AttachmentRules, FName("UnEquipGunSocket"));
|
||||
@ -439,7 +440,7 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
||||
}
|
||||
//For when you already have all your weapons and ur switching with 1 and 2 or when your picking up a weapon with a weapon in hand
|
||||
if (PrimaryWeaponClass != nullptr)
|
||||
{
|
||||
{
|
||||
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Green, TEXT("non ifstatement code running"));
|
||||
PrimaryWeaponActor->AttachToComponent(FirstPersonArms, AttachmentRules, FName("GripPoint"));
|
||||
PrimaryWeapon = Cast<ABaseWeaponClass>(PrimaryWeaponActor);
|
||||
@ -449,6 +450,7 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
||||
bIsCurrentlyHoldingWeapon = true;
|
||||
bHasRifle = true;
|
||||
SetOverlayState(EOverlayState::AssaultRifle);
|
||||
TempEquippedPrimary();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,11 @@ UCLASS(config=Game)
|
||||
class AEndlessVendettaCharacter : public ACharacter
|
||||
{
|
||||
GENERATED_BODY()
|
||||
public:
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void TempEquippedPrimary();
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void TempUnequippedPrimary();
|
||||
|
||||
protected:
|
||||
/** Pawn mesh: 1st person view (arms; seen only by self) */
|
||||
@ -311,7 +316,9 @@ public:
|
||||
|
||||
void WeaponPickUpSystem();
|
||||
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void EquipPrimary();
|
||||
UFUNCTION(BlueprintCallable)
|
||||
void EquipSecondary();
|
||||
|
||||
void WeaponSwitcher(AActor* Outhit);
|
||||
|
@ -47,7 +47,7 @@ void ABaseWeaponClass::BeginPlay()
|
||||
|
||||
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);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user