Fixed can_recruit function.

It made no sense to be doing an or between those test. If the test for
available recruits worked, then any unit would be considered a
leader. As far as I can tell, this part of the test was always
returning false in the places that used can_recruit.  The only reason
you might add this test is to suppress the recruit option when right
clicking on a hex. And in that case the test would be anded with the
canrecruit check rather than ored. However, we don't do that for
recall when there are no units to recall. And the test should only be
done there, not for example when checking to see if all leaders on a
team have been eliminated.
This commit is contained in:
Bruno Wolff III 2006-06-11 01:32:58 +00:00
parent f3b992b3aa
commit 1a8959da93

View file

@ -530,7 +530,7 @@ fixed_t unit::alpha() const
bool unit::can_recruit() const
{
return !recruits_.empty() || utils::string_bool(cfg_["canrecruit"]);
return utils::string_bool(cfg_["canrecruit"]);
}
bool unit::incapacitated() const
{