1
0
forked from 0ad/0ad
Commit Graph

13279 Commits

Author SHA1 Message Date
Alexandermb
007f271a67 Remove unused horse sele_crest and straps_kush_base.xml from wrong folder.
Concern raised by @elexis in checkref

Following 2115bf2e5d

This was SVN commit r22594.
2019-08-02 14:20:12 +00:00
Alexandermb
2510e1b82e Fix concern raised by checkref mentioned by @elexis
Add silver chalcidean variant for
macedonians/hero_infantry_swordsman_craterus.xml

Following 0257f1ca79

This was SVN commit r22590.
2019-08-02 02:36:01 +00:00
eab4f9fdde Replace {gender} by {phenotype} and support this tag in VisualActor.
A random phenotype can be chosen by giving multiple tokens to the
template.
This allows giving different looks to the same template.

Comments By: stan, vladislav, elexis
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1955
This was SVN commit r22586.
2019-08-01 19:14:40 +00:00
Alexandermb
d7a93c3b35 Update some actors outdated helmets
(following 0257f1ca79 And 2fcccb6669)

This was SVN commit r22585.
2019-08-01 17:54:15 +00:00
Alexandermb
29b72212fe Update some hero helmets
(following 0257f1ca79)

This was SVN commit r22584.
2019-08-01 17:39:26 +00:00
Alexandermb
d51adb2674 Fix for broken catafalque_two_wheel.dae following 6d332c0822
Mentioned by @elexis

