mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-07-04 05:55:47 -07:00
Round max hp of units in simulation. Refs #3855
This was SVN commit r17951.
This commit is contained in:
parent
e8decfbd2b
commit
6f0d0ff8f4
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ Health.prototype.Schema =
|
|||
Health.prototype.Init = function()
|
||||
{
|
||||
// Cache this value so it allows techs to maintain previous health level
|
||||
this.maxHitpoints = +this.template.Max;
|
||||
this.maxHitpoints = Math.round(+this.template.Max);
|
||||
// Default to <Initial>, but use <Max> if it's undefined or zero
|
||||
// (Allowing 0 initial HP would break our death detection code)
|
||||
this.hitpoints = +(this.template.Initial || this.GetMaxHitpoints());
|
||||
|
|
|
|||
Loading…
Reference in a new issue