WeaponBase #8

Open
Kukukakhew wants to merge 4 commits from WeaponBase into main
2 changed files with 8 additions and 4 deletions
Showing only changes of commit 7a2a24b654 - Show all commits

View File

@@ -67,17 +67,21 @@ void ADDICharacter::Server_SpawnProjectile_Implementation()
FVector Location = GetActorLocation(); FVector Location = GetActorLocation();
FRotator Rotation = GetActorRotation(); FRotator Rotation = GetActorRotation();
FVector Dir = GetActorForwardVector(); FVector Dir = GetActorForwardVector();
// GetActorEyesViewPoint(Location, Rotation);
Location += Dir * 200.f; Location += Dir * 55.f;
if (!ProjectileClass) if (!ProjectileClass)
{ {
GEngine->AddOnScreenDebugMessage(1, 10.f, FColor::Emerald, "No Projectile Set"); GEngine->AddOnScreenDebugMessage(1, 10.f, FColor::Emerald, "No Projectile Set");
return; return;
} }
GetWorld()->SpawnActor<AActor>(ProjectileClass, Location, Rotation);
FActorSpawnParameters SpawnInfo;
SpawnInfo.Owner = this;
SpawnInfo.Instigator = GetInstigator();
GetWorld()->SpawnActor<AActor>(ProjectileClass, Location, Rotation, SpawnInfo);
} }
void ADDICharacter::Client_CharacterHit_Implementation() void ADDICharacter::Client_CharacterHit_Implementation()