Fixed player crashing if no starter weapons
This commit is contained in:
parent
f0692b04f0
commit
247ab29a61
@ -313,6 +313,7 @@ void AEndlessVendettaCharacter::ToggleCombat()
|
||||
//When 1 is pressed it calls EquipPrimary
|
||||
void AEndlessVendettaCharacter::EquipPrimary()
|
||||
{
|
||||
if (!IsValid(PrimaryWeaponClass)) return;
|
||||
FActorSpawnParameters spawnParams;
|
||||
spawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||
FAttachmentTransformRules AttachmentRules(EAttachmentRule::SnapToTarget, true);
|
||||
@ -364,6 +365,7 @@ void AEndlessVendettaCharacter::EquipPrimary()
|
||||
|
||||
void AEndlessVendettaCharacter::EquipSecondary()
|
||||
{
|
||||
if (!IsValid(SecondaryWeaponClass)) return;
|
||||
FActorSpawnParameters spawnParams;
|
||||
spawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||
FAttachmentTransformRules AttachmentRules(EAttachmentRule::SnapToTarget, true);
|
||||
|
Loading…
Reference in New Issue
Block a user