MCPcopy Create free account
hub / github.com/DruidMech/MultiplayerCourseBlasterGame / OnSphereEndOverlap

Method OnSphereEndOverlap

Source/Blaster/Weapon/Weapon.cpp:93–102  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

91}
92
93void AWeapon::OnSphereEndOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
94{
95 ABlasterCharacter* BlasterCharacter = Cast<ABlasterCharacter>(OtherActor);
96 if (BlasterCharacter)
97 {
98 if (WeaponType == EWeaponType::EWT_Flag && BlasterCharacter->GetTeam() == Team) return;
99 if (BlasterCharacter->IsHoldingTheFlag()) return;
100 BlasterCharacter->SetOverlappingWeapon(nullptr);
101 }
102}
103
104void AWeapon::SetHUDAmmo()
105{

Callers

nothing calls this directly

Calls 3

IsHoldingTheFlagMethod · 0.80
SetOverlappingWeaponMethod · 0.80
GetTeamMethod · 0.45

Tested by

no test coverage detected