1
0
forked from 0ad/0ad
Commit Graph

20925 Commits

Author SHA1 Message Date
6f70a901f8 Remove duplicated call in tile rendering for TerrainOverlay.
Patch By: vinhig
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2811
This was SVN commit r23767.
2020-06-12 20:52:18 +00:00
fd8a47f5d9 Moves calculations of bounds for fixed shadows to a separate function.
Reduces complexity of the SetupFrame function. Fixed shadows were added
in 8e48e1b17e.

This was SVN commit r23766.
2020-06-12 20:09:08 +00:00
06bf3a8739 Adds GLSL shaders of overlay lines.
We were using ARB shaders in GLSL mode for overlay lines (unit
selection, ranges and so on).

Tested By: Freagarach, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2621
This was SVN commit r23765.
2020-06-12 15:39:44 +00:00
14b5cf0673 Increase the max # of embassies from 2 to 3.
Carthaginians currently rely on embassies to be competitive, and
restricting them to 2 is too limiting for balance purposes.
This change also affects Kushites structures which was also approved by
borg- and ValihrAnt.

Further, the original choice of 2 seems to have been to force
Carthaginian players to make a choice, but since one can delete an
existing embassy and pick another, that seems somewhat artificially
restricting.

Patch by: borg-
Approved By: ValihrAnt, PhyZic
Differential Revision: https://code.wildfiregames.com/D2798
This was SVN commit r23764.
2020-06-12 15:32:35 +00:00
b4df84e05d Fix an issue with the celt_trader because the triangle was too far below the ground and that caused flickering issues. Ideally at some point we will remove the limitation for prop only meshes to have triangles. While at it restore the units back to meters.
Thread:
https://wildfiregames.com/forum/index.php?/topic/28310-flickering/page/3/&tab=comments#comment-398652
Reported by: Mr.lie
Debugging with: @vladislavbelov

This was SVN commit r23762.
2020-06-12 07:03:23 +00:00
27647e61c4 Play a sound when walls are upgraded to gates.
This was SVN commit r23761.
2020-06-11 07:00:52 +00:00
Angen
e181614215 [PetraAI] Remove redundant branch introduced in f1610ce4fa
Branches introduced in f1610ce4fa had commented part to consider
stonewalls as blocking targets only if there have been siege units in
army.
Commented part was removed in ade8bcc0b8.

Differential Revision: https://code.wildfiregames.com/D2804
This was SVN commit r23760.
2020-06-10 18:27:13 +00:00
Angen
267ccd3127 [PetraAI] Do not try to attack entities which can't be attacked.
Avoid trying to attack unattackable entities based on restricted classes
from Attack component.

Differential Revision: https://code.wildfiregames.com/D2111
Patch by: Freagarach
Reviewed by: Angen
This was SVN commit r23759.
2020-06-10 18:23:41 +00:00
Angen
3336d6d543 Adjust trader footprints
Match trader footprint with mesh shape for nicer visual effect.
This also removes footprint inconsistency among camels.

Patch by: Nescio
Reviewed by: Angen
Comments by: Feldfeld
Differential Revision: https://code.wildfiregames.com/D2640
This was SVN commit r23758.
2020-06-10 18:13:22 +00:00
ea67b79667 Handle stacking status effects, modifiers, some related fixes.
Continuation of work on status effects, following 82a5ab6d19.

Allow techs to modify properties.
Enable different behaviour when status effects would stack, such as
extending the duration or stacking the effects.
Fix GUI issue with more than 5 status effects.
Improve tooltips.
Let status effects show a different tooltip for the attacker and the
receiver.

