UFO: Alien Invasion Issue Tracker
star_faded.png
Please log in to bookmark issues
enhancement_small.png
CLOSED  Submit Patch #5555  -  Strength gain too low
Posted Nov 08, 2015 - updated Nov 28, 2015
icon_info.png This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue details
  • Type of issue
    Submit Patch
  • Status
     
    Closed
  • Assigned to
    Not assigned to anyone
  • Progress
       
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
  • Posted by
     anonymissimus
  • Owned by
    Not owned by anyone
  • Category
    Not determined
  • Resolution
    RESOLVED
  • Priority
    Not determined
  • Targetted for
    icon_milestones.png Not determined
Issue description
Commit f703529262a20e92adf9d6b636ae7197362c70b1 contained a mistake; the value returned by GET_ENCUMBRANCE_PENALTY in g_match.cpp:51 was always 1. As a result, new recruits no longer got 2 strength points in their first mission when carried weight = max weight/2 but only 1 instead.

  1. src/game/g_match.cpp | 4 ++--
  2. 1 file changed, 2 insertions(+), 2 deletions(-)
  3.  
  4. diff --git a/src/game/g_match.cpp b/src/game/g_match.cpp
  5. index 6fdd792..d7e2b1b 100644
  6. --- a/src/game/g_match.cpp
  7. +++ b/src/game/g_match.cpp
  8. @@ -47,9 +47,9 @@ static int G_GetEarnedExperience (abilityskills_t skill, Edict* ent)
  9.  
  10. switch (skill) {
  11. case ABILITY_POWER: {
  12. - const float weight = chr->scoreMission->carriedWeight / WEIGHT_FACTOR / level.actualRound;
  13. + const float weight = chr->scoreMission->carriedWeight / level.actualRound;
  14. const float penalty = GET_ENCUMBRANCE_PENALTY(weight, chr->score.skills[ABILITY_POWER]);
  15. - experience = 50 * (weight / chr->score.skills[ABILITY_POWER]) / penalty;
  16. + experience = 50 * (weight / WEIGHT_FACTOR / chr->score.skills[ABILITY_POWER]) / penalty;
  17. break;
  18. }
  19. case ABILITY_ACCURACY: