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.
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.
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.
This includes:
- some build fixes
- Jenkins pipelines, in use since January
- a revamped DMG build script, including dmgbuild configuration by Tobbi
and a tweak by norsnor (D2650)
Differential Revision: https://code.wildfiregames.com/D2523
This was SVN commit r23676.
Corrects the name of the Seleucid champion pikeman: “silver shields” is
the name of their corps, they fought as phalangites, thus there is no
need to specify that.
Patch by: @Nescio
Comments by: @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2736
This was SVN commit r23674.
Fixed hand position on infantry pikeman.
Adjusted Shield position in some howdah.
Replaced Shield cloak on an outdated (to be updated) shield
This was SVN commit r23646.
Differential Revision: https://code.wildfiregames.com/D2162
Patch by: Freagarach
Replace current fleeing order with new fleeing order instead adding new
one on top of current fleeing order, what was causing fleeing unit to
move further away as it should.
This was SVN commit r23637.
Differential Revision: https://code.wildfiregames.com/D2706Fixes: #5712
Correctly check for timer when regeneration rate is affected by
modifications but not capture points.
Move frequently affected values with modifications called by timer to
prototype.
Recompute all cached values affected by modifications when ownership is
transfered.
Recompute cached values before initialising capture points first time
fixing e16c4c4800.
This was SVN commit r23633.
Cleaned some textures using new blender 2.81 Feature Denoiser, while
also replacing material from High poly to low poly baking to Direct
Rendering.
Added some new variants and improved patterns with the help of @Lion and
@Stan.
Both @Stan and i handled the baking of the shields.
Including some animations corrections.
Renamed shields from Basic, Elite, Advanced rank to _## following a
better naming schema on the textures.
*New:
Added aprons (Aspis shield hellenic faction cloaks).
17 new variants, after this committ cleaning of the old aprons will be
done deleting old unuseable dds files and meshes.
Baked using direct render and the new alpha material.
Animated mesh for use with both Hoplite and Swordsman (Relax/Ready
variants)
Let me know if there's any issue.
Will continue adding/cleaning the rest of the aspis in the meantime.
This was SVN commit r23623.
f19a8d6b41 moved sorting classes to template and according to lines 561
and 574 in that commit, it was intended to not use sorting in case of
forced columnar formation.
Fixing oversight at lines 660 and 662 in that commit by removing this.
word so cavalry will be put to the front always.
Noticed in D2707 after @elexis mentioned behaviour change on unused
variable.
Differential Revision: https://code.wildfiregames.com/D2711
This was SVN commit r23613.
Align footprints/obstruction/visual garrison spots/statusbar height with
the visual actors in use.
Gate doors got a little wider (since their visual actors allows that),
so this might help pathing a little.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2502
This was SVN commit r23609.
Reduce the number of Position/Anchor entries by setting "pitch" in
template_unit instead
pitch Elephants, traders and some cows
pitch-roll catafalques
The solution is not ideal for catafalques, traders and chariots, since
they consist of different parts that want different values. Probably
needs subunits to fix.
Patch By: Nescio
Differential Revision: D2705
This was SVN commit r23607.
Replaces texture2DLod (deprecated in 1.30, but available in 1.20) by
textureLod and updates the shader version to 1.30. texture2DLod was
added in 113b1c49b9 as the part of FXAA.
Tested By: Imarok, OptimusShepard
Differential Revision: https://code.wildfiregames.com/D2699
This was SVN commit r23606.
Sort keys from g_UnitActions once and store in global variable saving
around 40 microseconds in every tick and mouse event required to
determine action of unit.
Differential Revision: https://code.wildfiregames.com/D2637
Patch by: Freagarach
Reviewed by: Angen
Comments by: elexis
This was SVN commit r23602.
Adjusted mesh of the elephants to match the new howdwah and cushion
variants
Moved howdah and renamed properly to keep the props in a single folder.
Added new turret pikeman animations while attacking melee.
Added Infant elephant animations.
Replaced Hannibal turret mesh with a new howdah with same shields.
This was SVN commit r23597.
Check for existance of requested type in event message, since 6814a983e1
stoped sending resource codes with 0 tribute and that was not even
guaranteed to get before through another options how to trigger tribute
event.
Differential Revision: https://code.wildfiregames.com/D2703
Patch by: Freagarach
Reviewed by: Angen
Comments by: elexis
This was SVN commit r23596.
Use Archer-Fem for female variants because there were two Archer-Relax
variants with different animation sets introduced in d3cc5523ae.
Fix cape attack animation for classic archer variant following
676bc42647, introduced by not updating in 61b8a32ad5.
Differential Revision: https://code.wildfiregames.com/D2701
Reviewed by: Stan
This was SVN commit r23595.
This allows Atlas not to rely on eval() to get access to the attack
component.
Add a quick test for the added method.
This fixes the animation speed matching that of the actor instead of the
template.
Remove some dead code after af2abb8cbfFixes: #5129
Reviewed by: @Angen
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D2464
This was SVN commit r23592.
Remove unused variable since e16c4c4800 and call for ranged manager.
Transform comment to javadoc.
var -> let
Differential Revision: https://code.wildfiregames.com/D2631
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23587.
Remove redundant comments.
var -> let
quote object properties
fix intendation
fix some spacing
use javadoc for function description
remove one line brackets
Differential Revision: https://code.wildfiregames.com/D2069
Patch by: Freagarach
Reviewed by: Angen
Comments by: elexis, Nescio, Stan
This was SVN commit r23584.
When a formation that is given the order to attack another formation is
already in range the formation controller of the target is passed as the
target for its members.
Use same behaviour when formation walks into another formation`s range.
Differential Revision: https://code.wildfiregames.com/D2692
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23582.
Remove regression after 34138a7764.
Make ready status message bold as any other system messages are bold.
Differential Revision: https://code.wildfiregames.com/D2663
Reviewed by: elexis
Comments by: nani, Freagarach
This was SVN commit r23581.
This patch sets selection groups for all shared structures in the
generic parent templates of structures.
Clicking behaviour:
single click: select the clicked structure
double click: select all structures of the same selection group within
view that are owned by this player (e.g. all owned barracks across
civilisations)
triple click: select all structures of exactly the same file within view
that are owned by this player (e. g. all owned barracks of the same
civilisation)
Differential Revision: https://code.wildfiregames.com/D2675
Patch by: Nescio
Reviewed by: ValihrAnt
This was SVN commit r23580.
Remove builder component from worker elephant as it was not able to
place any foundation.
Add aura, that speeds up builder rate for all workers by 25% inside 15
range.
Differential Revision: https://code.wildfiregames.com/D2511
Patch by: Nescio
Reviewed by: Feldfeld
Comments by: elexis, Stan
This was SVN commit r23579.
Due to recent Elephant update for having the blend file of the whole
elephants and have the proper workspace for animating riders it was
updated in a recent commit. However the african forest elephant mesh
wasn't properly adapting to the new UV mapping since it wasn't properly
alligned.
Thread:
https://wildfiregames.com/forum/index.php?/topic/27906-elephant-uv-mapping/&tab=comments#comment-393918
This was SVN commit r23574.
Use `CheckFormationTargetAttackRange` instead `CheckTargetAttackRange`
for formations to not use that ugly workaround with passing `target,
target`.
Use `MoveFormationToTargetAttackRange` to achieve better looking
behaviour when moving formation to target range.
Differential Revision: https://code.wildfiregames.com/D2015
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23571.
Merge selection group for women.
Merge selection group for healers.
Add selection group for merchant ship and fishing ship.
Add selection group for trader and slave as well.
Differential Revision: https://code.wildfiregames.com/D2677
Patch by: Nescio
Reviewed by: Freagarach
This was SVN commit r23570.
Differential Revision: https://code.wildfiregames.com/D2517
Reviewed by: Freagarach
Comments by: elexis, Stan
Fixes: #5610#5656
Introduce likelyFailure check in the movementupdate for chasing state
missing since 32e8ed51aa.
Use new order and substate for Chasing to get into the wanted range and
avoid that way issue with running - walking tracking or animation
variants.
Fixing issue when attacker would not react to the death of the target
while chasing it in stances where results for abandoning chasing are
always false and also do not rely on timer ending chasing for the rest
of stances.
This was SVN commit r23566.
Compared to other occurrences in code base, it makes sense to return
undefined rather then just empty return.
Differential Revision: https://code.wildfiregames.com/D2665
Patch by: Freagarach
This was SVN commit r23563.
Use the opportunity to rename the lib from cppformat to fmt, refs #4148.
Patch By: adrian
Rebased By: s0600204
Differential Revision: https://code.wildfiregames.com/D2613
This was SVN commit r23562.
Structure loot is standardized to 20% of cost.
Loot is provided from resources that were required for constructing.
Exception is field, which costs wood but grants food as loot.
Removed not needed elements.
Related D2605
Differential Revision: https://code.wildfiregames.com/D2659
Patch by: Nescio
Reviewed by: ValihrAnt
This was SVN commit r23559.
Remove argument passed to timer, which was not used.
Remove 4-th argument passed into SelectAnimation, that takes only 3
arguments.
Differential Revision: https://code.wildfiregames.com/D2679
Patch by: Freagarach
This was SVN commit r23557.
Use tabs for intendation.
Remove trailing zeroes.
Alphabetize modifications, except for damage types and resources, which
have a fixed order (hack, pierce, crush and food, wood, stone, metal,
respectively).
Differential Revision: https://code.wildfiregames.com/D2000
Patch by: Nescio
Reviewed by: Freagarach
Comments by: elexis, Stan
This was SVN commit r23556.
Use the Persian cavalry for pers as well (Currently only used by
Seleucids)
Move the chariot to an unused unit
Fix the specicif names,
Move the icon from sele_ to pers_
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2530
This was SVN commit r23553.
Reduce buildtime of kush_blemmye_camp and kush_nuba_village to 150.
Remove not needed BuildTime element from cart_embassy.
Differential Revision: https://code.wildfiregames.com/D1863
Patch by: Nescio
Reviewed by: Feldfeld
This was SVN commit r23547.
Implement support for experience trickle. Provide 1 experience trickle
when unit is garrisoned in barracks.
Differential Revision: https://code.wildfiregames.com/D1245
Patch by: @temple
Reviewed by: @wraitii
Comments by: mimo, elexis, Freagarach, Stan
This was SVN commit r23541.
Move duplicating code to functions.
Cleaner, nicer, easier to extend.
Differential Revision: https://code.wildfiregames.com/D2655
This was SVN commit r23536.