Also fix traders two_wheel carts from staying static while dead.
(temporary fix until i place an animation for death in the
two/four_wheel_cart.

This was SVN commit r22583.
2019-08-01 12:59:24 +00:00
Alexandermb
9e1c53c2ff Update athen/cavalry_javelinist_e_r.xml helmet.
This actor was using old boeotian helmet

mentioned by @wackyserious Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/10/&tab=comments#comment-381154

(following 0257f1ca79)

This was SVN commit r22582.
2019-08-01 12:34:49 +00:00
Alexandermb
12797e14d7 Remove now unused corinthians actors due to new meshes.
Remove mask from boeotian helmets B3/B4

Remove hele_su3 from macedonians/infantry_javelinist_e.xml.

Add missing checkguard from hele_phrygian_bronze.png

(following 0257f1ca79)

This was SVN commit r22581.
2019-07-31 23:00:22 +00:00
Alexandermb
8f979756fd Add two missing corinthians after update.
This was SVN commit r22580.
2019-07-31 19:15:16 +00:00
Alexandermb
0257f1ca79 Big hellenic helmets update
Including:

*Thracian*
*Phrygian*
*Boeotian*
*Chalcidean*
*Attic*
*Bryastovets*
*Corinthian*
*Pilos*

Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/10/&tab=comments#comment-381132

Reviewed by the community of 0.A.D.

This was SVN commit r22579.
2019-07-31 18:40:21 +00:00
8d4d70add9 entity template for the juniper tree
This was SVN commit r22577.
2019-07-29 19:14:08 +00:00
a21a21c443 Junipers, grasses, and some flora material edits for broken parallax. Black pines lightened a bit
This was SVN commit r22576.
2019-07-29 19:04:39 +00:00
fee7dba38f Fix Capture oversight in GetBestAttackAgainst in 9fcfdb0324
This fixes units always using capture attack on a building, since
rp22569 forgot to eliminate Capture from the attack types when not
allowed.

Reported by: minohaka
Patch by: Freagarach
Reviewed by: wraitii
Fixes #5544

Differential Revision: https://code.wildfiregames.com/D2134
This was SVN commit r22575.
2019-07-29 18:51:50 +00:00
9fcfdb0324 Improve Attack's GetBestAttackAgainst by only considering attack types that actually can attack the target.
Patch By: freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2112
This was SVN commit r22569.
2019-07-28 14:58:24 +00:00
c03abd1e92 UnitMotion cleanup - remove dead code, add a common path for MoveTo functions, rename BeginPathing, move functions around for better readability.
BeginPathing renamed to ComputePathToGoal, as that is what this function
does.
IsMoving renamed to IsMoveRequested, as the function returns true when
the unit has a move request going on, not when it is actually moving
across the map, which was misleading.

UpdateMovementState's implementation moved closer to where it is used.

PathIsShort and WAYPOINT_ADVANCE_MAX are currently unused, thus deleted.

Differential Revision: https://code.wildfiregames.com/D2067
This was SVN commit r22568.
2019-07-28 10:51:12 +00:00
d9c6879450 Fix units ignoring range when attacking in one case, and fix targeting formations
Fixes for 5568bd4c16:
- units could occasionally ignore range checks when attacking.
- attacking a formation wouldn't pick new targets correctly.

While testing, I also think the walk then walk and fight behaviour
should be changed to just walk and fight or units might just run towards
enemies and not attack them, which looks rather odd.

Reported By: Angen
Fixes #5530

Differential Revision: https://code.wildfiregames.com/D2119
This was SVN commit r22567.
2019-07-28 10:39:27 +00:00
103d89f026 GatherNearPositiion when the target remains invisible on our second try, instead of going idle.
This improves hunting behaviour, as targets may still be in FOW on the
second try, and the unit would go idle - instead it'll now gather near
position, which is more likely to find a proper resource.

Differential Revision: https://code.wildfiregames.com/D2071
This was SVN commit r22565.
2019-07-28 09:48:23 +00:00
3e4d339b51 Add a missing undefined to booelan conversion for the diplomacy dialog in eec179a9a8, fixes #5542.
Remove diplomacyMenuButton unused since introduction in a21e01150a.

This was SVN commit r22562.
2019-07-27 21:18:16 +00:00
wackyserious
b9544a2eaa New Ptolemy IV (Hero) Texture
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26591-task-ptolemy-iv-rework/

Reviewed by: Stan, Nescio and wowgetoffyourcellphone
This was SVN commit r22554.
2019-07-26 11:10:43 +00:00
3532dd64ac Fix patrol order and make the relaxed range check into a constant.
Introduced by 32e8ed51aa.

Reported By: elexis
Fixes #5531 .

Differential Revision: https://code.wildfiregames.com/D2118
This was SVN commit r22546.
2019-07-24 19:05:12 +00:00
a783f430d5 Update the gather LastPos alongside the combat LastPos when hunting to more efficiently hunt.
When units are hunting, they push an attacking order in front.

That attacking order keeps track of the target's last known position to
efficiently hunt. However, if the unit goes out of LOS,
ShouldAbandonChase triggers and the unit goes back to the gather order -
which hby then as a hopelessly out of date "LastPos".
By updating the LastPos of the gather order as well, Gather can recover
efficiently.

Differential Revision: https://code.wildfiregames.com/D2072
This was SVN commit r22543.
2019-07-24 15:55:07 +00:00
wackyserious
7c2985bbe1 New Roman Units Texture
Thread:
https://wildfiregames.com/forum/index.php?/topic/25533-task-roman-infantry-new-texture/

Reviewed by: Art Department and (Sundiata, Genava55,
wowgetoffyourcellphone and Lion.Kanzen)

This was SVN commit r22542.
2019-07-24 06:53:04 +00:00
eec179a9a8 Use FromJSVal and ToJSVal for GUI boolean conversions.
Consistently warn instead of using implicit conversion when not passing
a boolean, for consistency and callers being more cautious with passed
values.

This was SVN commit r22538.
2019-07-23 21:46:32 +00:00
9be8a560a9 Delete JSClass JSI_GUIColor / GUIColor from af9c336b43, refs #5387, D1699.
* JSI_GUIColor::construct and JSI_IGUIObject::setProperty hunk are
duplicates of FromJSVal, getProperty of ToJSVal, following 7c2e9027c2.
* The constructor, it's fallback magenta and toString have never been
used by JS.
* A JS color class providing some methods (such as found in color.js,
refs #5387, and the unused toString redundant with rgbToGuiColor, see
also eee8217b45) is more inviting to changes and maintenance if defined
in JS and can still be instantiated in C++, like the Vector2D (see also
65b02395b3).
* PredefinedColors (such as "red" or "green") can be obtained from the
prototype without defining the class in C++.
* Minimize ugliness by removing macrosity, refs 8ceb41212d.

Rename alpha to a in guiToRgbColor from eee8217b45 for consistency with
the C++ conversions (opaqueness had been skipped in the only callers of
this JS function yet).
Delete unused GUISTDTYPE Mouse in header forgotton in 8734efca94.

This was SVN commit r22534.
2019-07-23 14:22:27 +00:00
6643613b54 Easier introduction of new damage types.
725aa8a686 introduced a DamageTypes.js global script similar to the
resources one. However, we never actually need to refer to this script
since we can always use the damage types provided by the
template/context/object we are looping over/...
There is one exception to this for AI weighting of damage types.
However, since damage types are not stored in files, this is strictly
equivalent to hardcoding them in the global script and was deemed
acceptable.

Patch By: freagarach
Reviewed By: wraitii
Refs #4801 (by invalidating it for now, though such helper files might
be useful in the future if damage types require more metadata).

