Commit Graph

21129 Commits

Author SHA1 Message Date
bb 19762acf03 Also do transform
This was SVN commit r24441.
2020-12-23 17:48:24 +00:00
bb 6205f687e4 cp => CapturePoints
Reviewed By: Angen
Differential Revision: D3248
This was SVN commit r24440.
2020-12-23 17:26:36 +00:00
Angen 75b8d3194e Show a default value in playersFilter input to show user what it is for [v2]
Redo original diff D245 by ffffffff after commit of cpp changes for
input placeholders.

Differential revision: D3245
Reviewed by: bb
Comments by: Stan, wraitii
This was SVN commit r24439.
2020-12-23 15:50:16 +00:00
bb 0fe7f86b6d Display header from c8fda40b02 also for upgrades.
refs 024aa77c35, D2654
Reviewed by: Freagarach
Comments By: elexis
Differential Revision: D3008
This was SVN commit r24437.
2020-12-22 22:27:10 +00:00
Angen 6b353c4ae5 [Petra/Ai] Get landaccess of garrison holder if entity is garrisoned
Position of garrisoned entities is undefined, thats why landaccess
fails, when asking for position in some cases.
Last replay in ticket is from a23b.

source of the issue was this.target in attackplan got garrisoned so it
got undefined possition.

Solution applied is to ask for landaccess of garrisonholder if current
entity is garrisoned inside the function itself, instead doing it in
every place possible and forget it the future additions. If calling code
does not want to deal with garrisoned entities, it should check for that
case separately.

For attack plan, when it happened is fine, because it will deal with
garrisoned entity later.

Differential revision: D3244
Fixes: #5589

This was SVN commit r24436.
2020-12-22 11:11:18 +00:00
Angen 41df29ff25 [gameplay-a24] sword/axeman cavalry balance move speed
give same movement speed to sword/axe cav as spear cav has

run speeed multiplier 1.2 -> 1.1

Differential revision: D3231
Patch by: borg-
Accepted by: Nescio, ValihrAnt
This was SVN commit r24435.
2020-12-22 08:15:06 +00:00
wraitii d92aadcb96 Revert ZONE_INCREMENTAL gc to fix a crash.
The crash could be reproduced by hotloading. It didn't always happen
(about 1 in 15?).
I do not have sufficient time to investigate, so this reverts this for
now.
Introduced with the SM78 migration, refs #5861

Differential Revision: https://code.wildfiregames.com/D3239
This was SVN commit r24434.
2020-12-22 07:44:53 +00:00
Angen 37e08a4ffb Implement placeholder text for input fields and get rid of hack with mod filter
different font colour
no need to delete the text, when one wants to write there something
text displayed is not a value so field is technically empty
will disappear when user writes some character
will appear when user deletes all characters
we can get rid of text value "Filter" in mod selection screen and ugly
hack around it

Differential Revision: D2460
Comments by: vladislavbelov, elexis
This was SVN commit r24433.
2020-12-21 09:04:12 +00:00
Angen c72861b708 Add proper lake to tutorial map
Lake was not showing properly in a24 anymore.
Reported by gameboy on forum:
https://wildfiregames.com/forum/topic/34502-the-disappearing-lake/
Cause is, that water level had the same value as terrain level and since
a24 uses more precise water level computation, high quality water
effects did not show the lake. ( found by @vladislavbelov )

Rise water level in the lake, remove animals, trees, minerals from lake
area add some fish.

Differential Revision: D3240
This was SVN commit r24432.
2020-12-19 20:21:15 +00:00
Freagarach 6ee43b6bcd Allow free upgrades and technologies.
And use that for the seleucids reform/traditional tech.

Noticed by @wraitii
Differential revision: D2654
Reviewed by: @bb
Comments by: @Stan
This was SVN commit r24431.
2020-12-19 20:11:57 +00:00
Freagarach aeb3c284f2 Fix Danubis trigger.
In e98fce58a6 the DistanceBetweenEntities function was placed under a
helper, but not all maps were fixed.

This was SVN commit r24430.
2020-12-19 15:57:04 +00:00
wraitii 70ec7812de Improve UnitMotion behaviour when working around obstructions.
This improves behaviour when units need to go around a concave obstacle.
They would tend to clump inside the 'dead-end' before realising they
needed to go around. This was rather easy to trigger on Acropolis. See
included Unit Motion Integration Test.

