Differential D2065 Diff 8931 ps/trunk/binaries/data/mods/public/simulation/components/DeathDamage.js
Changeset View
Changeset View
Standalone View
Standalone View
ps/trunk/binaries/data/mods/public/simulation/components/DeathDamage.js
Show First 20 Lines • Show All 73 Lines • ▼ Show 20 Lines | DeathDamage.prototype.CauseDeathDamage = function() | ||||
if (owner == INVALID_PLAYER) | if (owner == INVALID_PLAYER) | ||||
warn("Unit causing death damage does not have any owner."); | warn("Unit causing death damage does not have any owner."); | ||||
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.CauseSplashDamage({ | cmpDamage.CauseDamageOverArea({ | ||||
"attacker": this.entity, | "attacker": this.entity, | ||||
"origin": pos, | "origin": pos, | ||||
"radius": radius, | "radius": 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