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:
parent
f3b992b3aa
commit
1a8959da93
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue