Cleanup of damage type related code in cmpDeathDamage.

This fixes a broken use of a function, removes an unused parameter,
fixes the incorrect property name in the gui.

Reviewed By: fatherbushido
Differential Revision: https://code.wildfiregames.com/D868
This was SVN commit r20112.
This commit is contained in:
leper 2017-09-04 21:22:11 +00:00
parent c4f6371940
commit 4551e911a4
2 changed files with 3 additions and 7 deletions

View File

@ -42,7 +42,7 @@ DeathDamage.prototype.Init = function()
DeathDamage.prototype.Serialize = null; // we have no dynamic state to save
DeathDamage.prototype.GetDeathDamageStrengths = function(type)
DeathDamage.prototype.GetDeathDamageStrengths = function()
{
// Work out the damage values with technology effects
let applyMods = damageType =>
@ -84,7 +84,7 @@ DeathDamage.prototype.CauseDeathDamage = function()
"origin": pos,
"radius": radius,
"shape": this.template.Shape,
"strengths": this.GetDeathDamageStrengths("Death"),
"strengths": this.GetDeathDamageStrengths(),
"splashBonus": this.GetBonusTemplate(),
"playersToDamage": playersToDamage,
"type": "Death",

View File

@ -525,11 +525,7 @@ GuiInterface.prototype.GetExtendedEntityState = function(player, ent)
let cmpDeathDamage = Engine.QueryInterface(ent, IID_DeathDamage);
if (cmpDeathDamage)
ret.deathDeath = {
"hack": cmpDeathDamage.GetDeathDamageStrengths("hack"),
"pierce": cmpDeathDamage.GetDeathDamageStrengths("pierce"),
"crush": cmpDeathDamage.GetDeathDamageStrengths("crush")
};
ret.deathDamage = cmpDeathDamage.GetDeathDamageStrengths();
let cmpObstruction = Engine.QueryInterface(ent, IID_Obstruction);
if (cmpObstruction)