Fix a bug with the foundation changes that caused buildings to be built too fast with multiple units.
This was SVN commit r13267.
This commit is contained in:
parent
9b1b8cc8fd
commit
791a901df9
@ -247,7 +247,7 @@ Foundation.prototype.Build = function(builderEnt, work)
|
|||||||
// Add an appropriate proportion of hitpoints
|
// Add an appropriate proportion of hitpoints
|
||||||
var cmpHealth = Engine.QueryInterface(this.entity, IID_Health);
|
var cmpHealth = Engine.QueryInterface(this.entity, IID_Health);
|
||||||
var maxHealth = cmpHealth.GetMaxHitpoints();
|
var maxHealth = cmpHealth.GetMaxHitpoints();
|
||||||
var deltaHP = Math.max(0, Math.min(maxHealth, Math.floor(maxHealth * amount)));
|
var deltaHP = Math.max(0, Math.min(maxHealth, Math.floor(maxHealth * (amount * this.buildMultiplier))));
|
||||||
if (deltaHP > 0)
|
if (deltaHP > 0)
|
||||||
{
|
{
|
||||||
cmpHealth.Increase(deltaHP);
|
cmpHealth.Increase(deltaHP);
|
||||||
|
Loading…
Reference in New Issue
Block a user