The cause is the logic that removed the next long waypoint when
obstructed. While that behaviour is desirable, removing too many
waypoints means the unit tries to short-path, using a small domain
range, to a goal that's impassable, meaning they go as close as they can
in Euclidian distance, i.e. towards the dead end.

This changes that behaviour by only deleting waypoints within a certain
distance from the entity, scaling with search-space range. It's tricky
to find a good compromise between performance and behaviour here, but
the values I've picked seem OK.

However, the fact that the entity would ultimately remove all waypoints
and thus trigger a full path recomputation was actually a feature,
inherited from D2754 / 892f97743b. This diff therefore handles that
explicitly, doing so on a more regular basis to behave better overall.

As a further cleanup, "m_FailedPathComputations" is incremented in
HandleObstructedMove, as it is quite possible to never increment it in
PathResult despite not getting actionnable paths. This thus renames it
to m_FailedMovements, and uses the opportunity to clean up PathResult(),
by only having one path for both short and long-range paths. Further,
PathResult now does not immediately request new paths, leaving that to
Move(), to avoid requesting transient paths that aren't actionnable.
This also makes it possible to revert 9e41ff39fc. It requires increasing
the MAX_FAILED variable, or more units get stuck as they reach the max
more often.

The search-space expansion is slightly slowed, and with a little more
delay, as a performance optimisation. From testing, this doesn't impact
real movement much as units short paths tend to be invalidated by the
next turn, as other units move, anyways.

Clarify comment around the vertex-pathfinder search-space bounds hack,
and ensure it isn't used for the very worst cases of units being stuck,
as it could be a pessimisation then.

Finally, this explicits a 2011 hack where if the long-pathfinder fails
to return a valid path the goal's center is used directly. This happens
when the goal is unreachable to the long-pathfinder, which may be
because it is actually unreachable or because only the short-pathfinder
can reach it. In those situations, the hack allows a last-ditch attempt
at reaching it before failing to move entirely. Performance wise, this
is faster overall for actually unreachable goals, since it skips all the
intermediate steps. For reachable goals, it might be occasionally
slower, but that case is quite rare (certainly rarer than unreachable
goals).

Reported By: Angen
Fixes #5795

Differential Revision: https://code.wildfiregames.com/D3203
This was SVN commit r24429.
2020-12-19 10:45:07 +00:00
wraitii cd882c1669 Commit new files forgotten in 5b46ce0778
I of course forgot to `svn add` these. Fixes 5b46ce0778

This was SVN commit r24428.
2020-12-19 09:48:11 +00:00
wraitii 5b46ce0778 Use templates to replace explicit serialization helpers.
By using templates appripriately we can remove the need for explicit
specification of serializers, making it easier to serialize container
types and to write new serialization helpers.

Direct serialization calls haven't been replaced in this diff.

Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3207
This was SVN commit r24427.
2020-12-19 09:10:37 +00:00
Stan 974d4a4e25 [gameplay] Add a flaming status effect to iber champion cavalry
Accepted by: @borg-
Stats by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2737
This was SVN commit r24426.
2020-12-18 23:46:01 +00:00
Stan a2ad93662d Allow flying objects to be stationary
Discussed with: @Angen, @Freagarach

Differential Revision: https://code.wildfiregames.com/D2453
This was SVN commit r24425.
2020-12-18 22:35:31 +00:00
Freagarach 8c8dab6573 Part of the same rebase missing.
This was SVN commit r24424.
2020-12-18 15:14:21 +00:00
Freagarach 12bdbecd2b Fix production queue of previous commit.
Missed part of a rebase -_-' when committing 2452e3fb97.

This was SVN commit r24423.
2020-12-18 15:11:01 +00:00
Freagarach 2452e3fb97 Tweak Kush Amun temple.
Deprecates elite healer upgrade in favour of training elite healers at
the Amun temple.
Increases stats of Amun temple slightly. Removes production queue of
(unbuildable) Kushite shrine.

Lets Kushites start with a healer on random maps :) (To signify the
importance of the political power of the priesthood of Amun.)

Patch by: @Nescio
Differential revision: D2843
Reviewed by: @borg-
This was SVN commit r24422.
2020-12-18 14:41:51 +00:00
wraitii 25c4bb66f6 Fix persisted matchsettings issues in GameSetup.
Fixed:
- The gamesetup no longer becomes entirely unusable when there is an
error parsing the map data.
- The match settings aren't overwritten in case of an error
- The PopCap / StartingResources control properly check for map data
existence, fixing an underlying error.

