Changeset View
Changeset View
Standalone View
Standalone View
binaries/data/mods/public/simulation/components/GuiInterface.js
Show First 20 Lines • Show All 424 Lines • ▼ Show 20 Lines | for (let type of types) | ||||
ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI); | ret.attack[type].elevationAdaptedRange = cmpRangeManager.GetElevationAdaptedRange(cmpPosition.GetPosition(), cmpPosition.GetRotation(), range.max, range.elevationBonus, 2*Math.PI); | ||||
} | } | ||||
else | else | ||||
{ | { | ||||
// not in world, set a default? | // not in world, set a default? | ||||
ret.attack[type].elevationAdaptedRange = ret.attack.maxRange; | ret.attack[type].elevationAdaptedRange = ret.attack.maxRange; | ||||
} | } | ||||
} | } | ||||
ret.attack.attackGround = cmpAttack.CanAttackGround(); | |||||
} | } | ||||
let cmpArmour = Engine.QueryInterface(ent, IID_DamageReceiver); | let cmpArmour = Engine.QueryInterface(ent, IID_DamageReceiver); | ||||
if (cmpArmour) | if (cmpArmour) | ||||
ret.armour = cmpArmour.GetArmourStrengths(); | ret.armour = cmpArmour.GetArmourStrengths(); | ||||
let cmpBuildingAI = Engine.QueryInterface(ent, IID_BuildingAI); | let cmpBuildingAI = Engine.QueryInterface(ent, IID_BuildingAI); | ||||
if (cmpBuildingAI) | if (cmpBuildingAI) | ||||
▲ Show 20 Lines • Show All 1,540 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator