1
0
forked from 0ad/0ad

Fix missing spaces and non compliant code with regards to the coding conventions.

Add a missing semi-colon

For future reference on documenting records using JSDoc see the
differential.

Reviewed by: @elexis
Differential Revision: https://code.wildfiregames.com/D1848
This was SVN commit r22229.
This commit is contained in:
Stan 2019-04-25 20:05:53 +00:00
parent 9f5494cb87
commit 6f31daed81

View File

@ -171,8 +171,8 @@ Health.prototype.Kill = function()
};
/**
* Reduces entity's health by amount HP. Kill if required.
* @return {{ "killed": boolean, "change": Number }} the status change of the entity.
* @param {number} amount - The amount of hitpoints to substract. Kills the entity if required.
* @return {{killed:boolean, change:number}} - Number of health points lost and whether the entity was killed.
*/
Health.prototype.Reduce = function(amount)
{
@ -208,7 +208,7 @@ Health.prototype.Reduce = function(amount)
this.hitpoints -= amount;
this.RegisterHealthChanged(oldHitpoints);
return {"killed": false, "change": (this.hitpoints - oldHitpoints)};
return { "killed": false, "change": this.hitpoints - oldHitpoints };
};
/**
@ -247,7 +247,7 @@ Health.prototype.HandleDeath = function()
}
Engine.DestroyEntity(this.entity);
}
};
Health.prototype.Increase = function(amount)
{