Merge branch 'Animation' into Polishing-Checkpoints
This commit is contained in:
commit
0fedf8af84
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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
EndlessVendetta/Content/Levels/TempLevels/NewTutorialMap.umap
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Levels/TempLevels/NewTutorialMap.umap
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/MovementTest/D/OU/O2HH4HR7YM08QPG8R3YF3R.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/__ExternalActors__/Levels/MovementTest/D/OU/O2HH4HR7YM08QPG8R3YF3R.uasset
(Stored with Git LFS)
Binary file not shown.
@ -483,10 +483,10 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
|||||||
if (bIsReloading) return;
|
if (bIsReloading) return;
|
||||||
if (IsValid(PrimaryWeapon))
|
if (IsValid(PrimaryWeapon))
|
||||||
{
|
{
|
||||||
TempUnequippedPrimary();
|
//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"));
|
||||||
PrimaryWeapon->SetActorHiddenInGame(true);
|
PrimaryWeapon->SetActorHiddenInGame(true);
|
||||||
PrimaryWeapon->SetActorEnableCollision(false);
|
PrimaryWeapon->SetActorEnableCollision(false);
|
||||||
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
|
this->GetFirstPersonCameraComponent()->SetFieldOfView(90);
|
||||||
@ -516,9 +516,11 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
|||||||
|
|
||||||
if (!bIsPrimaryWeaponCreated)
|
if (!bIsPrimaryWeaponCreated)
|
||||||
{
|
{
|
||||||
PrimaryWeaponActor = GetWorld()->SpawnActor<AActor>(PrimaryWeaponClass, spawnParams);
|
//PrimaryWeaponActor = GetWorld()->SpawnActor<AActor>(PrimaryWeaponClass, spawnParams);
|
||||||
|
HeldWeapon->SetChildActorClass(PrimaryWeaponClass);
|
||||||
|
PrimaryWeaponActor = HeldWeapon->GetChildActor();
|
||||||
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Red, TEXT("Spawning weapon"));
|
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Red, TEXT("Spawning weapon"));
|
||||||
PrimaryWeaponActor->AttachToComponent(FirstPersonArms, AttachmentRules, FName("GripPoint"));
|
//PrimaryWeaponActor->AttachToComponent(FirstPersonArms, AttachmentRules, FName("GripPoint"));
|
||||||
PrimaryWeapon = Cast<ABaseWeaponClass>(PrimaryWeaponActor);
|
PrimaryWeapon = Cast<ABaseWeaponClass>(PrimaryWeaponActor);
|
||||||
PrimaryWeapon->SetActorHiddenInGame(false);
|
PrimaryWeapon->SetActorHiddenInGame(false);
|
||||||
PrimaryWeapon->SetActorEnableCollision(false);
|
PrimaryWeapon->SetActorEnableCollision(false);
|
||||||
@ -531,15 +533,17 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
|||||||
if (PrimaryWeaponClass != nullptr)
|
if (PrimaryWeaponClass != nullptr)
|
||||||
{
|
{
|
||||||
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Green, TEXT("non ifstatement code running"));
|
GEngine->AddOnScreenDebugMessage(-1, 15.f, FColor::Green, TEXT("non ifstatement code running"));
|
||||||
PrimaryWeaponActor->AttachToComponent(FirstPersonArms, AttachmentRules, FName("GripPoint"));
|
//PrimaryWeaponActor->AttachToComponent(FirstPersonArms, AttachmentRules, FName("GripPoint"));
|
||||||
|
HeldWeapon->SetChildActorClass(PrimaryWeaponClass);
|
||||||
|
PrimaryWeaponActor = HeldWeapon->GetChildActor();
|
||||||
PrimaryWeapon = Cast<ABaseWeaponClass>(PrimaryWeaponActor);
|
PrimaryWeapon = Cast<ABaseWeaponClass>(PrimaryWeaponActor);
|
||||||
PrimaryWeapon->SetActorHiddenInGame(false);
|
PrimaryWeapon->SetActorHiddenInGame(false);
|
||||||
PrimaryWeapon->SetActorEnableCollision(false);
|
PrimaryWeapon->SetActorEnableCollision(false);
|
||||||
GetWorldTimerManager().ClearTimer(PrimaryWeapon->reloadTimerHandle);
|
//GetWorldTimerManager().ClearTimer(PrimaryWeapon->reloadTimerHandle);
|
||||||
bIsCurrentlyHoldingWeapon = true;
|
bIsCurrentlyHoldingWeapon = true;
|
||||||
bHasRifle = true;
|
bHasRifle = true;
|
||||||
SetOverlayState(EOverlayState::AssaultRifle);
|
SetOverlayState(EOverlayState::AssaultRifle);
|
||||||
TempEquippedPrimary();
|
//TempEquippedPrimary();
|
||||||
EquippedWeapon.Broadcast();
|
EquippedWeapon.Broadcast();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -594,6 +598,8 @@ void AEndlessVendettaCharacter::EquipSecondary()
|
|||||||
}
|
}
|
||||||
if (SecondaryWeaponClass != nullptr)
|
if (SecondaryWeaponClass != nullptr)
|
||||||
{
|
{
|
||||||
|
HeldWeapon->SetChildActorClass(SecondaryWeaponClass);
|
||||||
|
SecondaryWeaponActor = HeldWeapon->GetChildActor();
|
||||||
SecondaryWeapon = Cast<ABaseWeaponClass>(SecondaryWeaponActor);
|
SecondaryWeapon = Cast<ABaseWeaponClass>(SecondaryWeaponActor);
|
||||||
SecondaryWeapon->SetActorHiddenInGame(false);
|
SecondaryWeapon->SetActorHiddenInGame(false);
|
||||||
bIsCurrentlyHoldingWeapon = true;
|
bIsCurrentlyHoldingWeapon = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user