void AShooterWeapon_Instant::ProcessInstantHit_Confirmed(const FHitResult& Impact, const FVector& Origin, const FVector& ShootDir, int32 RandomSeed, float ReticleSpread) { // handle damage if (ShouldDealDamage(Impact.GetActor())) { DealDamage(Impact, ShootDir); } // play FX on remote clients if (Role == ROLE_Authority) { HitNotify.Origin = Origin; HitNotify.RandomSeed = RandomSeed; HitNotify.ReticleSpread = ReticleSpread; } // play FX locally if (GetNetMode() != NM_DedicatedServer) { const FVector EndTrace = Origin + ShootDir * InstantConfig.WeaponRange; const FVector EndPoint = Impact.GetActor() ? Impact.ImpactPoint : EndTrace; SpawnTrailEffect(EndPoint); SpawnImpactEffects(Impact); } }
void ASWeaponInstant::ProcessInstantHitConfirmed(const FHitResult& Impact, const FVector& Origin, const FVector& ShootDir) { // Handle damage if (ShouldDealDamage(Impact.GetActor())) { DealDamage(Impact, ShootDir); } // Play FX on remote clients if (Role == ROLE_Authority) { HitImpactNotify = Impact.ImpactPoint; } // Play FX locally if (GetNetMode() != NM_DedicatedServer) { SimulateInstantHit(Impact.ImpactPoint); } }