Skip to content

Commit

Permalink
Fixes a bug where EngineerCaptureLevel was not considered when checki…
Browse files Browse the repository at this point in the history
…ng the target building.
  • Loading branch information
CCHyper committed Dec 29, 2022
1 parent 64ad8c7 commit bdf9994
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/extensions/infantry/infantryext_hooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,21 @@ static int Get_Engineer_Damage(TechnoClass *tech)
}


/**
/**
* Is the target buildings health low enough to be captured?
*
* @author: CCHyper
*/
static bool Health_Low_Enough_To_Capture(TechnoClass *tech)
{
return tech->Health_Ratio() <= Rule->ConditionRed;
/**
* #issue-633
*
* Changed to use Rule->EngineerCaptureLevel.
*
* @author: CCHyper
*/
return tech->Health_Ratio() <= Rule->EngineerCaptureLevel;
}


Expand Down

0 comments on commit bdf9994

Please sign in to comment.