Hey! I have almost fully understood C++ in unreal now. The only thing that I am still struggling with are bool functions. Can someone tell me what I am returning with this function (and just generally what it does)?
bool AShooterWeapon::CanReload() const
{
bool bCanReload = (!MyPawn || MyPawn->CanReload());
bool bGotAmmo = ( CurrentAmmoInClip < WeaponConfig.AmmoPerClip) && (CurrentAmmo - CurrentAmmoInClip > 0 || HasInfiniteClip());
bool bStateOKToReload = ( ( CurrentState == EWeaponState::Idle ) || ( CurrentState == EWeaponState::Firing) );
return ( ( bCanReload == true ) && ( bGotAmmo == true ) && ( bStateOKToReload == true) );
}
I am not asking anyone to correct code or anything like that, just trying to learn something new. Thank you in advance!