Follow-up Comment #7, patch #1501 (project freeciv):

> punit->hp -= ceil((double) punit->hp * game.server.killunhomed / 100);

If integer arithmetic is used, that would be the result of the following
line?

punit->hp -= MAX(punit->hp * game.server.killunhomed / 100, 1);

This should give a loss of 1 hit point or (due to integer arithmethic)
ceil(hp * killunhomed / 100) hit points.

    _______________________________________________________

Reply to this item at:

  <http://gna.org/patch/?1501>

_______________________________________________
  Nachricht geschickt von/durch Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to