void AShooterPickup::OnRep_IsActive() { if (bIsActive) { OnRespawned(); } else { OnPickedUp(); } }
void AShooterPickup::RespawnPickup() { bIsActive = true; PickedUpBy = NULL; OnRespawned(); TArray<AActor*> OverlappingPawns; GetOverlappingActors(OverlappingPawns, AShooterCharacter::StaticClass()); for (int32 i = 0; i < OverlappingPawns.Num(); i++) { PickupOnTouch(Cast<AShooterCharacter>(OverlappingPawns[i])); } }
void AAPickupActor::RespawnPickup() { bIsActive = true; OnRespawned(); }