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

Method OnRep_Owner

Source/Blaster/Weapon/Weapon.cpp:159–175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157}
158
159void 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
177void AWeapon::SetWeaponState(EWeaponState State)
178{

Callers

nothing calls this directly

Calls 1

GetEquippedWeaponMethod · 0.80

Tested by

no test coverage detected