do not let the captureStrength become infinite when capturing a damaged structure, fix #3973, patch by fatherbushido
This was SVN commit r18215.
This commit is contained in:
parent
4b5f8dfca6
commit
682086b7fb
@ -583,7 +583,7 @@ Attack.prototype.PerformAttack = function(type, target)
|
||||
let cmpHealth = Engine.QueryInterface(target, IID_Health);
|
||||
if (!cmpHealth || cmpHealth.GetHitpoints() == 0)
|
||||
return;
|
||||
multiplier *= cmpHealth.GetMaxHitpoints() / cmpHealth.GetHitpoints();
|
||||
multiplier *= cmpHealth.GetMaxHitpoints() / (0.1 * cmpHealth.GetMaxHitpoints() + 0.9 * cmpHealth.GetHitpoints());
|
||||
|
||||
let cmpOwnership = Engine.QueryInterface(this.entity, IID_Ownership);
|
||||
if (!cmpOwnership || cmpOwnership.GetOwner() == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user