Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/DeathDamage.js
Show First 20 Lines • Show All 76 Lines • ▼ Show 20 Lines | DeathDamage.prototype.CauseDeathDamage = function() | ||||
let cmpDamage = Engine.QueryInterface(SYSTEM_ENTITY, IID_Damage); | let cmpDamage = Engine.QueryInterface(SYSTEM_ENTITY, IID_Damage); | ||||
let playersToDamage = cmpDamage.GetPlayersToDamage(owner, this.template.FriendlyFire); | let playersToDamage = cmpDamage.GetPlayersToDamage(owner, this.template.FriendlyFire); | ||||
let radius = ApplyValueModificationsToEntity("DeathDamage/Range", +this.template.Range, this.entity); | let radius = ApplyValueModificationsToEntity("DeathDamage/Range", +this.template.Range, this.entity); | ||||
cmpDamage.CauseDamageOverArea({ | cmpDamage.CauseDamageOverArea({ | ||||
"attacker": this.entity, | "attacker": this.entity, | ||||
"origin": pos, | "origin": pos, | ||||
"radius": radius, | "minRange": 0, | ||||
"maxRange": radius, | |||||
"shape": this.template.Shape, | "shape": this.template.Shape, | ||||
"strengths": this.GetDeathDamageStrengths(), | "strengths": this.GetDeathDamageStrengths(), | ||||
"splashBonus": this.GetBonusTemplate(), | "splashBonus": this.GetBonusTemplate(), | ||||
"playersToDamage": playersToDamage, | "playersToDamage": playersToDamage, | ||||
"type": "Death", | "type": "Death", | ||||
"attackerOwner": owner | "attackerOwner": owner | ||||
}); | }); | ||||
}; | }; | ||||
Engine.RegisterComponentType(IID_DeathDamage, "DeathDamage", DeathDamage); | Engine.RegisterComponentType(IID_DeathDamage, "DeathDamage", DeathDamage); |
Wildfire Games · Phabricator