UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Submit Patch #5640 Improve happiness calculation from missions
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "RESOLVED".
Issue basics
  • Type of issue
    Submit Patch
  • Category
    Campaign
  • Targetted for
    Not determined
  • Status
    Closed
  • Progress
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Resolution
    RESOLVED
Attachments (1)
Duplicate issues (0)
This issue does not have any duplicates
Description
If there are no civilians in a mission (most the planet where an ufo can be downed), there is no change in the happiness for any country.

I guess there was a possible division by zero if civilianSum was zero, but the result was no change on happiness even if you got a good performance killing aliens.

The performance was calculated as follows:
For civilians = 0 -> performance = 0
For civilians > 0 -> performance = performanceCivilian + performanceAlien

This patch changes this as follows:
For civilians = 0 -> performanceCivilian = 0
For any amount -> performance = performanceCivilian + performanceAlien
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif