| 79 | } |
| 80 | |
| 81 | void AWeapon::OnSphereOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) |
| 82 | { |
| 83 | ABlasterCharacter* BlasterCharacter = Cast<ABlasterCharacter>(OtherActor); |
| 84 | |
| 85 | if (BlasterCharacter) |
| 86 | { |
| 87 | if (WeaponType == EWeaponType::EWT_Flag && BlasterCharacter->GetTeam() == Team) return; |
| 88 | if (BlasterCharacter->IsHoldingTheFlag()) return; |
| 89 | BlasterCharacter->SetOverlappingWeapon(this); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | void AWeapon::OnSphereEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex) |
| 94 | { |
nothing calls this directly
no test coverage detected