bool LLAgentAccess::canSetMaturity(S32 maturity)
{
	if (isGodlike()) // Gods can always set their Maturity level
		return true;
	if (isAdult()) // Adults can always set their Maturity level
		return true;
	if (maturity == SIM_ACCESS_PG || (maturity == SIM_ACCESS_MATURE && isMature()))
		return true;
	else
		return false;
}
Exemplo n.º 2
0
void checkDasha()
{
    Person dasha = {15, 160, 50, "Dasha", "Student"};    
    cout << sizeof(dasha) << endl;
    cout << dasha.name << " is ";
    if (!isAdult(dasha))
    {
        cout << "not ";
    }
    cout << "an adult\n";
}
bool LLAgentAccess::canAccessAdult() const
{
	// if you prefer adult, you must BE adult.
	return isGodlike() || (prefersAdult() && isAdult());
}