1
0
forked from 0ad/0ad

Adjust range visualisation and aura ranges following d0fc8ff67d

d0fc8ff67d / D2759 made ranges account for entity size, making auras
larger than they needed to be. This accounts for that.

Units haven't been changed, the delta is not worth modifying imo.

As discussed with Nescio, this means that, for a given aura, larger
buildings will now have a larger "aura area". This particularly affects
oblong buildings.
A proper solution for this would be to not approximate some structures
as a circle, but remains to be implemented.

Note that for current 0 A.D., this effect is unlikely to be a
significant gameplay advantage to one civilisation over another.

Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D3169
This was SVN commit r24349.
This commit is contained in:
wraitii 2020-12-08 12:53:07 +00:00
parent 4bfc7048f0
commit 050c5401b1
9 changed files with 14 additions and 11 deletions

View File

@ -48,12 +48,15 @@ RangeOverlayManager.prototype.RegenerateRangeOverlays = function(forceUpdate)
if (!this.enabled && !forceUpdate)
return;
let cmpObstruction = Engine.QueryInterface(this.entity, IID_Obstruction);
let rangeBonus = cmpObstruction ? cmpObstruction.GetSize() : 0;
// Only render individual range types that have been enabled
for (let rangeOverlayType of this.rangeVisualizations.keys())
if (this.enabledRangeTypes[rangeOverlayType])
for (let rangeOverlay of this.rangeVisualizations.get(rangeOverlayType))
cmpRangeOverlayRenderer.AddRangeOverlay(
rangeOverlay.radius,
rangeOverlay.radius + rangeBonus,
rangeOverlay.texture,
rangeOverlay.textureMask,
rangeOverlay.thickness);

View File

@ -1,6 +1,6 @@
{
"type": "range",
"radius": 50,
"radius": 45,
"affects": ["Soldier"],
"modifications": [
{ "value": "Attack/Melee/Damage/Hack", "multiply": 1.2 },

View File

@ -1,6 +1,6 @@
{
"type": "range",
"radius": 60,
"radius": 50,
"affects": ["Worker"],
"modifications": [
{ "value": "ResourceGatherer/BaseSpeed", "multiply": 1.15 }

View File

@ -1,6 +1,6 @@
{
"type": "range",
"radius": 70,
"radius": 55,
"affects": ["Soldier"],
"modifications": [
{ "value": "Attack/Melee/Damage/Hack", "multiply": 1.1 },

View File

@ -1,6 +1,6 @@
{
"type": "range",
"radius": 75,
"radius": 60,
"affects": ["Structure"],
"modifications": [
{ "value": "Capturable/GarrisonRegenRate", "multiply": 1.5 }

View File

@ -1,6 +1,6 @@
{
"type": "range",
"radius": 75,
"radius": 70,
"affects": ["Trader"],
"modifications": [
{ "value": "UnitMotion/WalkSpeed", "multiply": 1.2 }

View File

@ -1,6 +1,6 @@
{
"type": "range",
"radius": 60,
"radius": 50,
"affects": ["Worker"],
"modifications": [
{ "value": "ResourceGatherer/Rates/food.grain", "multiply": 1.25 }

View File

@ -1,6 +1,6 @@
{
"type": "range",
"radius": 40,
"radius": 20,
"affects": ["Human"],
"modifications": [
{ "value": "Health/RegenRate", "add": 1 }

View File

@ -7,7 +7,7 @@
<Category>Monument</Category>
<Distance>
<FromClass>Monument</FromClass>
<MinDistance>135</MinDistance>
<MinDistance>145</MinDistance>
</Distance>
</BuildRestrictions>
<Capturable disable=""/>
@ -19,7 +19,7 @@
</Resources>
</Cost>
<Footprint>
<Square width="10.0" depth="10.0"/>
<Square width="8.0" depth="8.0"/>
<Height>8.0</Height>
</Footprint>
<GarrisonHolder disable=""/>
@ -39,7 +39,7 @@
<metal>20</metal>
</Loot>
<Obstruction>
<Static width="10.0" depth="10.0"/>
<Static width="6.0" depth="6.0"/>
</Obstruction>
<ProductionQueue disable=""/>
<RallyPoint disable=""/>