Patch by: Freagarach
Reviewed By: wraitii, Angen (on an older differential).
Differential Revision: https://code.wildfiregames.com/D2296
This was SVN commit r23757.
2020-06-09 11:47:16 +00:00
5176f848b8 Fixes missing deletion of files in 409c436ae2.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23755.
2020-06-08 22:36:19 +00:00
409c436ae2 Remove obsolete GetVideoMode platform-specifics, replaces by platform-agnostic SDL2`s APIs.
Before and after the commit we don't support multiple displays and HiDPI
properly.

Patch By: linkmauve
Tested By: Angen, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2476
This was SVN commit r23754.
2020-06-08 17:49:26 +00:00
f3a49014fb Make rams less effective by reducing speed and preventing attacks on organics.
Rams are currently evry strong. This nerfs them by reducing their speed
slightly and by preventing them from attacking organic units.

The speed change was agreed by ValihrAnt, the organic restriction is
more experimental and might be reverted in favour of a "reduced damage"
approach (see D2684) if it proves too limiting.

Patch By: borg-
Approved by: wraitii, ValihrAnt (mostly on the speed debuf)
Differential Revision: https://code.wildfiregames.com/D2782
This was SVN commit r23753.
2020-06-08 15:06:13 +00:00
dab3bbc2ca Remove 'Structure' preferred class from elephants, shorten max range.
Elephants were designed to prefer targeting structures. This is not
particularly historically accurate, and makes them rather annoying to
use against enemy units, reducing their efficiency.

This simply removes the preferred class, making elephants easier to
handle while keeping their usage as siege units for some civilisations.

Max-range is reduced slightly as the previous one was extremely large
for a melee unit.

Approved by: Nescio, wraitii
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D2786
This was SVN commit r23752.
2020-06-08 14:43:50 +00:00
4d3a2a1a30 Remove debug change in b62308a301
Because it's no fun if your fixes don't need fixing'

Reported by: Stan
This was SVN commit r23749.
2020-06-07 20:16:34 +00:00
b62308a301 Fix error in e9361705ae.
The HWDetect changes were not working properly.

Reported by: Nescio
Tested by: Nescio
Differential Revision: https://code.wildfiregames.com/D2799
This was SVN commit r23748.
2020-06-07 20:11:37 +00:00
e9361705ae Refactor HWDetect and rendering options setup.
Remove duplication when setting graphic options by reading the configDB
directly.
Properly protect the ModIO config keys.

Approved By: linkmauve
Refs #5538

Differential Revision: https://code.wildfiregames.com/D1931
This was SVN commit r23747.
2020-06-07 13:16:57 +00:00
d1d4a1d6b9 Train champion cavalry at stable.
Remove champions from the fortress. This mimics the Maurian elephant
stable.

Approved By: ValihrAnt, Feldfeld, borg-
Differential Revision: https://code.wildfiregames.com/D2532
This was SVN commit r23746.
2020-06-07 13:09:17 +00:00
04221b2835 Standardize wonder healing.
Patch by: Nescio
Accepted By: borg-
Differential Revision: https://code.wildfiregames.com/D2660
This was SVN commit r23745.
2020-06-07 13:03:06 +00:00
feda708d5d Fix formations not queueing orders properly.
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.
2020-06-06 16:07:01 +00:00
759bc754c3 Fix arrow count not being properly calculated when autogarrisoning.
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.
2020-06-06 10:19:42 +00:00
4588ee3bbc Trigger an exit-reentry when the target entity of an order is renamed
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.
2020-06-06 06:19:15 +00:00
371299f244 Reduce alarm sound intensity:
Thread:
https://wildfiregames.com/forum/index.php?/topic/27207-committedpoll-alarm-sound/page/2/&tab=comments#comment-398144

This was SVN commit r23741.
2020-06-05 21:34:22 +00:00
8339c6da79 Fix heroes not attacking on elephants
This was SVN commit r23740.
2020-06-05 21:28:18 +00:00
a7cc40524c Fix spear orientations for infantry spearmen units when attacking and capturing.
Thread:
https://wildfiregames.com/forum/index.php?/topic/28301-seleucid-thureos-shields-attack-with-butt-of-spear/&tab=comments#comment-398078

This was SVN commit r23739.
2020-06-05 20:57:19 +00:00
f6977b64db Use IID_Health in test_Damage after 16b452cf91.
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.
2020-06-05 17:14:04 +00:00
829567c304 Unify Cavalry walk speeds across citizen/champion/hero variants.
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.
2020-06-05 16:58:18 +00:00
21a1ba4e5a New alarm/alarmattackplayer_1.ogg sound
Thread:
https://wildfiregames.com/forum/index.php?/topic/27053-request-battle-sounds/
Thread:
https://wildfiregames.com/forum/index.php?/topic/27207-feedback-wanted-alarm-sound/

Patch by: @Samulis
This was SVN commit r23736.
2020-06-05 08:09:58 +00:00
4812844c33 Look for foundations near the target, not the entity.
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.
2020-06-04 11:06:27 +00:00
cdfa6cb8b4 Make CommitResources accept a target, not a type.
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.
2020-06-04 11:01:06 +00:00
7440523ade Enable garrisoning on gates / fix movement of units with visible garrison points (2nd commit)
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.
2020-06-02 11:40:29 +00:00
c2b73e7874 Remove inaccurate howdah from the carthaginian champion elephant.
Patch by: @Nescio
Comment by: @wowgetoffyourcellphone
Thread:
https://wildfiregames.com/forum/index.php?/topic/28168-war-elephants/page/2/&tab=comments#comment-396952

Differential Revision: https://code.wildfiregames.com/D2779
This was SVN commit r23730.
2020-06-02 08:02:09 +00:00
aad8aa9a3e Make elephants more interesting by reducing their cost.
Reviewed by: @borg-
Patch by: @ValihrAnt, @Nescio

Differential Revision: https://code.wildfiregames.com/D2575
This was SVN commit r23728.
2020-06-01 16:53:01 +00:00
c4625b14df Improve the warning message for FromJSValue<CColor> when trying to convert a non-object to CColor.
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D2778
This was SVN commit r23727.
2020-06-01 16:09:28 +00:00
bb
37980a3e48 Move all session hotkeys under session in default.cfg
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.
2020-06-01 15:11:26 +00:00
bb
95cc785865 Also fix 6 player skirmish maps
refs D1042 29098b456b

This was SVN commit r23725.
2020-06-01 14:35:25 +00:00
945ac4fc3b Do not change the gamma of the display on startup.
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.
2020-06-01 05:12:51 +00:00
bb
27311ec62e Correct tooltips of gamesetupSettingsTabs
Introduced in 34138a7764

Patch By: Nescio
Agreed By: elexis
Differential Revision: D2615
This was SVN commit r23721.
2020-05-31 21:17:16 +00:00
bb
74a02d232e Allow a garrisonholder to not have health.
Patch by: Freagarach
Adaptation by: wraitii
Differential Revision: D2375
This was SVN commit r23720.
2020-05-31 19:40:54 +00:00
bb
29098b456b Remove all spaces, caps, parentheses and hyphens from map file names.
PersistMatchSettings are broken by this commit.

Comments By: leper, itms, Stan, vladislav, elexis
Patch By: Nescio
Differential Revision: D1042
This was SVN commit r23719.
2020-05-31 19:10:15 +00:00
6a29c46b5f Fix Gaul trader offset. Refs https://code.wildfiregames.com/D2640
This was SVN commit r23718.
2020-05-31 16:21:42 +00:00
bb
82c2de90fd Replace the Flight_demo map from 2c58b07223 with Flight_demo_2 from a64f1356cb. Adding a runway on a cliff to the latter, so all functionalities are kept.
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.
2020-05-31 15:55:21 +00:00
bb
743443977b Rename brit_champion_cavalry* to brit_champion_chariot*
Patch By: Nescio
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2529
This was SVN commit r23716.
2020-05-31 14:16:23 +00:00
Angen
10fb4822df [gameplay-a24] Allow training all barracks champions at captured barracks.
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.
2020-05-31 10:12:02 +00:00
531dcf40c3 Revert 0363202a20, 2abd9cead2 and b4144dc2c3
Player-testing has revealed QA issues, so reverting these for now.

Differential Revision: https://code.wildfiregames.com/D2773
This was SVN commit r23714.
2020-05-31 10:06:39 +00:00
0cde295654 Make wall segment cost proportional.
Patch by: @Nescio.
Reviewed by: @ValihrAnt
Differential Revision: https://code.wildfiregames.com/D2611
This was SVN commit r23713.
2020-05-31 07:29:26 +00:00
b4144dc2c3 Hotfix for 2abd9cead2 - remove the OnEntityRenamed handling.
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.
2020-05-30 14:26:33 +00:00
2abd9cead2 Enable garrisoning on gates / fix movement of units with visible garrison points
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 #2679
Fixes #5151

Differential Revision: https://code.wildfiregames.com/D1418
This was SVN commit r23710.
2020-05-30 09:18:33 +00:00
ed2ae1d283 Do not compute capture points for the invalid player on player defeat
Reviewed By: Freagarach
Refs #5745

Differential Revision: https://code.wildfiregames.com/D2748
This was SVN commit r23709.
2020-05-30 06:25:10 +00:00
0363202a20 Trigger an exit-reentry when the target entity of an order is renamed
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.
2020-05-29 17:00:50 +00:00