you could acheive the same thing by simply using "if (_kneelReserved && bu->getType() == "SOLDIER")"