Differential Revision: https://code.wildfiregames.com/D1938
This was SVN commit r22527.
2019-07-22 18:37:18 +00:00
32e8ed51aa UnitMotion - Send messages to UnitAI when obstructed, to allow stopping early when walking and avoiding pathfinding lag.
As reported by #5521, Ordering units to walk to a point in a forest can
lag terribly, as units will end up computing long short paths in the
forest, which can result in `ComputeShortPath` calls that individually
take upwards of 80ms.

This can be alleviated by allowing units to stop a bit earlier. A23
handled this in UnitMotion directly, but it's better to handle this in
UnitAI to avoid surprises and to make it customisable on a per-state
level.

This diff further speeds up using the short pathfinder by starting with
a smaller search range, limiting the max-range more and moving the range
slightly towards the goal.

This also refactors UM sending messages to UnitAI so that we may in the
future push more information (in particular, the entity_id that a unit
was obstructed by could be interesting for COMBAT).

This doesn't fix the possibility of lag, but it reduces its occurrence
to levels that should be similar to A23 and thus acceptable enough.

Tested By: Freagarach
Fixes #5521

Differential Revision: https://code.wildfiregames.com/D2105
This was SVN commit r22526.
2019-07-22 18:07:24 +00:00
Alexandermb
09315fdc6b Update Britons blacksmith_armorstand_armor.xml to use new @wackyserious chainmail textures
This was SVN commit r22524.
2019-07-22 00:55:23 +00:00
1a3ba39900 Trader linting, refs D2106.
Differential Revision: https://code.wildfiregames.com/D2107
Patch By: Angen
Comments By: Vulcan
This was SVN commit r22523.
2019-07-21 20:19:39 +00:00
51419d7092 Correct uncaught MapReader and MapGenerator throw statements following 2b138f47db and 2180862d40.
Differential Revision: https://code.wildfiregames.com/D2089
Reviewed By: historic_bruno
This was SVN commit r22521.
2019-07-21 01:35:39 +00:00
feb88a337a Pass arbitrary arguments to GUI events / SendEventToAll and remove loading screen progess workaround, refs D1716, 6d792365aa, bd3bd084c0, 4b1297b328, db5d4bb5f1.
Differential Revision: https://code.wildfiregames.com/D1754
Reviewed By: Itms
Comments By: leper
This was SVN commit r22515.
2019-07-19 21:15:04 +00:00
6230bbea24 Update of the scripting tests. Test some modding features and update JS::Value integer limits.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1850
This was SVN commit r22513.
2019-07-19 15:41:27 +00:00
Alexandermb
6d332c0822 Fix for unsync siege weapons unpacked with horses idle animations
This was SVN commit r22512.
2019-07-19 15:30:49 +00:00
b807c39e6a Restore previous formation behaviour of targeting nearby enemies when idle / aborting orders
This restores A23 formation behaviour, changed by 4ca448a686. Units will
now start attacking nearby enemies when the formation goes idle (such as
when the abort order button is clicked).

This introduces a change that formation units that actually go idle will
try to move back in formation shape, so it looks more like they're still
in formation.

Fixes #5519.

Differential Revision: https://code.wildfiregames.com/D2097
This was SVN commit r22506.
2019-07-18 19:59:37 +00:00
bac777cb29 Correctly face towards target when repairing, gathering, guarding.
Calls to FaceTowardsTarget were missed in the REPAIRING, GATHERING and
GUARDING unitAI state, leading occasionally to units pointing the wrong
way. This was not an issue prior to 0c20afdfda, which called
MoveToTargetRange, which itself called FaceTowardsTarget when it was
already in range, but it now needs to be explicitly handled in unitAI.

Attacking and Healing already handled this correctly.

Fixes #5518

Differential Revision: https://code.wildfiregames.com/D2096
This was SVN commit r22505.
2019-07-18 19:56:09 +00:00
bb
114dcbf655 Clean Gaia's Selectable
Patch By: Nescio
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D1765
This was SVN commit r22504.
2019-07-18 10:04:04 +00:00
bb
e381fa393a Standardize formation tooltips
Patch By: Nescio
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D2007
This was SVN commit r22498.
2019-07-17 20:20:48 +00:00
bb
332e59bdbe Add skirmish templates for range, stable, wonder and workshop
While at it clean some obstruction and footprint sizes in stables and
workshops
Add a specific name for some workshops

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2049
refs: #4849

This was SVN commit r22497.
2019-07-17 19:40:50 +00:00
81cd2f1cdf Fix walk-to-target and other movements with max-range "0" for target entities
Entities may never get to a distance of "0" when trying to reach other
entities, as that would mean they are right next to each other, or even
overlapping, which can fail.
Always give some leeway to distance when trying to move to a target with
no specified max-range.