Differential Revision: https://code.wildfiregames.com/D3053
This was SVN commit r24421.
2020-12-18 08:40:38 +00:00
Stan 9eb5f338cd [gameplay] reduce slinger attack speed.
Patch by: @borg-
Reviewed by: @ValihrAnt
Differential Revision: https://code.wildfiregames.com/D3232
This was SVN commit r24418.
2020-12-18 00:53:25 +00:00
Stan 3b1bce759b Restore the briton wonder stats for balance.
Add a new model following @genava55's suggestions
Thread:
* https://wildfiregames.com/forum/topic/27889-task-brit-wonder/

Fixes: #5622 bc9116cdfb

This was SVN commit r24417.
2020-12-18 00:05:27 +00:00
bb 070492750c Don't remove const keywords, but update years
This was SVN commit r24416.
2020-12-17 23:43:09 +00:00
bb 42c70cd508 Let units take time actual time for turning while moving. This limits the possibility of "dancing" (making short moves to avoid being hit by arrows) beyond only patrolling.
Reviewed By: wraitii
Gameplay Tests By: FeldFeld
Comments By: Freagarach, Angen
Differential Revision: D2837
refs: #5106

This was SVN commit r24415.
2020-12-17 22:54:14 +00:00
vladislavbelov 051807ffae Using same value for unit and terrain ambient colors for scenarios and tutorial maps.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3160
This was SVN commit r24414.
2020-12-17 22:17:51 +00:00
Stan 596155cede Use C++17 std::size instead of sizeOf
This was SVN commit r24413.
2020-12-17 22:17:46 +00:00
Stan 5bb703bc75 Fix style issues in ea38089853
This was SVN commit r24412.
2020-12-17 22:04:03 +00:00
vladislavbelov ff18f3dbd9 Using same value for unit and terrain ambient colors for skirmishes maps.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3142
This was SVN commit r24411.
2020-12-17 22:02:13 +00:00
Stan 387b2106ae Fix style issues in archive_zip code. test for more things.
This was SVN commit r24410.
2020-12-17 22:00:31 +00:00
Stan de1a42d937 Fix test macro introduced in b6114adc8d
This was SVN commit r24409.
2020-12-17 21:17:16 +00:00
bb 686686f2a4 Make buildingAI's arrowcount more transparent
Reviewed By: Freagarach
Comments By: wraitii, Stan
Differential Revision: D3198
This was SVN commit r24408.
2020-12-17 19:55:22 +00:00
wraitii 82d079d06c Add a Dev Overlay checkbox to activate RejoinTest from the session.
This makes this feature, very useful for checking for OOS, more easily
accessible.

Differential Revision: https://code.wildfiregames.com/D3199
This was SVN commit r24407.
2020-12-17 17:53:13 +00:00
wraitii e22a915351 Add a function to query a global object, including JS classes, from C++
The latter are not properties of the global object but stored within the
global lexical environment.
This is not currently needed, but will be useful for future diffs.
Update Vector2D/3D querying.

Taken from D2746

This was SVN commit r24406.
2020-12-17 17:51:18 +00:00
wraitii 25b8cfc6b8 Only create construction previews when committed.
Missed in bdbd0b9dbf, meaning after serialization uncommited foundations
preview were incorrectly created. This was generally invisible, except
when a decal was present (e.g. with ptolemies).

This was SVN commit r24405.
2020-12-17 17:40:35 +00:00
Freagarach 2e0b9d7a9b Do not let UnitAI listen to HealthChanged messages anymore.
In earlier revisions units fled more slowly with fewer hitpoints.
Since def47cb7ae this is not the case anymore.

Differential revision: D3229
Reviewed by: @wraitii
This was SVN commit r24404.
2020-12-17 13:09:49 +00:00
Freagarach bc4e75c75c Reverts 2603703d66
Either the default handlers _are_ needed or we don't care much. But
removing (at least the motion one) may give errors.

This was SVN commit r24403.
2020-12-17 12:56:21 +00:00
Freagarach 2603703d66 Remove some unnecessary default handlers.
`ConstructionFinished` is obselete since 88dc6d8e1e.
These messages are only sent when the entity is in a specific state (or
states).

Differential revision: D3044
Discussed with @wraitii

This was SVN commit r24402.
2020-12-17 11:56:18 +00:00
Freagarach 88bc450b79 Correct some strings in the GUI.
Patch by: @Nescio
Differential Revision: D3007
This was SVN commit r24401.
2020-12-17 11:47:04 +00:00
bb 3726db16b1 Treat code between [] and {} as one blob for translations.
Agreed By: wraitii
Comments By: elexis
Differential Revision: D3032
Obsoletes: D2451

