Formation controllers were not always waiting on their members correctly
because the "finishedOrder" check was being reset in the wrong place.
This happened particularly with queued orders.
This merges the "finishedOrder" and the "InPosition" logic.
Reported by: elexis
Based on a patch by: Freagarach
Tested by: Freagarach
Reviewed By: Angen
Fixes#3274
Differential Revision: https://code.wildfiregames.com/D2702
This was SVN commit r23744.
423b3cbcaa Moved the message sent that an entity garrisons from
`PerformGarrison` to `Garrison`. However, when an entity is
autogarrisoned from `ProductionQueue` `PerformGarrison` is called thus
not triggering the message. When ejecting the entity from the structure
there is a message sent that the entity is removed, thus allowing for a
negative amount of archers/arrows in `BuildingAI` (see
423b3cbcaa#42654).
Note that `PerformGarrison` was explicitly split in 2102648f7c when
introducing autogarrisoning. It probably has something to do with the
position, since that was split. But I couldn't find any reason why it
cannot be used now.
A side effect of this is that when autogarrisoning an entity with
visible garrison points those will be occupied as well now.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2790
This was SVN commit r23743.
This lets unitAI FSM states correctly handle target entity renaming by
processing a message when that happens. The default behaviour is to
leave-reenter the state, which re-runs sanity checks and optionally
picks a better behaviour.
UnitMotion is still not made aware of entity renaming, as the
leave-enter makes it irrelevant in practice. It still may be a good idea
to implement that someday.
Fixes the concern raised at de1bb8a766.
Fixes#5584
Comments by: bb, Freagarach
Tested by: Freagarach
Reported by: minohaka, bb, Freagarach, gameboy (error in the original
commit)
Differential Revision: https://code.wildfiregames.com/D2735
This was SVN commit r23742.
The wrong components were mocked, but the test did not fail as the
asserts were not called.
Add a check that tests are indeed called here.
Patch by: Freagarach
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D2787
This was SVN commit r23738.
Citizen, Champion and Hero cavalry now have the same 2x walk speed
multiplier.
Speed difference between cavalry type unchanged.
Patch by: Nescio
Approved by: borg-, ValihrAnt, wraitii
Differential Revision: https://code.wildfiregames.com/D2596
This was SVN commit r23737.
Entities should look for a new foundation near the targeted one, not
near themselves, when they cannot proceed with constructing the original
target.
This behaviour matches expectations from players better, since the
entity will go closer to where the player intended.
It also rejoins behaviour when gathering introduced in 7d53fb19a2.
For now, keep looking near the entity too if there are no obvious picks
at the destination, but this could be done only within a certain range
(see D2525).
Comments by: Angen
Differential Revision: https://code.wildfiregames.com/D2753
This was SVN commit r23734.
This moves some resource committing logic from `UnitAI` to
`ResourceGatherer`.
Allows easier modification by modders, and cleaner separation of
concerns.
Check if the carried resources actually changed before sending the
message.
Make all paths through Repair.ConstructionFinished return resources.
Patch by: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2664
This was SVN commit r23733.
This is the same commit as 2abd9cead2 / D1418, fixing noted issues.
This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.
De-activate the obstruction of visibly-garrisoned entities, fixing the
2nd issue.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.
Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.
Based on work by temple
Fixes#2679.
Fixes#5151.
Differential Revision: https://code.wildfiregames.com/D2775
This was SVN commit r23731.
This appears to comply with "This can be changed once all settings
belong to a section." from afecbf02f3 which did not set these hotkeys
under session.
Patch By: Nescio
Differential Revision: D2616
This was SVN commit r23726.
Added in df6fceba62 to (most likely) have some control over brightness,
this conflicted with dimming utilities and would not play nice with
starting 0 A.D. in windowed mode.
If gamma handling were to be reintroduced later, it should only affect
the 0 A.D. window.
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1976
This was SVN commit r23722.
PersistMatchSettings are broken by this commit.
Comments By: leper, itms, Stan, vladislav, elexis
Patch By: Nescio
Differential Revision: D1042
This was SVN commit r23719.
While at it remove the cap from the name, according to the art naming
conventions.
Noticed and proposed by Nescio in D1042
Comments by: elexis, stan, vladislav
This was SVN commit r23717.
Before this change, civilisation could train champions in captured
barracks only if captured barracks allowed to train that unit, what was
not always the case so some champions were allowed to be trained in
captured barracks and some was not.
Differential Revision: https://code.wildfiregames.com/D2547
Patch by: Nescio
Reviewed by: ValihrAnt
This was SVN commit r23715.
Player-testing has revealed QA issues, so reverting these for now.
Differential Revision: https://code.wildfiregames.com/D2773
This was SVN commit r23714.
0363202a20 actually fixed the particular issue of upgrading a long-wall
to a gate by correctly handling it in UnitAI, so this code, which didn't
work, is no longer needed anyways.
Noticed by running units_demo which seems to have skirmish replacer
placeholders.
This was SVN commit r23711.
This addresses two related issues:
- Units visibly garrisoned on gates keep the gate open.
- Units visibly garrisoned on entities keep their pathfinding blocker
flags.
Remove the block-movement flag from visibly garrisoned entities.
Keep a list of entities that cannot move and thus should not count
towards gate-opening logic.
Packing logic is kept separate: it is more related to entities having
'alternate forms' with different capabilities than being currently
incapable of moving.
Based on work by temple
Comments by: Freagarach
Tested by: Nescio
Fixes#2679Fixes#5151
Differential Revision: https://code.wildfiregames.com/D1418
This was SVN commit r23710.
This lets sunit AI FSM states correctly handle target entity renaming by
processing a message when that happens. The default behaviour is to
leave-reenter the state, which re-runs sanity checks and optionally
picks a better behaviour.
UnitMotion is still not made aware of entity renaming, as the
leave-enter makes it irrelevant in practice. It still may be a good idea
to implement that someday.
Fixes the concern raised at de1bb8a766.
Fixes#5584
Comments by: bb, Freagarach
Reported by: minohaka, bb, Freagarach
Differential Revision: https://code.wildfiregames.com/D2735
This was SVN commit r23708.
Change HotkeyPress event to be non-repeating (HotkeyDown to replace the
repeating case)
Fix shiftlag
Make toggle hotkeys only respond to the first SDL event.
Many iterations of review by: elexis
Test done by: Imarok
Comments By: vladislav, Stan
Reviewed By: wraitii
Fixes: #5055
Differential Revision: https://code.wildfiregames.com/D1398
This was SVN commit r23701.
This fixes an off-by-one error that led to entities sometimes getting
stuck against obstructions.
It also increases the max-range of the short pathfinder to help entities
find their way around corridors and house blocks.
Fixes 2ff8614ce2 (off-by-one error) and reverts the range changes from
32e8ed51aa
Reported By: Freagarach
Fixes#5586 . Refs #5624
Differential Revision: https://code.wildfiregames.com/D2754
This was SVN commit r23699.
Since 16b452cf91, it is possible for units to be sent "Attacked"
messages even though they cannot be attacked
(e.g. a non-capturable being the target of a Capture attack effect).
These messages are spurious and should not be sent.
Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D2758
This was SVN commit r23698.
Needs ReviewPublic
Differential Revision: https://code.wildfiregames.com/D2707
Comments by: elexis, Stan, wraitii, bb
Remove variables were not needed to be serialised or stored inside
component
Create `variablesToSerialize` to hold list of variables, that need to be
Serialized.
Rename `this.template.Animations` to `this.template.AnimationVariants`
(and anything related) as it does not hold animation names but names of
animation variants what is misleading.
Do not create timer when deserializing as that would cause oos and timer
already exists.
this.Init has to be called from Deserialize because it is not called by
default
This was SVN commit r23694.
Compare matrix values against `undefined` instead of relying on `||`
because `||` does not work as intended when distance is `0`.
Differential Revision: https://code.wildfiregames.com/D2761Fixes: #5761
This was SVN commit r23693.
Some languages like sk in [[SVN:21907]] have changed crucial line with
information about how many plurals language uses and how to calculate
correct one. However in plural_forms this line could not be matched with
implemented functions so as result object with default settings have
been returned what resulted in using only singular for translatePlural
calls.
Affected languages (12):
sk, lt, uk, cs, pl, ro, mk, he, ga, cy, be, br
I am leaving old variants as they can be useful for another languages.
Differential Revision: https://code.wildfiregames.com/D2751
Comments by: wraitii
This was SVN commit r23690.
Use a suffix for bundled libraries in order to rebuild them when we
patch them, refs #2551.
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D2649
This was SVN commit r23686.
Also resolves whitespace issue in WallSet component breaking structree
and rmgen
wallbuilder when wall curve pieces are listed separated with newlines (&
tabs)
instead of single spaces.
Requested by: Nescio
Refs: #2944, D900
This was SVN commit r23684.
.json files in simulation/data/template/helpers/damage_types and
status_effects will be used to internationalise damage types and status
effects, as well as share common text.
Fixes the order of damage types being inconsistent.
Add the possibility for i10n xml extractor to set a custom context.
Fixes#4801
Related to D2296.
Featuring work from: Freagarach
Differential Revision: https://code.wildfiregames.com/D2337
This was SVN commit r23681.
Use a fixed range delta around the missile hit-location for neighboring
entities to damage.
Use a common query for GAIA and non-GAIA entities.
Do not presume attackable entities have Health.
Fix an issue where gaia entities were returned twice.
This fixes concerns reported by elexis at 38b2e37a61 and by Freagarach
at 16b452cf91.
Differential Revision: https://code.wildfiregames.com/D2738
This was SVN commit r23680.