Add attack ability to outposts.
Fix a issue with dying units with stance standground. This was SVN commit r11697.
This commit is contained in:
parent
10687410cd
commit
d03d36b1f3
@ -166,10 +166,15 @@ Attack.prototype.GetAttackStrengths = function(type)
|
||||
|
||||
Attack.prototype.GetRange = function(type)
|
||||
{
|
||||
var cmpTechMan = QueryOwnerInterface(this.entity, IID_TechnologyManager);
|
||||
var max = +this.template[type].MaxRange;
|
||||
var min = +(this.template[type].MinRange || 0);
|
||||
|
||||
var max = cmpTechMan.ApplyModifications("Attack/" + type + "/MaxRange", +this.template[type].MaxRange, this.entity);
|
||||
var min = cmpTechMan.ApplyModifications("Attack/" + type + "/MinRange", +(this.template[type].MinRange || 0), this.entity);
|
||||
var cmpTechMan = QueryOwnerInterface(this.entity, IID_TechnologyManager);
|
||||
if (cmpTechMan)
|
||||
{
|
||||
max = cmpTechMan.ApplyModifications("Attack/" + type + "/MaxRange", max, this.entity);
|
||||
min = cmpTechMan.ApplyModifications("Attack/" + type + "/MinRange", min, this.entity);
|
||||
}
|
||||
|
||||
return { "max": max, "min": min };
|
||||
};
|
||||
|
@ -164,7 +164,11 @@ function QueryOwnerInterface(ent, iid)
|
||||
if (!cmpOwnership)
|
||||
return null;
|
||||
|
||||
var playerEnt = cmpPlayerManager.GetPlayerByID(cmpOwnership.GetOwner());
|
||||
var owner = cmpOwnership.GetOwner();
|
||||
if (owner == -1)
|
||||
return null;
|
||||
|
||||
var playerEnt = cmpPlayerManager.GetPlayerByID(owner);
|
||||
if (!playerEnt)
|
||||
return null;
|
||||
|
||||
|
@ -5,7 +5,21 @@
|
||||
<Pierce>5.0</Pierce>
|
||||
<Crush>5.0</Crush>
|
||||
</Armour>
|
||||
<Attack disable=""/>
|
||||
<Attack>
|
||||
<Ranged>
|
||||
<Hack>0.0</Hack>
|
||||
<Pierce>25.0</Pierce>
|
||||
<Crush>0.0</Crush>
|
||||
<MaxRange>80.0</MaxRange>
|
||||
<MinRange>16.0</MinRange>
|
||||
<ProjectileSpeed>75.0</ProjectileSpeed>
|
||||
<PrepareTime>1200</PrepareTime>
|
||||
<RepeatTime>2000</RepeatTime>
|
||||
</Ranged>
|
||||
</Attack>
|
||||
<BuildingAI>
|
||||
<GarrisonArrowMultiplier>1</GarrisonArrowMultiplier>
|
||||
</BuildingAI>
|
||||
<BuildRestrictions>
|
||||
<Territory>own neutral</Territory>
|
||||
<Category>House</Category>
|
||||
|
Loading…
Reference in New Issue
Block a user