[Freeciv-Dev] Penalty when changing technology research when minus (PR#4
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi
in 1.11.0 when i change technology research when negativ under penalty:
Literacy: -200/1000
change to something else:
-100/1000 when penalty is on 50%
i think that this is a bug in plrhand.c
if (!plr->got_tech && plr->research.changed_from == -1) {
plr->research.before_researched = plr->research.researched;
plr->research.changed_from = plr->research.researching;
/* subtract a penalty because we changed subject */
plr->research.researched -= ((plr->research.researched *
game.techpenalty) / 100);
} else if (tech == plr->research.changed_from) {
plr->research.researched = plr->research.before_researched;
plr->research.changed_from = -1;
}
if plr->research.researched is < 0 plr->research.researched is
multiplied by game.techpenalty too.
should be something like:
if plr->research.researched > 0
{plr->research.researched -= ((plr->research.researched *
game.techpenalty) / 100);}
syntax is not right ...
Thomas
--
Es geht nichts verloren, ausser der Faehigkeit es wiederzufinden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Penalty when changing technology research when minus (PR#455),
Thomas Strub <=
|
|