forked from 0ad/0ad
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:
parent
c4f6371940
commit
4551e911a4
@ -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",
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user