Use at() over find() as it makes the code neater and the performance
impact is negligible.
This forces an algorithm change in FindReachableRegions as the key
accessed is not guaranteed to exist.
Differential Revision: https://code.wildfiregames.com/D1830
This was SVN commit r22210.
These variously test some simple MakeGoalReachable and
FindNearestNavcell calls, as well as checking edges and regions when
updating the map.
Differential Revision: https://code.wildfiregames.com/D1833
This was SVN commit r22205.
The template tree included 'template_unit_mechanical.xml', which had two
children, '*_ship.xml' and '*_siege.xml'.
This template did little and implied a relevant common ancestor to ship
and siege units. As organic units do not descend from a generic
'Organic', this was not necessary.
This commit removes this template and the '_mechanical' bit from
children templates to simplify.
Additionally, this renames:
- template_unit_mechanical_siege_ballista.xml to
template_unit_siege_boltshooter.xml
- template_unit_mechanical_siege_onager.xml to
template_unit_siege_stonethrower.xml
This helps avoid ambiguity, as our Roman ballista for example throws
stones (even if it is a torsion engine), and 'ballista' refers to a bolt
shooter in Age of Empires 1 (and in AoE 2 for the Elephant Ballista,
confusingly not named a scorpion like other bolt shooters in that game).
Patch By: Nescio
Reviewers: Wraitii
Subscribers: Itms, O14 Maps, wraitii, elexis, Vulcan, Stan
Differential Revision: https://code.wildfiregames.com/D1760
This was SVN commit r22204.
While at it:
- Remove the stone cost/loot from palisades
- Change the gate tooltip to not mention stone walls
- Standartize palisade armour (don't reuse the walls' armour)
- Demand village phase instead of town phase for all palisades
- Remove stone wall classes from palisades
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1796
This was SVN commit r22202.
f0d9806b3f added a problem: Engine.GetGuiObjectByName is unaware of the
caller GUI page.
So GUI pages in the background that still run the onTick and other event
code tried to look on the topmost GUI page, rather than their own GUI
page.
9674c3c0fe added a workaround that has to be copied to any place that
can call JS code.
If developers don't know about the reason for this workaround and add a
new place that can call JS code (#5369), they won't be able to implement
anything.
This removes this workaround by passing the pointer to the correct GUI
page as callback data.
Patch By: elexis
Reviewed By: wraitii
Refs #5369
Trac Tickets: #5369
Differential Revision: https://code.wildfiregames.com/D1701
This was SVN commit r22200.
This changes running speed into a running multiplier (of walk speed).
The advantage is that it simplifies code since you can setup a default
run multiplier at the template level and it'll work for all subsequent
templates, and technologies cannot forget to change it. It makes
specialised unit templates easier to maintain, too.
Formations have a 100 run multiplier which effectively sets their
maximal walking speed at 100
Reviewed By: bb, O2 JS Simulation
Differential Revision: https://code.wildfiregames.com/D438
This was SVN commit r22197.
Do not flag a unit as injured when it receives 0 damage.
Do not flag dead units as injured.
Do not mark units as injured when they are full health and killed at one
shot.
Cleanup Reduce, introducing a separate function to handle deaths.
Patch By: Angen
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1769
This was SVN commit r22196.
while at it, make the classes consistent and remove the cav from the
range
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1791
This was SVN commit r22190.
Following D945, I reckon more things should be moved from Attack/Ranged
to Attack/Ranged/Projectile.
In the long run, I think most things should be moved to the Projectile,
which would let us have several projectiles per attack (for example),
make it easier to abstract away from the Melee/Ranged attack types, and
would also be more coherent. This is the first step, as it adds the
Projectile to all templates.
This also makes the launch point a parameter, though I only add "y" as
implementing the rotation is left as an exercise to the reader.
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1171
This was SVN commit r22184.
While add it remove conquestCritical from benches/fences/tables/columns
etc.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1626
This was SVN commit r22182.
Use English names for authors and titles, use American English rather
than British.
Patch By: Nescio
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1818
This was SVN commit r22174.
The variable was introduced in 492e49da38 without being used, neither
did it become used in a later commit. To me it seems that it is a
left-over from a copy paste, as the ".left" functions do use the
variable.
Notice 74c420f658 did cleanup around these lines, but did not remove
this variable
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1813
This was SVN commit r22166.
C4458 in AtlasObjectImpl.cpp line 292 and in AtlasUI/Object.cpp:547
C4456 in MapDialog.cpp:173 and in ScenarioEditor.cpp:742
Reviewed by: @Angen
Accepted by: @Itms
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1741
This was SVN commit r22161.
the variable was removed in 12e2428495. A usage was removed in
9376609ee8.
And since then the usage is useless because we use infinity sky model.
This was SVN commit r22154.