Readd safeguard against killing an entity multiple times.
Also don't try to calculate more when we are damaged with zero (`0`) amount. Differential Revision: D2981 Reviewed by: @Angen. This was SVN commit r24006.
This commit is contained in:
parent
5e6a2322e7
commit
0530602405
@ -186,6 +186,9 @@ Health.prototype.Kill = function()
|
||||
*/
|
||||
Health.prototype.TakeDamage = function(amount, attacker, attackerOwner)
|
||||
{
|
||||
if (!amount || !this.hitpoints)
|
||||
return { "healthChange": 0 };
|
||||
|
||||
let change = this.Reduce(amount);
|
||||
|
||||
let cmpLoot = Engine.QueryInterface(this.entity, IID_Loot);
|
||||
|
Loading…
Reference in New Issue
Block a user