This commit is contained in:
speedvoltage 2025-03-29 21:43:58 +01:00 committed by GitHub
commit 3b64185b1c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1791,11 +1791,14 @@ void CWeaponRPG::CreateLaserPointer( void )
return;
CBaseCombatCharacter *pOwner = GetOwner();
if ( pOwner == NULL )
if ( !pOwner )
return;
if ( pOwner->GetAmmoCount(m_iPrimaryAmmoType) <= 0 )
// Third rocket guidance fix
CMissile *pMissile = dynamic_cast< CMissile * >( m_hMissile.Get() );
// Let me still be guided if I am the owner's child
if ( !pMissile && pOwner->GetAmmoCount( m_iPrimaryAmmoType ) <= 0 )
return;
m_hLaserDot = CLaserDot::Create( GetAbsOrigin(), GetOwner() );