This fixes WalkToTarget orders which resulted in units being stuck on
mines or on dropsites occasionally.

Reported by: elexis
Fixes #5510

Differential Revision: https://code.wildfiregames.com/D2087
This was SVN commit r22496.
2019-07-17 18:11:15 +00:00
ecae8469ba Move domestic wolf from templates/trigger/ to templates/gaia/, refs cd6c31e76e, 79fb493da3, D176.
Differential Revision: https://code.wildfiregames.com/D1904
Patch By: Nescio
This was SVN commit r22491.
2019-07-17 14:14:53 +00:00
65b02395b3 Remove Vector2D/Vector3D prototype workaround from EngineScriptConversions.
Fixes #5376, refs #2394.
Differential Revision: https://code.wildfiregames.com/D1991
Patch By: Krinkle
Comments By: Vladislav, wraitii
This was SVN commit r22487.
2019-07-16 21:52:49 +00:00
bb
29a8852ea4 Rename "CauseSplashDamage" to the more generic "CauseDamageOverArea"
Patch By: Freagarach
Comments By: wraitii, Nescio
Differential Revision: https://code.wildfiregames.com/D2065
This was SVN commit r22486.
2019-07-16 15:14:49 +00:00
a6f30c14d5 Provide microsecond precision in the RandomMapLogger too, refs 7a91d330d3.
This was SVN commit r22481.
2019-07-15 14:44:53 +00:00
3e8205d7bf Moar lineendings.
This was SVN commit r22478.
2019-07-15 02:18:51 +00:00
e1bde4c337 Fix tests following 945d1ba2e6
945d1ba2e6 broke formation regression tests because there now needs to
be a timer call after the units become idle for behaviour to trigger.

Differential Revision: https://code.wildfiregames.com/D2077
This was SVN commit r22477.
2019-07-14 14:57:38 +00:00
945d1ba2e6 Fix IDLE-related infinite loops by moving stateful calls to IDLE.timer.
The game currently has several infinite loops, and the stack trace is
always a variation on the same pattern that units go through IDLE as a
default state, immediately try another order (possibly entering a new
state), failing, and goes back to IDLE.

IDLE.Timer is a general workaround for this issue. It wastes a turn
every time a unit goes idle, so should a better solution be found for
the general problem of infinite loops in UnitAI, it should be removed.

This revert 8bab09d37c which was intended as a safety net, but couldn't
protect againt infinite loops between two different states.

Fixes #5460

Differential Revision: https://code.wildfiregames.com/D2041
This was SVN commit r22475.
2019-07-14 11:40:27 +00:00
d0e6111ea1 Enable eslint rule no-floating-decimal and remove all superfluous floating decimal points.
Differential Revision: https://code.wildfiregames.com/D2003
Patch By: Krinkle
This was SVN commit r22472.
2019-07-14 10:03:10 +00:00
e53fb0a8d7 Make sure hunting units don't forget about the initial herd position (fix for 8a38cfb7cf)
Units move the InitPos of the heard to the last known position when
going through Order.Gather, which they do multiple times when hunting,
thus making them mistakenly move the herd position and unable to find it
back.

Differential Revision: https://code.wildfiregames.com/D2073
This was SVN commit r22471.
2019-07-14 09:38:17 +00:00
7300dd186e Cleanup MapGenerator.cpp, use VfsPath, create RegisterScriptFunctions, add header comments, register TERRAIN_TILE_SIZE directly.
Refs 7a17a3152c, #4034, #4964.
Differential Revision: https://code.wildfiregames.com/D2068
VfsPath change accepted by historic_bruno.

This was SVN commit r22466.
2019-07-13 21:41:09 +00:00
055c848c1a Unit Motion - improve PathResult/Obstructed move handling
Reorder code flow, handle long paths and short paths in a more explicit
manner, and only fail after a certain number of failed path computations
to avoid going idle too easily.

Make sure WALKING orders in UnitAI stop when the move fails to avoid
units being stuck.

Differential Revision: https://code.wildfiregames.com/D1907
This was SVN commit r22464.
2019-07-13 15:53:21 +00:00
Alexandermb
3823023434 Sync trader_cart_idle Animation with the horse idle animation lenght in order to work properly.
Mentioned by @Angen

https://wildfiregames.com/forum/index.php?/topic/25397-committed-horse-update-20-retexture/page/4/&tab=comments#comment-379288

This was SVN commit r22463.
2019-07-13 14:37:24 +00:00