| 157 | } |
| 158 | |
| 159 | void AWeapon::OnRep_Owner() |
| 160 | { |
| 161 | Super::OnRep_Owner(); |
| 162 | if (Owner == nullptr) |
| 163 | { |
| 164 | BlasterOwnerCharacter = nullptr; |
| 165 | BlasterOwnerController = nullptr; |
| 166 | } |
| 167 | else |
| 168 | { |
| 169 | BlasterOwnerCharacter = BlasterOwnerCharacter == nullptr ? Cast<ABlasterCharacter>(Owner) : BlasterOwnerCharacter; |
| 170 | if (BlasterOwnerCharacter && BlasterOwnerCharacter->GetEquippedWeapon() && BlasterOwnerCharacter->GetEquippedWeapon() == this) |
| 171 | { |
| 172 | SetHUDAmmo(); |
| 173 | } |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | void AWeapon::SetWeaponState(EWeaponState State) |
| 178 | { |
nothing calls this directly
no test coverage detected