1
0
forked from 0ad/0ad
Commit Graph

19617 Commits

Author SHA1 Message Date
13209c3183 Revert 09916ce6cb which broken jenkins build.
This was SVN commit r22519.
2019-07-20 13:10:53 +00:00
09916ce6cb Fix incorrect use of setlocale() in cppformat CStr tests following 61db02790c
Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2013
This was SVN commit r22518.
2019-07-20 12:57:03 +00:00
cca7627d88 Improvements to simulation hotloading before the SM upgrade, refs #4893.
SM45 will enforce property attributes described at
https://developer.mozilla.org/en-US/docs/Mozilla/Projects/SpiderMonkey/JSAPI_reference/Property_attributes.
We thus cannot hotload properties with the DontDelete attribute.
Fix an oversight in the hotloading code.
Rename a confusing parameter.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1844
This was SVN commit r22516.
2019-07-19 21:58:58 +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
498d58e24d Fix reported memory leaks in the glooxwrapper following 61261d14fc
Differential Revision: https://code.wildfiregames.com/D2093
Reviewed By: elexis
This was SVN commit r22514.
2019-07-19 19:46:48 +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
3a839517ce Fix the -Wclass-memaccess compiler warning in the pathfinders Grid.h, refs #5294.
Differential Revision: https://code.wildfiregames.com/D2099
Reviewed By: historic_bruno, wraitii
This was SVN commit r22511.
2019-07-19 12:52:10 +00:00
e6f960bca6 Makes wxWidgets 3.0 dependency explicit in the game build.
Removes a few non-behavioral workarounds for older versions.

Refs #5502, #2891.
Accepted By: asterix
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2076
This was SVN commit r22508.
2019-07-19 04:52:03 +00:00
6fc2114b58 Unit Motion - Improve handling of obstructed paths.
Units right now try going to their next long waypoint using the
short-range pathfinder. This works, but it tends to leads to units
clumping together when shuttling for example.

By switching to short paths earlier, and by scrapping the long waypoints
when doing so, we can make movement more natural until we have unit
pushing.

Some cleanup in how the short-path domain range gets handled, and
increase the max-range by one tile to improve rare cases.

Differential Revision: https://code.wildfiregames.com/D2095
This was SVN commit r22507.
2019-07-18 20:00:38 +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
9f8fb83a89 Removes deprecated 'register' storage class from mongoose. Refs #3068
This was SVN commit r22503.
2019-07-18 06:28:51 +00:00
fc32e28c0a Fixes some ambiguous calls of abs().
Fixes #5515.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2091
This was SVN commit r22500.
2019-07-17 22:39:30 +00:00
213c56e3e6 Improvements to the translators credits script.
Port the script to Python 3, fix some bigs in it, and remove whitespace
from the output.

Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1810
This was SVN commit r22499.
2019-07-17 21:32:11 +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
dbebe0a39a Fix max-range approach when treating a target as a circle.
As reported by @bb in #5512, catapults and other big-range units might
not approach targets correctly when trying to get in range.
To be sure that we will be in range of a square obstruction approximated
as a circle, we need to consider the inscribed circle and not the
circumscribed circle.

Reported by: bb
Fixes #5512

Differential Revision: https://code.wildfiregames.com/D2086
This was SVN commit r22495.
2019-07-17 18:08:47 +00:00
7d73af990d Disables GnuTLS Native Language Support in build-osx-libs.sh, refs #5503
This was SVN commit r22494.
2019-07-17 14:51:57 +00:00
7f453a2bd0 Fixes silent download errors in build-osx-libs.sh. Fixes #5490.
This was SVN commit r22493.
2019-07-17 14:32:26 +00:00
01fd8a3654 Cleans up build-osx-libs.sh whitespace. Fixes #5486.
For consistency, long argument lists have been broken into multiple
lines after the first argument, with suitable indentation.

This was SVN commit r22492.
2019-07-17 14:20:40 +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
e8f4ae36a7 MapGenerator to delete its ScriptInterface directly after last use, refs 64efbfeae3, D2085.
Differential Revision: https://code.wildfiregames.com/D2084
Reviewed By: historic_bruno
This was SVN commit r22489.
2019-07-17 00:07:10 +00:00
f41e4082d9 Fix missing return in previous (65b02395b3), use underscore as recommended by Vladislav.
This was SVN commit r22488.
2019-07-17 00:00:05 +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
7e2512a739 Fix undefined behaviour introduced in 5c642611c4
5c642611c4 introduces undefined behaviour: for vertices that are part of
non-AA squares, the value of "quadOutward" is undefined. This fixes that
by again setting it to QUADRANT_ALL by default, as it was pre
5c642611c4. This led to OOS.

