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

Method OnDropped

Source/Blaster/Weapon/Weapon.cpp:235–261  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void AWeapon::OnDropped()
236{
237 if (HasAuthority())
238 {
239 AreaSphere->SetCollisionEnabled(ECollisionEnabled::QueryOnly);
240 }
241 WeaponMesh->SetSimulatePhysics(true);
242 WeaponMesh->SetEnableGravity(true);
243 WeaponMesh->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics);
244 WeaponMesh->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Block);
245 WeaponMesh->SetCollisionResponseToChannel(ECollisionChannel::ECC_Pawn, ECollisionResponse::ECR_Ignore);
246 WeaponMesh->SetCollisionResponseToChannel(ECollisionChannel::ECC_Camera, ECollisionResponse::ECR_Ignore);
247
248 WeaponMesh->SetCustomDepthStencilValue(CUSTOM_DEPTH_BLUE);
249 WeaponMesh->MarkRenderStateDirty();
250 EnableCustomDepth(true);
251
252 BlasterOwnerCharacter = BlasterOwnerCharacter == nullptr ? Cast<ABlasterCharacter>(GetOwner()) : BlasterOwnerCharacter;
253 if (BlasterOwnerCharacter)
254 {
255 BlasterOwnerController = BlasterOwnerController == nullptr ? Cast<ABlasterPlayerController>(BlasterOwnerCharacter->Controller) : BlasterOwnerController;
256 if (BlasterOwnerController && HasAuthority() && BlasterOwnerController->HighPingDelegate.IsBound())
257 {
258 BlasterOwnerController->HighPingDelegate.RemoveDynamic(this, &AWeapon::OnPingTooHigh);
259 }
260 }
261}
262
263void AWeapon::OnEquippedSecondary()
264{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected