| 207 | } |
| 208 | |
| 209 | void AWeapon::OnEquipped() |
| 210 | { |
| 211 | ShowPickupWidget(false); |
| 212 | AreaSphere->SetCollisionEnabled(ECollisionEnabled::NoCollision); |
| 213 | WeaponMesh->SetSimulatePhysics(false); |
| 214 | WeaponMesh->SetEnableGravity(false); |
| 215 | WeaponMesh->SetCollisionEnabled(ECollisionEnabled::NoCollision); |
| 216 | if (WeaponType == EWeaponType::EWT_SubmachineGun) |
| 217 | { |
| 218 | WeaponMesh->SetCollisionEnabled(ECollisionEnabled::QueryAndPhysics); |
| 219 | WeaponMesh->SetEnableGravity(true); |
| 220 | WeaponMesh->SetCollisionResponseToAllChannels(ECollisionResponse::ECR_Ignore); |
| 221 | } |
| 222 | EnableCustomDepth(false); |
| 223 | |
| 224 | BlasterOwnerCharacter = BlasterOwnerCharacter == nullptr ? Cast<ABlasterCharacter>(GetOwner()) : BlasterOwnerCharacter; |
| 225 | if (BlasterOwnerCharacter && bUseServerSideRewind) |
| 226 | { |
| 227 | BlasterOwnerController = BlasterOwnerController == nullptr ? Cast<ABlasterPlayerController>(BlasterOwnerCharacter->Controller) : BlasterOwnerController; |
| 228 | if (BlasterOwnerController && HasAuthority() && !BlasterOwnerController->HighPingDelegate.IsBound()) |
| 229 | { |
| 230 | BlasterOwnerController->HighPingDelegate.AddDynamic(this, &AWeapon::OnPingTooHigh); |
| 231 | } |
| 232 | } |
| 233 | } |
| 234 | |
| 235 | void AWeapon::OnDropped() |
| 236 | { |
nothing calls this directly
no outgoing calls
no test coverage detected