Reviewed By: elexis
Fixes #5508

Differential Revision: https://code.wildfiregames.com/D2082
This was SVN commit r22483.
2019-07-15 18:05:03 +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
4f62cc3ee7 Remove the unused variable proto from the ComponentManager in e9e05f4efc.
Add two missing error reports.
Move sanity check prior to the first variable use.

Differential Revision: https://code.wildfiregames.com/D1817
Patch By: Angen
This was SVN commit r22476.
2019-07-14 14:13:15 +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
b43904aae1 Unit Motion - optimisations to avoid recomputing paths too often
Three changes:
- Assume a certain incertain based on distance to the target, to avoid
recompute paths every turn when the target is far way and moving.
- Handle cases where the target is unreachable to the long-range
pathfinder and we would be recomputing every turn.
- If we went straight, assume we don't need to recompute a path.

These together make moving entities recompute paths far less often,
speeding up the game.

Differential Revision: https://code.wildfiregames.com/D2066
This was SVN commit r22474.
2019-07-14 11:08:15 +00:00
5c642611c4 Vertex pathfinder - fixes to quadrant optimisation to ensure units don't take detours around obstructions.
Compute the outward quadrants once and for all instead of setting them
dynamically, because there is no reason why we should always arrive from
the same quadrant as the first time we see a vertex.
Don't consider quadrants for the start-vertex, because of the edge
expansion (which can put us in illegal quadrants)

These result in (much) better paths, the tradeoff being that we now look
at some more vertices.

Fixes #5476

Differential Revision: https://code.wildfiregames.com/D1908
This was SVN commit r22473.
2019-07-14 10:19:18 +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
69f7a48dd9 Fix UB following 57362f7fa3, which could cause a crash when serialising.
Since m_ExpectedPathTicket.m_Type is uninitialised before being used,
serialisation could fail with an out of bouds error. This fixes it by
giving it an (arbitrary) default value.

Reported by: gameboy
Confirmed and debugged by: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2074
This was SVN commit r22470.
2019-07-14 09:24:37 +00:00
5fe08f1471 Actually use variable added in 80d9a44ab5. Refs #5501.
This was SVN commit r22468.
2019-07-14 05:15:51 +00:00
80d9a44ab5 Fixes #5501 null pointer exception in AtlasUI on Windows.
Contrary to wxWidgets documentation, wxMenuEvent::GetMenu() can return
NULL when the system menu is accessed on wxMSW, see
https://trac.wxwidgets.org/ticket/18443.

This was SVN commit r22467.
2019-07-14 05:02:43 +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
e06285279a Vertex pathfinder: add the domain edges back to improve behaviour (reverts c42160ec10)
This adds back the "domain" edges to the short/vertex pathfinder.
Without these edges, units could use points far away from the path
search that they inaccurately thought were reachable, leading to some
pathing oddities in rare cases.

Reviewed By: temple
Differential Revision: https://code.wildfiregames.com/D443
This was SVN commit r22465.
2019-07-13 16:01:10 +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
bb
ac5b7fdc34 Add periods and caps to the JSDOCs in Damage.js
This was SVN commit r22461.
2019-07-12 19:39:18 +00:00
3c2f15ee8b Fix lineendings.
This was SVN commit r22460.
2019-07-12 17:40:40 +00:00
d5a3437882 Unify the magic number indicating the number of impassable tiles at the map edge redundant in the Pathfinder, RangeManager and MapGenerator.
Refs #4034, #4636.
Differential Revision: https://code.wildfiregames.com/D2061
Reviewed By: wraitii
This was SVN commit r22459.
2019-07-12 16:38:51 +00:00
dcf5bad7fd Unit motion - Check the return value of ComputeGoal and handle failure cases
As reported by @Freagarach on #5496, there can be broken behaviour as
UnitMotion::PathResult may call RequestLongPath with an uninitialised
path goal when ComputeGoal fails.

To fix this, check the return value everywhere and react accordingly in
case of failure.

Fixes #5496

Differential Revision: https://code.wildfiregames.com/D2063
This was SVN commit r22458.
2019-07-12 16:16:13 +00:00
a573460c65 Updates library LICENSE.txt for libsodium and macOS patches
This was SVN commit r22457.
2019-07-12 15:25:12 +00:00