| 233 | } |
| 234 | |
| 235 | void 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 | |
| 263 | void AWeapon::OnEquippedSecondary() |
| 264 | { |
nothing calls this directly
no outgoing calls
no test coverage detected