This was SVN commit r24400.
2020-12-16 21:12:54 +00:00
Freagarach d257122bb4 Fix typo from 2dd223af29.
This was SVN commit r24399.
2020-12-16 19:40:45 +00:00
wraitii dd0b56c8aa Replace DISCARD macro with ignore_result template.
Fixes eb7940b418.
As reported by Vladislav, there is possibly confusion on what exactly is
being ignored when there are multiple statements after DISCARD. Explicit
wrapping avoids that.

Differential Revision: https://code.wildfiregames.com/D3206
This was SVN commit r24397.
2020-12-15 09:03:44 +00:00
wraitii 38c3827d3b Fix UnitMotion updating the visual Actor with the target speed, not the real speed.
Fixes D1901 / a1dc9cadd8

Noted by bb also in D3021

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3221
This was SVN commit r24396.
2020-12-15 07:44:05 +00:00
Freagarach 7f77cf2f3e Move PopulationBonus from cmpCost to new cmpPopulation.
Since PopBonus is not a cost.

Patch by: @lonehawk
Differential Revision: D2948
Comments by: @Angen, @Nescio, @wraitii
Closes #4081

This was SVN commit r24394.
2020-12-14 18:17:59 +00:00
Freagarach 014c2922f2 Give Fortress a territory root.
And consequently reduce the territory radius by 20%.

Patch by: @Nescio
Differential Revision: D1762
Reviewed by: @borg-, @ValihrAnt
Comments by: @elexis
This was SVN commit r24393.
2020-12-14 18:05:41 +00:00
wraitii b0c3037abc Fix JS incremental GC issue (destroyed realms are not collected).
Further work would be nice to be able to only collect zones that
probably have garbage to collect, but that likely requires splitting our
contexts in more zones.

0 A.D. had been running in incremental GC since 1.8.5. With the SM78
upgrade, I changed this to the new default "ZONE_INCREMENTAL", which GCs
specific zones.
However, I failed to realise that deleted scriptInterfaces and their
corresponding zones would no longer be collected.
This corrects for that.

Fixes d92a2118b0.

Refs #5861

Differential Revision: https://code.wildfiregames.com/D3220
This was SVN commit r24392.
2020-12-14 08:51:29 +00:00
Freagarach 21fa835cff Move a few unit actors and icons.
- move infantry_crossbowman_c.xml from athenians/ to macedonians/
- renames kushites/camelry_* to kushites/camel_*
- renames kushites/infantry_clubman_* to kushites/infantry_maceman_*
- renames persians/cavalry_swordsman_* to persians/cavalry_axeman_*
- renames ptolemies/camelry_* to ptolemies/camel_*

Patch by: @Nescio
Differential Revision: D2688
This was SVN commit r24391.
2020-12-14 08:07:44 +00:00
s0600204 2e27ece0a0 (2/2) Update premake5 to Alpha 15 - shell scripts
Update build shell scripts to use premake5 `gmake2.*` directories.
(The old `gmake.*` directories have been removed from premake5.)


Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24388.
2020-12-14 02:22:58 +00:00
s0600204 a0d2112195 (1/2) Update premake5 to Alpha 15 - premake5 files
See `CHANGES.txt` below for the upstream-composed list of changes.


`premake5.exe` built by Stan

Accepted By: Stan (for Windows)
Trac Tickets: #5869
Differential Revision: https://code.wildfiregames.com/D3219
This was SVN commit r24387.
2020-12-14 02:17:47 +00:00
s0600204 5190bd4c56 Remove old premake5 vs20XX make files
These files contain instructions to build premake and its bundled
dependancies
on versions of Visual Studio we no longer support.


Refs: D3219

This was SVN commit r24386.
2020-12-14 01:41:50 +00:00
wraitii df9f0bef20 Run a short-pathfinder call occasionally to get unstuck in some situations.
Units can get stuck on passable navcells surrounded by impassable
navcells because the short-pathfinder got them there, and then ordering
them to move far way uses the long-pathfinder.
We can safely run a short-pathfinder call, using the same logic as in
D1424, to get unstuck in at least some of those situations.

Reported by: Angen
Differential Revision: https://code.wildfiregames.com/D3215
This was SVN commit r24385.
2020-12-13 15:25:16 +00:00