1
0
forked from mirrors/0ad

Compare commits

...

2394 Commits

Author SHA1 Message Date
wraitii 99712c3581 Fix No-PCH build.
ParticleManager uses <list> which has recently become unincluded.

Differential Revision: https://code.wildfiregames.com/D3589
This was SVN commit r24936.
2021-02-21 10:04:39 +00:00
Freagarach ada0229f81 Fix garrison error with formations already in range.
The formation is set to an empty state upon disbanding which does not
have a `MEMBER`-substate.
Caused by c57a4d90a1.

Fixes: #6052
Differential revision: D3588
Reviewed by: @wraitii
This was SVN commit r24935.
2021-02-21 09:18:05 +00:00
vladislavbelov 03ed891029 Do not generate render data in case CDecal calculated wrong coordinates.
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D3578
This was SVN commit r24932.
2021-02-18 21:09:41 +00:00
wraitii e8fb314996 Fix error when unsetting a hotkey.
Fixes f222dd2d3e.

Reported by: nwtour
Based on a patch by: nwtour
Differential Revision: https://code.wildfiregames.com/D3579
This was SVN commit r24931.
2021-02-18 09:01:36 +00:00
wraitii f380ec627d i18n issues: Spanish manual & gamesetup tips text.
There were errors in the spanish manual, and clipping issue in the
gamesetup tips text.

Refs #6024 (partly fixed)
Fixes #6027

Differential Revision: https://code.wildfiregames.com/D3573
This was SVN commit r24930.
2021-02-16 10:59:15 +00:00
Stan 6a3246fe93 Fix variant loading order
file="" properties were not overriden by other things defined in the
actor, which lead to weird edge cases, such as frequency="0" variants
being loaded because their names="" ended up matching their parent's
name=""

Also remove the name because  it doesn't serve a purpose

Accepted by: @wraitii
Differential Revision: https://code.wildfiregames.com/D3572
This was SVN commit r24929.
2021-02-16 10:51:23 +00:00
Stan 110402eae0 Update credits again. I failed to notice not all languages were included.
- Remove not included languages from the installer.
- Add credits for other languages, even if they are not included.
Differential Revision:  https://code.wildfiregames.com/D3568
This was SVN commit r24927.
2021-02-14 14:00:30 +00:00
Stan 98f2510632 Fixes config crash in case of an empty value
Patch by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3567
This was SVN commit r24922.
2021-02-14 02:10:46 +00:00
Stan 9a5d1f3503 Remove useless code in mausoleum.xml
This was SVN commit r24921.
2021-02-13 23:57:29 +00:00
Stan 834edca55d Use the new arrow and variants to reduce duplication for athen
This was SVN commit r24920.
2021-02-13 23:56:51 +00:00
Stan bb59e3a64e Use the new arrow and variants to reduce duplication for celt brit and gaul
This was SVN commit r24919.
2021-02-13 23:56:39 +00:00
Stan 2c9587f857 Use the new arrow and variants to reduce duplication for hele
This was SVN commit r24918.
2021-02-13 23:56:20 +00:00
Stan d138d7d743 Use the new arrow and variants to reduce duplication for iber
This was SVN commit r24917.
2021-02-13 23:55:51 +00:00
Stan 7afebf39a6 Use the new arrow and variants to reduce duplication for kush
This was SVN commit r24916.
2021-02-13 23:53:45 +00:00
vladislavbelov 7a71011149 Refactors smart pointers creation, reduces code duplication and improves exception safety.
This was SVN commit r24915.
2021-02-13 23:53:40 +00:00
Stan 425f19b8ac Use the new arrow and variants to reduce duplication for mace
This was SVN commit r24914.
2021-02-13 23:53:38 +00:00
Stan 5f859a90d2 Use the new arrow and variants to reduce duplication for merc and maurya
This was SVN commit r24913.
2021-02-13 23:53:12 +00:00
Stan 8bd8eb7acb Use the new arrow and variants to reduce duplication for pers
This was SVN commit r24912.
2021-02-13 23:52:56 +00:00
Stan 8c0adac8a4 Use the new arrow and variants to reduce duplication for ptol
This was SVN commit r24911.
2021-02-13 23:52:25 +00:00
Stan e8cfcdb6e4 Use the new arrow and variants to reduce duplication for rome
This was SVN commit r24910.
2021-02-13 23:52:04 +00:00
Stan 3da97821e7 Use the new arrow variants to reduce duplication for spart
This was SVN commit r24909.
2021-02-13 23:51:34 +00:00
Stan 808af6148f Unify sele damage level by using variants. Use the new arrow variant to reduce duplication
This was SVN commit r24908.
2021-02-13 23:50:50 +00:00
Stan 7697615fb4 Unify cart damage level by using variants. Use the new arrow variant to reduce duplication
This was SVN commit r24907.
2021-02-13 23:50:16 +00:00
Stan 1141c060f4 Add a variant for projectiles for bolt artillery and normal arrows.
This was SVN commit r24906.
2021-02-13 23:49:21 +00:00
vladislavbelov 565710d4c9 Fixes UB in shared_ptr usage of an array. Refs #5288
Reported By: PVS-Studio
This was SVN commit r24905.
2021-02-13 23:25:41 +00:00
Imarok 7c2be449de Fix attack notifications with buildings
Differential Revision: https://code.wildfiregames.com/D3566
This was SVN commit r24904.
2021-02-13 21:31:16 +00:00
vladislavbelov fc7da5edd1 Fixes leaking of a file handle in case of an error. Refs #5288
Reported By: PVS-Studio
This was SVN commit r24903.
2021-02-13 17:57:37 +00:00
Stan 0b432e7c9c Replace background color of trees by an average color to remove artifacts on filtering, flickering on some cards (when a background color leaks to the main color).
Script by: @Vladislavbelov
This was SVN commit r24902.
2021-02-13 17:48:29 +00:00
Stan 2c67a569c0 Replace background color of bushes by an average color to remove artifacts on filtering, flickering on some cards (when a background color leaks to the main color).
Script by: @Vladislavbelov
This was SVN commit r24901.
2021-02-13 17:47:55 +00:00
wraitii fc39ff52fc Fix player+AI setup in MP gamesetup
Data race introduced in 612515a163.

Reported by: Langbart
Fixes #6020

Differential Revision: https://code.wildfiregames.com/D3564
This was SVN commit r24900.
2021-02-13 17:34:24 +00:00
vladislavbelov b2310ad70a Makes DynamicArena more cache-friendly and removes useless member.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3560
This was SVN commit r24899.
2021-02-13 17:33:05 +00:00
wraitii 6085d14ca9 Increase the cose of cavalry/infantry levy techs.
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3458
This was SVN commit r24898.
2021-02-13 16:48:17 +00:00
Angen 16fc7bb2de [Petra/AI] Handle permadeaths for heroes hotfix
caused by a79a47effe and de3ed2cd19 petra will be blocked by not being
able to train hero again as she does not do rotations.
add check for matchlimits reached for permadeaths
more propper solution to handle training with numbers greater than 1
will be needed in the future.

Differential revision: D3559
Accepted by: @Freagarach
This was SVN commit r24897.
2021-02-13 11:38:58 +00:00
wraitii fba69b2672 Fix this.capacities not always existing when processing value modification messages.
692e236499 assumed that `this.capacities` would always exist, but that
proved incorrect, in particular if a value modification message is sent
before ownership change is processed.

Fix that by initializing them on init.

Reported by: Langbart
Fixes #6019

Differential Revision: https://code.wildfiregames.com/D3562
This was SVN commit r24896.
2021-02-13 10:52:17 +00:00
wraitii 674cdae166 Fix issues with formation + packing.
- e7e218a3bc contained a small mistake: this.order wasn't cleared when
clearing the orderqueue, which led to a broken codepath in
PushOrderFront.
- Since 71a61d5f50, formation orders their members to reform in IDLE.
This will automatically pack any unpacked siege.

Reported by: langbart
Tested by: langbart
Fixes #6018

Differential Revision: https://code.wildfiregames.com/D3561
This was SVN commit r24895.
2021-02-13 10:08:10 +00:00
wraitii 18bc3e47ea Prevent destroyed obstructions from reactivating.
Obstructions can reactivate after being destroyed, which leaves them
dangling forever. This is similar to 54f7a09a54.
This fixes this issue by setting a temporary "is destroyed" variable to
true.@

Reported by: seeh
Tested by: langbart
Reviewed By: Freagarach
Fixes #6016

Differential Revision: https://code.wildfiregames.com/D3558
This was SVN commit r24894.
2021-02-13 08:45:23 +00:00
Itms c59d569767 Port remaining python2 helper scripts to python3, fixes #5694.
Differential Revision: https://code.wildfiregames.com/D2501
This was SVN commit r24892.
2021-02-12 21:25:33 +00:00
vladislavbelov f175bc4f8d Fixes big screenshots with water (reflection or refraction camera), adds big screenshot customization.
Commented By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3557
This was SVN commit r24891.
2021-02-12 21:20:07 +00:00
Stan 44dc2ca6f2 Reduce the normal strength. the default is way too big.
This was SVN commit r24890.
2021-02-12 14:14:35 +00:00
Stan bc30f422c0 Disable Parallax for new trees. Parallax isn't really visible anyway, and the work should be covered by the normal map. It's also very performance costly.
Add a fallback material for the basic_trans_wind_parallax_spec.xml so it
default to a less costly one on lowest settings.

Rename basic_trans_wind_parallax_spec.xml to
basic_trans_wind_norm_spec.xml to reflect there is no parallax disabled.

Discussed with @vladislavbelov.

This was SVN commit r24889.
2021-02-12 14:06:37 +00:00
Freagarach 6e0d90b67b Fix clear command in lobby.
Missed in f78d3ddf71.

Noticed by @Langbart
Differential revision: D3556
Reviewed by: @Angen
Fixes: #6008

This was SVN commit r24888.
2021-02-12 10:32:07 +00:00
vladislavbelov 63e0f13f1b Reduces the number of GL state changes in GUI.
This was SVN commit r24885.
2021-02-11 19:15:35 +00:00
Stan 4d083660aa Fix kushite buildings death variants, Noticed by @Edwarf.
Add smoke to the gaul cc

This was SVN commit r24884.
2021-02-11 18:57:14 +00:00
Stan 0f3d4a30a0 Fix some ptolemies death variants, Noticed by @Edwarf
This was SVN commit r24883.
2021-02-11 18:56:30 +00:00
Stan 95b0407388 Fix macedonian buildings death variants, Noticed by @Edwarf
This was SVN commit r24882.
2021-02-11 18:55:55 +00:00
Stan 2d288a3b11 Fix mercenary camps death variants Noticed by @Edwarf
This was SVN commit r24881.
2021-02-11 18:51:14 +00:00
Stan b5c7611860 Fix incorrect mercenary icon. Noticed by @Edwarf
This was SVN commit r24880.
2021-02-11 18:49:14 +00:00
Stan 037f2b71c4 Fix Spartan destruction variants not having smoke use the variant.
This was SVN commit r24879.
2021-02-11 14:56:42 +00:00
Stan 34da01301c Introduce destructions variants and use them to clean structures death variants.
- Remove unused decals as the rubble takes over
- Add destruction smoke to most buildings
- Fix very small destruction smoke for gates
- Fix fortress props "popping up" when ranges and arsenals are
destroyed.

This was SVN commit r24878.
2021-02-11 13:18:29 +00:00
Stan c61ea0334b Fix some icons on borg-'s request
This was SVN commit r24877.
2021-02-11 11:23:20 +00:00
Stan 183377c302 New sling sounds
Patch by: @Samulis
This was SVN commit r24874.
2021-02-11 00:21:33 +00:00
Stan 02f8d1739f Reduced metallic impact for all melee sounds, blended existing sword sounds into sword attacks.
Patch by: @Samulis
This was SVN commit r24873.
2021-02-11 00:20:45 +00:00
Stan 98d60dab18 Improve training sounds for merchants and priests
Patch by: @Samulis
This was SVN commit r24872.
2021-02-11 00:17:58 +00:00
Stan 0ee2399458 Increase the difference between the chopping and building sounds
Patch by: @Samulis
Reported by: @Badosu
This was SVN commit r24871.
2021-02-11 00:16:13 +00:00
vladislavbelov 65aa3d9292 Switches decals to VBChunk to reduce the number of state changes.
Also allows to use compressed vertex formats in future.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3553
This was SVN commit r24870.
2021-02-10 23:48:43 +00:00
wraitii e7e218a3bc Fix no-formation orders after several formation orders.
When giving several queued formation-walk orders, then a queued
non-formation order (such as gathering), the gather order would be
silently dropped. This did not happen if only one formation-walk order
was given, which is why this issue was not noticed in 59d0885d68

To fix it, explicitly only drop pre-"leave formation" orders in the
queue for formation members.

Reported By: faction02
Differential Revision: https://code.wildfiregames.com/D3550
This was SVN commit r24869.
2021-02-10 19:23:39 +00:00
Imarok 11fde58751 Fix positioning of the research progress icons below the counters overlay
Bug found by: ffffffff
Differential Revision: https://code.wildfiregames.com/D3525
This was SVN commit r24868.
2021-02-10 16:59:50 +00:00
vladislavbelov 5e1b84ed64 Batches decals and reduces the number of state changes.
Reviewed By: wraitii
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3545
This was SVN commit r24867.
2021-02-10 16:42:56 +00:00
wraitii 8ea4f3186c Allow capture when falling back to "WalkAndFight" in COMBAT.APPROACHING
COMBAT.APPROACHING will fallback to WalkAndFight if the order is forced
and the movement fails (happens e.g. on target death).
That behaviour was added in 5568bd4c16 (and tweaked in d9c6879450), to
make the unit move to the general position asked by the player as a
fallback.
However, it did not allow capture, which meant units would occasionally
start attacking structures, instead of capturing (the default).
This makes that fallback allow capture in all cases, which is generally
more expected than the reverse.

Fixes #6003

Differential Revision: https://code.wildfiregames.com/D3548
This was SVN commit r24866.
2021-02-10 13:49:13 +00:00
wraitii e94e1f1fcf Better fix for formation waltzing, revert 5d96346ac5.
5d96346ac5 proved unsufficient to fix formation 'waltzing'. This is a
better fix, which makes sure units actually try to reach their
designated offset in the first place.
Further, it removes code that recalculated offsets un-necessarily, which
led to an issue with "sloppy" formations such as open and closed orders.

Fixes #5997

Differential Revision: https://code.wildfiregames.com/D3543
This was SVN commit r24865.
2021-02-10 09:59:39 +00:00
wraitii 06639a0383 Ignore MoveToChasingPoint orders when not chasing.
Reported By: Freagarach
Reviewed By: Angen
Fixes #6002

Differential Revision: https://code.wildfiregames.com/D3547
This was SVN commit r24863.
2021-02-10 08:14:38 +00:00
vladislavbelov 990f09e67e Changes CVertexBufferManager container from std::list to std::vector.
This was SVN commit r24861.
2021-02-08 22:37:44 +00:00
vladislavbelov 6d4fd01a59 Separates allocated vertex buffers into groups for data locality.
Tested By: Langbart, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D3522
This was SVN commit r24860.
2021-02-08 22:34:10 +00:00
Angen f1e812bc32 Reuse the same formation controller when formationtemplate does not change
When reforming manually, the case of formation template beeing the same
was ignored what resulted in creating new formation controllers.

Differential revision: D3542
This was SVN commit r24859.
2021-02-08 18:39:26 +00:00
wraitii d078df0b85 Get the public IP from the lobby if not using STUN.
Follow-up to 1a8de6d2b8. This makes it again possible to host without
STUN via the lobby.
The lobby bot will answer the host "Register" command with the external
IP. This is only sent to the host, avoiding IP leakage.

There is a small window in which a client might try to join and the
public IP isn't up, and the request goes through, but that seems rather
unlikely to be a problem in practice.

Refs #5913

Differential Revision: https://code.wildfiregames.com/D3490
This was SVN commit r24858.
2021-02-08 15:47:34 +00:00
wraitii c009eae0a5 Lobbybots: update readme to reflect mod_ipstamp being optional
Following #5913, mod_ipstamp is no longer required to enable STUN
hosting (it can only be useful to enable non-STUN hosting).
This updates the readme to reflect that, and fixes some markdown issues.

Differential Revision: https://code.wildfiregames.com/D3473
This was SVN commit r24857.
2021-02-08 14:22:01 +00:00
Stan f222dd2d3e Make pages relying on hotkeys more resilient
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D3541
This was SVN commit r24856.
2021-02-08 13:56:40 +00:00
wraitii a4c698ac48 Fix units restarting orders when tasked to attack/gather/repair/heal same unit.
FSM states would be left/re-entered, resetting the timer, which did not
happen pre a16e7c0a56 and is undesirable in general.
This explicitly checks for a few cases where timers are relevant.

Essentially a Patch by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3531
This was SVN commit r24855.
2021-02-08 10:20:34 +00:00
wraitii 831e4a183f Fix a crash in the mod selector when using the mod downloadder.
When closing the mod downloader, the list of enabled mod is reset, which
can lead to an out-of-index assertion failing in the engine if an
enabled mod was selected before.

Reported by: Vas
Fixes #6001

Differential Revision: https://code.wildfiregames.com/D3537
This was SVN commit r24854.
2021-02-08 10:13:06 +00:00
wraitii 612515a163 Debounce gamesetup network messages & slider changes to avoid lag.
Gamesetup Net synchronisation messages are sent on any change, which
includes slider changes. They can be quite slow for clients to process,
so it makes sense to introduce some 'debounce' here. I picked 400ms
somewhat arbitrarily.

Sliders also call UpdateGameAttributes, which can also lag, so run it
only once per 50ms at most.

Reported by: nani
Differential Revision: https://code.wildfiregames.com/D3536
This was SVN commit r24852.
2021-02-07 18:00:57 +00:00
wraitii 65195211a8 [gameplay] Reduce iberian fireship attack
86ddf09640 had buffed them by giving them Fire damage, which ships have
no resistance against. This made the too strong.

Patch By: Feldfeld
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3538
This was SVN commit r24851.
2021-02-07 15:59:54 +00:00
Angen ab2fb3e6b0 [gameplay-a24] Tweak elephant stable building time
As pointed out by Edwarf in the forum post, the elephant stable is
rather expensive compared to the arsenal (both are city-phase
structures).
This patch keeps the elephant stable's resource costs unchanged (it is
visually larger than the other three military structures), but lowers
the building time from 240 s to 180 s.

Differential revision: D3515
Reviewed by: @borg-
Patch by: @Nescio
This was SVN commit r24850.
2021-02-07 12:56:59 +00:00
Angen 819db85ab6 [gameplay-a24] Make unlock_spies technology cheaper
As pointed out by Edwarf in this forum post, the espionage technology is
rather expensive. This patch removes the wood and stone costs and
reduces the research time.

Differential revision: D3516
Reviewed by: @borg-
Patch by: @Nescio
This was SVN commit r24849.
2021-02-07 12:53:23 +00:00
Angen 8135928ff4 Fix wrong selecting of the match when updating list introduced in 1a8de6d2b8
hostUsername is member of stanza
stanza does not have gameName but name

Reviewed by: @wraitii
Differential revision: D3524
This was SVN commit r24848.
2021-02-07 12:50:42 +00:00
wraitii 53100974d9 Fix blurry textures in Bundle by bundling with mod mod in CI
The "public" archive needs to be built with the mod mod active, to load
textures.xml files. This saves a few MBs as a side effect.

Fixes #6000

Differential Revision: https://code.wildfiregames.com/D3534
This was SVN commit r24847.
2021-02-07 11:36:34 +00:00
wraitii d88db989a0 Reduce interline space for lobby/gamesetup chats.
Post f78d3ddf71, chat uses a list, which has natively a larger interline
space.
This introduces a new style to revert to A23-like interline, making chat
denser and better looking.

Patch By: nani
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3533
This was SVN commit r24846.
2021-02-07 11:18:21 +00:00
Stan d3c593666f Only parse querystring in RL Interface if it exists.
Patch by: @irishninja
Differential Revision: https://code.wildfiregames.com/D3529
This was SVN commit r24844.
2021-02-06 23:00:45 +00:00
Imarok d17079a640 Fix Phoenician Trireme
Reviewed by: Freagarach
Fixes: #5998
Differential Revision: https://code.wildfiregames.com/D3526
This was SVN commit r24843.
2021-02-06 20:30:07 +00:00
Stan dd9e14d5d1 Move SSE.h to a better place. Rename it to simd.h after discussion with @OptimusShepard and @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3437
This was SVN commit r24840.
2021-02-05 12:40:59 +00:00
Stan e3c44f0bde Fix more issues with the RLInterface
Patch by: @Stan, @irishninja
Differential Revision: https://code.wildfiregames.com/D3385
This was SVN commit r24839.
2021-02-05 12:23:02 +00:00
Stan 321e3652f9 Fix and disable some pesky Windows warnings.
Differential Revision: https://code.wildfiregames.com/D3511
This was SVN commit r24838.
2021-02-05 12:20:06 +00:00
vladislavbelov 5eb7fba3bd Further VertexBuffer improvements after b3cbee6ba9.
Chunk merging is based on patch D2528 by @dm.

This was SVN commit r24835.
2021-02-04 23:48:30 +00:00
vladislavbelov b3cbee6ba9 Performance improvements to VertexBuffer.
Patch By: dm
Tested By: OptimusShepard, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D2528
This was SVN commit r24834.
2021-02-04 23:26:37 +00:00
vladislavbelov a564892fab Removes redundant normalizations for float types.
Tested By: Langbart
Differential Revision: https://code.wildfiregames.com/D3517
This was SVN commit r24833.
2021-02-04 20:03:03 +00:00
Freagarach 6dba34e915 Fix team population in summary graphs.
Introduced in 57d0e7bd96, missed in 9145e03bf5.

Differential revision: D3519
This was SVN commit r24832.
2021-02-04 17:40:47 +00:00
wraitii 5d96346ac5 Fix units 'waltzing' in place in formation.
Following 847f3a9995,
Units in formation can get very small movement offsets, that nonetheless
require large rotations, and thus at least 2 turns to accomplish.
However, following 847f3a9995, PossiblyAtDestination fires() only after
the first rotation, so the unit ends up 'waltzing' in place.
Before that diff, the unit never even moved since PossiblyAtDestination
fired straight away.

This is also noticeable since IDLE formation re-order their members
since 71a61d5f50.

The fix here is to ignore rotation time for very small offsets, which
lets units accomplish the movement in one turn and fixes the issue.

Reported by: wowgetoffyourcellphone
Reviewed By: Freagarach
Tested By: langbart
Differential Revision: https://code.wildfiregames.com/D3518
This was SVN commit r24831.
2021-02-04 16:58:19 +00:00
s0600204 3ea0e0c903 Use power-of-two sized image in Catafalque page
Should fix concern raised on a30c4a69f7 raised by @vladislavbelov


Differential Revision: https://code.wildfiregames.com/D3332
This was SVN commit r24829.
2021-02-04 00:38:05 +00:00
vladislavbelov f8fde587a0 Removes unused dummy shader from decals rendering.
This was SVN commit r24828.
2021-02-04 00:00:55 +00:00
vladislavbelov 333f7b4fb4 Fixes building snapping for non-square foundations. Fixes #5976
Tested By: Freagarach, Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D3510
This was SVN commit r24827.
2021-02-03 17:03:44 +00:00
vladislavbelov 30fc281a4c Significantly reduces number of OpenGL state changes for terrain rendering.
Tested By: Freagarach, Langbart, Stan
Differential Revision: https://code.wildfiregames.com/D3512
This was SVN commit r24826.
2021-02-03 17:01:38 +00:00
wraitii 90d39107a7 Fix Z-fight in the menu
Fixes 5657c5211b

Reported by: Vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3494
This was SVN commit r24825.
2021-02-03 11:01:08 +00:00
wraitii 5c71960883 Fix map browser scrolling
When hovering over the background, the scrolling was suddenly reversed
and could loop around.

Tested By: Langbart
Fixes #5993

Differential Revision: https://code.wildfiregames.com/D3514
This was SVN commit r24824.
2021-02-03 10:14:10 +00:00
vladislavbelov 55f6eae7c5 Removes unused dummy shader from terrain rendering.
This was SVN commit r24822.
2021-02-02 15:34:52 +00:00
wraitii 1ae4f497e8 Fix noisy errors when joining hte lobby and someone is hosting a modded game.
Check for existence explicitly in the lobby GUI.
It would probably be better to not trigger errors in the cache
laoder/JSON code but instead print at the caller, depending, but that
requires changing a lot more code.

Reported by: Asger
Fixes #5988

Differential Revision: https://code.wildfiregames.com/D3506
This was SVN commit r24821.
2021-02-02 14:55:45 +00:00
wraitii 6b2f16bbc2 [gameplay] - Reduce CS cavalry build time back to 16
Partial revert of 8df9d8dcc3. Following some testing, this build time
increase made early cav rushes too difficult.

Accepted by: borg-, FeldFeld, Valirhant
Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D3508
This was SVN commit r24820.
2021-02-02 09:49:42 +00:00
Angen 0c1a45259f React to Attacked message in IDLE when really idle
Issue described in #5945.
Unit finishing the order such as walking, will reach destination and if
attacked, imediately reacts to the attacker.
Hovewer, more desireble is for unit to look around since entering idle
state and pick the target if any using preference and then react to
attacker.
This issue rised up after finding of new targets have been moved from
enter to timer to avoid infinite loops after alwaysenterstate logic
removal.

Only downside here is unit will receive few hits before reacting as we
are waiting to the timer first. This happens only if unit goes idle.

Differential revision: D3504
Reviewed by: Freagarach
Comments by: wraitii
Fixes: #5945

This was SVN commit r24818.
2021-02-01 19:58:09 +00:00
Stan 151513f48d Allow the windows CI to post comments on differentials like other pipelines.
Differential Revision: https://code.wildfiregames.com/D2946
This was SVN commit r24817.
2021-02-01 15:05:07 +00:00
wraitii 42b068d9c9 RL: Update template paths & remove debug-print.
debug-print was removed in 992d740a58, templates were changed in
b57abe806c

Patch by: irishninja
Differential Revision: https://code.wildfiregames.com/D3502
This was SVN commit r24816.
2021-02-01 14:53:40 +00:00
vladislavbelov f76f557d5c Stops parsing a shader if an include has an error.
This was SVN commit r24815.
2021-02-01 14:12:30 +00:00
vladislavbelov 02f2be9272 Adds logging of a shader name on an error after reload.
Differential Revision: https://code.wildfiregames.com/D3462
This was SVN commit r24814.
2021-02-01 13:50:07 +00:00
wraitii e4ac538c91 Change ENSURE in BinarySerializer to try and get more debug data.
I'm hoping this will give us more information on what's going wrong.

Also remove comments which were outdated since 7460d0e56e

Refs #5987

Differential Revision: https://code.wildfiregames.com/D3501
This was SVN commit r24811.
2021-01-30 09:13:13 +00:00
Freagarach 11ed0fd619 Alpha name V3.
Like the rocket. Lets get this over with.

Patch by: @Nescio
Differential revision: D3498
This was SVN commit r24808.
2021-01-29 14:38:46 +00:00
wraitii 884b55c124 Correct transliteration of A24 name
The last vowel is long.
(SF has been accidentally broken this morning).

Reported by: Nescio
This was SVN commit r24806.
2021-01-29 11:19:25 +00:00
wraitii 48f72b0e17 Fix ranged unit chasing following 847f3a9995
D3230 / 847f3a9995 introduced range checking at turn start, and removed
a hack that made units predict the position of their target too far
ahead. This worked fine when in "straight movement" mode, unfortunately
I failed to recognise that ranged units would never use that mode. This
meant that ranged-unit chasing was broken.

There is a straightforward fix however, since we can simply change
TryGoingStraightToTarget to be used by ranged units. It fixes the issue
efficiently and improves movement for ranged units in general, so it
probably should have been done from the start.

Refs #5936

Differential Revision: https://code.wildfiregames.com/D3489
This was SVN commit r24803.
2021-01-27 21:55:49 +00:00
wraitii 5701ffccf8 [gameplay] Adjust cavalry movement speed and melee attack range.
Nerf cavalry movement speed somewhat, by reducing walk speed and their
run multiplier.

Further, following 6a66fb8205, units have a chance of going through
their target when chasing them. This diff adjusts melee cavalry ranges
from 4 to 6 to reduce the probability of that happening. The speed
reduction also helps with this.

Refs #5936

Differential Revision: https://code.wildfiregames.com/D3483
This was SVN commit r24802.
2021-01-27 21:22:40 +00:00
wraitii 7b88b1a0f9 UnitMotion - Additional chasing fixes
- Because units slow down when turning, and JPS paths often begin with a
J-shape, chasers can fail to catch up to slower chasee, because the
latter don't recompute paths as often. To fix this, ignore the first
waypoint if it's close by and the next is accessible.
- Don't interpolate the target position when interpolation isn't
necessary (i.e. when not processing the MT_Update_Motion* message), as
that resulted in the "follow known bad path" hack to active
un-necessarily.
- Tweak PathingUpdateNeeded, it will return true when it has no path to
follow
- Remove the direct-range consideration in the "distance uncertainty"
calculation.

Refs #5936

Differential Revision: https://code.wildfiregames.com/D3485
This was SVN commit r24800.
2021-01-27 19:13:29 +00:00
wraitii 8df9d8dcc3 [gameplay] A24 Cavalry build time increase / speed tech cost increase
Slight debuff for cavalry: increase their build time but slightly above
10%, and increase the cost of the +10% movement speed technology.

Accepted By: FeldFeld, borg-, Nescio
Differential Revision: https://code.wildfiregames.com/D3476
This was SVN commit r24799.
2021-01-27 17:54:00 +00:00
wraitii 6a66fb8205 Chasing fix - ignore the target's obstruction to avoid colliding with it.
Units movement is currently "all or nothing". This means that a chasing
entity that moves fast enough is likely to collide with its target, if
the latter is moving also. This means that it might fail to get in range
if the max range is smaller than the movement speed over a turn.
This happens to be very much the case in MP, as cavalry range is 4,
melee cav speed is ~20 and turns are 500ms.

This problem depends on which unit moves first (i.e. which unit is
lowest-ID).

To fix this, ignore the obstruction of the target, if it is moving, when
moving. This however means sometimes chasers will 'overshoot' and block
their target pathing, making the chase easier than it probably should
be.
Fleeing units don't suffer from this problem since they also ignore
their target (and their code handles it).

This new problem introduced in this diff is heavily dependent on the
exact speeds and ranges at play, and a further diff will improve the
situation to acceptable levels.

Reported by: FeldFeld
Refs #5936

Differential Revision: https://code.wildfiregames.com/D3482
This was SVN commit r24798.
2021-01-27 17:44:31 +00:00
wraitii 847f3a9995 Check for movement success/failure on turn start.
Unit Motion currently checks if the unit is at destination during the
MT_Update_Motion* step, which happens late in the turn (notably, after
Timer.js) and moreover happens while entities are being moved (e.g.
entities with lower IDs have moved already, entities with higher IDs
have yet to do so).

This changes UnitMotion to instead check at turn start, which:
- benefits from in-turn path computations for more fluid movement
- ensure that distance checks aren't done against an entity that has
already moved for the turn.

The latter issue led to units failing to get in range of their target
when chasing them, in some situations.

As a side effect, this means that UnitAI move requests always take one
turn to succeed, so orders should be updated to check for range (or
they'll waste a turn). This is done for garrisoning, other orders were
already doing so.

Also includes a small tweak to avoid units rotating randomly when they
have no movement to accomplish.

Patch by: bb
Reviewed By: wraitii
Refs #5936

Differential Revision: https://code.wildfiregames.com/D3230
This was SVN commit r24797.
2021-01-27 15:11:57 +00:00
Angen c2155e31c0 Add private and public icons to the game list
Display locked icon for matches with password, unlocked otherwise.
This should help players to avoid clicking to the locked matches, when
they do not know password.

Differential revision: D3480
Fixes: #5949
Comments by: Stan, Freagarach, wraitii, borg
This was SVN commit r24795.
2021-01-26 20:30:20 +00:00
Angen 16a91c37e9 Limit possibility of brute force attacks when guessing password
As suggested by elexis, 1a8de6d2b8 should get some protection against
brute force attacks on password.

This is supposed to prevent attackers from getting connection data by
guessing the password.

Each failed attempt increases the counter.
XmppClient on the server side checks for the users with certain number
of failed attempts, determined in CNetServer, and refuses to check the
password, answering with banned message.
So they cant guess again in given match. Effect of this block will
dissapear after new match is created.

Differential revision: D3467
Comments by: wraitii, Stan
Tested by: Stan, Freagarach
Ref: #5913

This was SVN commit r24794.
2021-01-26 20:20:48 +00:00
wraitii 515d34d277 Hotkey editor fix: don't modify hotkeys in place.
The hotkey editor could modify hotkeys despite the changes being
cancelled.

Refs #2604, Fixes #5982

Differential Revision: https://code.wildfiregames.com/D3481
This was SVN commit r24793.
2021-01-26 16:44:53 +00:00
Stan 5d99cb4580 Fix some icons issues.
- Mercenaries should be green.
- Cart super dock icon used an old background
- Due to the reduced panel icon size it was easy to confuse the stables
with the barracks
- Due to the reduced panel icon size it was easy to confuse the corral
with the farmstead.png

Reported by: @wraitii @borg-
This was SVN commit r24792.
2021-01-26 11:08:01 +00:00
wraitii 1edaeedfab Fix StandGround freezing units.
Units no longer stop when ordered to stand ground. Use the Stop
command/hotkey instead.

Reviewed By: Freagarach
Fixes #5975

Differential Revision: https://code.wildfiregames.com/D3463
This was SVN commit r24791.
2021-01-26 09:29:49 +00:00
Itms 44f5c6ff50 New public key for A24 mods.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3471
This was SVN commit r24788.
2021-01-25 17:31:25 +00:00
wraitii 7bbd351c67 Alpha 24 name: Xšayaṛša
Per team survey & many suggestions in the forum.

Differential Revision: https://code.wildfiregames.com/D3474
This was SVN commit r24787.
2021-01-25 17:31:11 +00:00
wraitii 08afe8950d Fix persian cav archer being a Chariot.
Forgotten in 5063adb30f.

Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3477
This was SVN commit r24786.
2021-01-25 16:36:35 +00:00
wraitii 804332e204 Fix NOPCH builds.
Caused by cd97df87e9

Differential Revision: https://code.wildfiregames.com/D3469
This was SVN commit r24785.
2021-01-25 11:12:11 +00:00
Angen 32bea42e68 Fix invalid variable used in getConnectionFailReason
Introduced in 0342f01580.
Reported by: @Stan
This was SVN commit r24783.
2021-01-24 17:59:55 +00:00
Angen 04a7d95eff Limit gather rate tooltip to 2 decimal places
Gather rates are not rounded, so after some modifiers are applied, they
appear as ugly decimal numbers.
Limiting them into 2 decimal places for readability and it looks nicer.

Differential revision: D3460
Reviewed by: @wraitii
This was SVN commit r24782.
2021-01-24 15:28:13 +00:00
Stan 5b367ac37e Fix some issues found by @GunChleoc
This was SVN commit r24780.
2021-01-24 11:36:58 +00:00
wraitii 6ebf8309e2 Increase outpost base vision to 10
Outposts have a vision range of 4. This however does not always reveal
FoW around them, which looks rather odd (see D3054).
Give them 10 vision so that it's obvious they are working, and clarify
the tooltip that garrisoning is needed to make them helpeful.

Fixes #5974

Differential Revision: https://code.wildfiregames.com/D3464
This was SVN commit r24779.
2021-01-24 11:02:00 +00:00
wraitii c640220cb2 Fix error when deserializing following f2b3c4d8ec
f2b3c4d8ec broke deserializing because it did not reset the mapsize on
Deserialize(), and thus the water renderer would not regenerate data.

Differential Revision: https://code.wildfiregames.com/D3461
This was SVN commit r24778.
2021-01-23 21:13:26 +00:00
vladislavbelov ae18a5474c Reduces shadow biases for landscape shaders.
Tested By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3457
This was SVN commit r24777.
2021-01-23 19:40:58 +00:00
wraitii 93a352ad16 Fix UnitAI range queries - allow queries to ignore sizes - partial revert of d0fc8ff67d
Units sometimes ignored targets that entered their LoS. The cause is
d0fc8ff67d: range queries returned units farther away, and those units
might actually be out of range if distance is computed center-to-center,
which both UnitAI and LOS do. This meant that code relying on range
query updates was possibly broken, and indeed units missed things (see
ticket).

This introduces a boolean to switch between pre-d0fc8ff67d behaviour
(entity-as-point, center-to-center range queries) and post-d0fc8ff67d
(entities-as-circumscribing-circle, edge-to-edge range queries).
The former is used for UnitAI (where the new behaviour bugged), auras
(where varying structure sizes made it awkward) and build
restrictions(which simply did not really need it).

Reverts 7f1ee23d88, 050c5401b1 (with the exception of the iber monument
footprint), and the template changes in d0fc8ff67d itself.

It also reduces alertRaiser ranges slightly, this was missed in the
original diff.

#3381 is not reopened as BuildingAI still uses the new range queries.

Reported by: Freagarach
Comments By: Angen
Fixes #5968

Differential Revision: https://code.wildfiregames.com/D3456
This was SVN commit r24776.
2021-01-23 18:57:46 +00:00
wraitii 4cc824d620 Net Server: Verify password in Authenticate
Follows 1a8de6d2b8.
Validate the password when a client joins a game, so even a player that
knows the connection data cannot join.

Refs #3556, Refs #5913

Differential Revision: https://code.wildfiregames.com/D3438
This was SVN commit r24775.
2021-01-23 18:04:36 +00:00
Angen 498f5eb083 Fix cheering issue entering from idle state
Introduced in e543b01077.
Units entering cheering from idle state, may not check their surrounding
for pottential targets yet, so they will react incorrectly when
attacked.
Pointed out by @Freagarach in
https://code.wildfiregames.com/D1977?id=10404#inline-52415 and turned
out to be issue.

Differential revision: D3455
Fixes: #5966
Reviewed by: @wraitii
This was SVN commit r24774.
2021-01-23 15:07:15 +00:00
wraitii 55f741e644 Fix issues with Cheering and PushOrderFront
Make sure that any pending cheering order is deleted when leaving the
Cheering state, otherwise other unitAI states can behave weirdly.

This fixes issues with units cheering at incorrect time, then not
correctly picking their next target in a fight.

Reported by: snelius
Reviewed By: Angen
Refs #5966

Differential Revision: https://code.wildfiregames.com/D3452
This was SVN commit r24773.
2021-01-23 14:08:41 +00:00
wraitii 59af6a9c46 Fix hero cavalry spearman bonus
Missed in D3256 / 61236cae5b

Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3453
This was SVN commit r24772.
2021-01-23 14:01:35 +00:00
wraitii 8addf36ba8 Fix error in GATHERING when disbanding formation while members gather.
Since 59d0885d68, there is a "LeaveFormation" order to support
queued-disbanding. However, I misread the code paths and FinishOrder()
isn't always called.
This fixes that oversight.

Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3450
This was SVN commit r24771.
2021-01-23 08:07:56 +00:00
Angen 7b6ff0745a [Petra/Ai] Fix not researching free and instant technologies
When Petra encounters free technology or technology with no
researchtime, she will not start it and blocks the queue.
Also fixing seleucids.

Differential revision: D3388
Reviewed by: @wraitii
Comments by: @Freagarach, @Stan
This was SVN commit r24769.
2021-01-22 20:58:34 +00:00
vladislavbelov e7e6fe139e Allows to override GL version for SDL.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3448
This was SVN commit r24768.
2021-01-22 19:40:02 +00:00
Stan 0ce8efc286 Small icon changes, use a custom icon for the gallic plow
This was SVN commit r24767.
2021-01-22 19:28:52 +00:00
wraitii d92feab275 Fix target height computation when launching projectiles.
The Y coordinate at which to fire a projectile is currently assumed to
be the target's current Y, which is incorrect if the target is moving on
a slope.
This fixes that.

Note that this was purely visual, since projectiles still hit the target
regardless, as the height component is totally ignored, even if the
projectile is underground (in fact, the projectile's position is not
known in DelayedDamage::MissileHit, which just assumes it lands where it
said it would when fired).

As noted by bb in f737831167

Fixes #5939

Differential Revision: https://code.wildfiregames.com/D3425
This was SVN commit r24766.
2021-01-22 18:16:13 +00:00
wraitii 6b05cc9d3c Fix AI undefined error from garrisoned entities.
Introduced in 9e96bca85e.

Reported by: Freagarach
Fixes #5960

Differential Revision: https://code.wildfiregames.com/D3451
This was SVN commit r24765.
2021-01-22 17:35:45 +00:00
wraitii e76745b0b2 Revert cf6aaf37a4, causing false OOS in visual replays.
cf6aaf37a4 fixed #5546, but it seems to cause some rare OOS in visual
replays, as reported in #5909. The culprit is likely that hashes aren't
computed at quite the same moment and onDestroy changes things.

Reverting for now before A24.

Reported by: Angen
Refs #5546.
Fixes #5909

This was SVN commit r24764.
2021-01-22 17:13:12 +00:00
wraitii 3becf25fac Update bundle dist tools
- The MacOs script was not exporting the SVN revision properly.
- Rename the DMG to match the other's conventions.
- Clean up windows installer files ( Fixes #5955 )

Differential Revision: https://code.wildfiregames.com/D3370
This was SVN commit r24763.
2021-01-22 12:53:54 +00:00
wraitii ce74c41297 Fix audio leak that resulted in openAL errors after a while.
Sound items were only deleted after 'last play' when stopped, but they
could also be left in 'paused' or 'initial' states, and were then not
cleared until the game exits (effectively a memory leak). This affected
particularly music & ambient sounds, which also used the most
buffers(/memory).
On MacOS (at least), this resulted in OpenAL errors & sound failures
after a while playing the game, because MacOS has a max "in flight
buffers" of 1024.

Also clean up some control flow in CStreamItem

Reported by: Eszett
Thanks langbart for the consistent repro'.

Fixes #5265

Differential Revision: https://code.wildfiregames.com/D3445
This was SVN commit r24762.
2021-01-22 12:50:05 +00:00
Stan 9ae6f904ad Fix the non merc rhompaia having a green color
Patch by: @borg-
Differential Revision: https://code.wildfiregames.com/D3449
This was SVN commit r24761.
2021-01-22 09:19:48 +00:00
wraitii f2b3c4d8ec Fix a crash in WaterRenderer.cpp
This fixes a rare crash at map generation.
The water renderer could be left in an invalid state when exiting a
game, and would then crash on the next map generation in some cases.

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3447
This was SVN commit r24759.
2021-01-22 08:14:27 +00:00
Freagarach 993ccc6034 [PetraAI] - Teach PetraAI to fear fire.
In 86ddf09640, fire damage was introduced for the Iberian fire ship (and
the Theban fire raiser), this adds that damage type to the config of
PetraAI.
Poison (a24c8419c5) is only used in Status Effects (which PetraAI
doesn't understand anyway) so is not added.

Differential revision: D3432
Reviewed by: @Angen
This was SVN commit r24758.
2021-01-22 06:32:03 +00:00
vladislavbelov 065b03a3db Removes useless transparent pass before the water for lowest settings since the water is opaque there.
This was SVN commit r24756.
2021-01-21 22:38:11 +00:00
Imarok 1a218ec4fd Fix game speed multiplier sometimes being outside overlay box and resizing in a strange way.
Reviewed by: Freagarach
Trac Tickets: #5924
Differential Revision: https://code.wildfiregames.com/D3391
This was SVN commit r24755.
2021-01-21 17:37:23 +00:00
Freagarach 9145e03bf5 Fix values of miscellaneous summary tab shifted.
Introduced in 57d0e7bd96. Caused by incomplete filtering.

Differential revision: D3340
Fixes: #5946
Reviewed by: @wraitii
Tested by: @Langbart
Comment by: @toonijn
Suggestions from: @Imarok

This was SVN commit r24754.
2021-01-21 17:12:56 +00:00
Stan 920181b838 Fix texture bleeding on sele CC.
Reported by: @gameboy
Thread:
https://wildfiregames.com/forum/topic/35564-msaa-anti-aliasing-has-no-effect/

This was SVN commit r24753.
2021-01-21 16:07:11 +00:00
wraitii 8c429b9a68 Fix unit-only Attack move.
attackmoveUnit is more specific than attackMove, so since d0a42f2f00
won't fire at the same time. However the GUI code expected that,
breaking it.

Instead, properly check for either attackmove or attackmoveUnit.

Also fix an issue with d0a42f2f00 where hotkeys would be release if
switching to a more specific combination of the same hotkey.

Reported by: snelius
Fixes #5944

Differential Revision: https://code.wildfiregames.com/D3436
This was SVN commit r24752.
2021-01-21 15:58:33 +00:00
wraitii b28e6fda42 Fix PreferredClasses following 1f2286305d
1f2286305d introduced a "Unit+!Ship" preferred class. However, Preferred
classes don't actually use MatchesClassList, and thus this resulted in
no preference whatsoever. This is fixed.

Further, Macemen & elephants have no particular preferred classes,
unlike all other land units which are either Unit+!Ship or Human (which
implies !Ship). This is fixed by setting them to !Ship, for consistency.

Reported by: snelius (and also Valirhant, I believe)
Trac Tickets: #5945

Differential Revision: https://code.wildfiregames.com/D3442
This was SVN commit r24751.
2021-01-21 14:34:08 +00:00
Stan 7a33d391cf Fix starting camera on Sicilia Nomad.
Since this map doesn't have CCs, camera would not work see
7cf83f19fd#inline-5512
Refs: 7cf83f19fd

This was SVN commit r24750.
2021-01-21 13:35:27 +00:00
wraitii 541fdd3f90 Fix string issues in edecd14b7b
(see edecd14b7b)

Reviewed By: Nescio, borg-
Differential Revision: https://code.wildfiregames.com/D3434
This was SVN commit r24749.
2021-01-21 12:17:14 +00:00
Stan 2b4ce98fee Fixes translation error in 5cc49c2326/https://code.wildfiregames.com/D1808
Noticed by: @Edwarf
This was SVN commit r24748.
2021-01-21 12:16:10 +00:00
Stan ae5ef6d898 Add back the camels to the tutorials.
Fixes: #5951
Reported by: @Freagarach
Refs: c72861b708, 4981cdedad

This was SVN commit r24747.
2021-01-21 11:53:01 +00:00
vladislavbelov d85a73fabf Fixes simple ARB water after 9df127f9d1. Completely removing losMatrix usages. Fixes #5952
This was SVN commit r24746.
2021-01-21 11:35:20 +00:00
wraitii 37729586dc Don't pause music when pausing the game / Fix victory music in SP.
Victory music doesn't work in A24 SP. That's because the modal pauses
the game, and pausing the game pauses music.
This has been the case since c9a5d5cee5.

Auto-pausing the game (structree, ...) didn't really happen in the past,
but A24 makes it relatively common, and I think pausing the music is a
bit jarring then, so this simply removes that.

Reported by: Langbart
Fixes #5941

Differential Revision: https://code.wildfiregames.com/D3433
This was SVN commit r24744.
2021-01-21 09:34:20 +00:00
wraitii 4af962618e Add Shift+Space as an alternative Pause hotkey
Mac keyboards have no "Pause" button. As an alternative, introduce
'Shift+Space' (used in Factorio).
P is already used for Patrol.

Reported by: langbart
Fixes #5943

Differential Revision: https://code.wildfiregames.com/D3435
This was SVN commit r24743.
2021-01-21 09:31:50 +00:00
wraitii 1877871be0 Fix issue with 5d2be02f68
std::string_views are created pointing to vector-owned strings, but
those strings can use Short String Optimisation (storing the data
inline, i.e. in vector memory). When the vector is resized, the strings
are moved and those string_views now point to invalid memory.

To fix it, use std::deque which does not invalidate pointers on
push_back.

Fixes 5d2be02f68.

Reviewed By: vladislavbelov
Fixes #5950

Differential Revision: https://code.wildfiregames.com/D3441
This was SVN commit r24742.
2021-01-21 08:42:05 +00:00
vladislavbelov 5d2be02f68 Optimization for include resolving in PreprocessorWrapper.
Reduces the number of copying and decreases the computational
complexity.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3439
This was SVN commit r24740.
2021-01-20 23:05:15 +00:00
vladislavbelov b7000b373a Refactors water_high shader, cleanups water changes after 9df127f9d1.
This was SVN commit r24739.
2021-01-20 22:36:11 +00:00
wraitii 6e8208aee6 [gameplay] Buff Iber champion cavalry damage
With the new 'fire' status effect, the damage against buildings was much
lower than in A23. This upgrades it from 2 to 6.

Reported by: soloooy0
Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3430
This was SVN commit r24738.
2021-01-20 21:44:02 +00:00
wraitii 5db90dd8ab Upgrade ship_movement_speed / tower_health icons
Patch by: borg
Differential Revision: https://code.wildfiregames.com/D3302
This was SVN commit r24737.
2021-01-20 21:39:54 +00:00
Imarok 2daec55dcd Fix attack notification (a3eccc043d)
Reviewed by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3387
This was SVN commit r24736.
2021-01-20 21:00:40 +00:00
Imarok 06c570bf7b Fix game speed button being unusable in min resolution
Reviewed by: ffffffff
Fixes: #5926
Differential Revision: https://code.wildfiregames.com/D3389
This was SVN commit r24735.
2021-01-20 20:48:50 +00:00
Angen 3991dd6c38 Fix incorrect user identifier used in 0342f01580
iq uses lowercased version of user name, but patch was saving raw one.
Found by: @Freagarach
This was SVN commit r24733.
2021-01-20 19:54:16 +00:00
vladislavbelov 9df127f9d1 Removes shader code duplication to calculate LOS.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3428
This was SVN commit r24732.
2021-01-20 18:46:32 +00:00
Angen 71eaeb853c Fix not applying modifiers on upgrades in structure tree
When one hovers over gate in structure tree (e.g. gauls), it shows
unmodified hp.
As soon as one opens template viewer, one can see correct values.

Reason is that when getting values of upgrades, civ modifiers are not
applied.

Differential revision: D3427
Reviewed by: @wraitii, @s0600204
This was SVN commit r24730.
2021-01-20 18:42:40 +00:00
wraitii 3d4d617079 [gameplay] Tweak Maurya worker elephant
Maurya players had little incentive to build further support elephants.
This reduces their cost to make it more interesting for players.
It also reduces their Resistance, which was un-naturally high for a
support unit.

Patch by: FeldFeld
Accepted by: borg-
Differential Revision: https://code.wildfiregames.com/D2852
This was SVN commit r24729.
2021-01-20 18:34:09 +00:00
Angen 1a8de6d2b8 Hide ip and port from users until they want to join, add optional password
Current issue with the lobby, is that we make ips of hosts public for
anyone to read. This patch consists of 3 parts.
1.) Removing ips and ports from lobby javascript
2.) Removing need of script on the server to attach public ips to game
stanza by asking the host using xmppclient as proxy.
3.) Implementing password protected matches, to deny this information to
not trusted players.

Further description:
Do not send ports and stunip to the bots.

Removed from stanza.
Do not send ip to the lobby.

Removed from mapping gamelist from backend to gui (still on the backend
side, because it is done by script on 0ad server).
Get ip and ports on request when trying to connect.

On the host side, ask stun server what is host's public ip and remember
it.
On the client side, send iq through xmppclient to the hosting player and
ask for ip, port and if Stun is used, then if answer is success,
continue
   with connecting, else fail.
Add optional password for matches.

Add password required identifier to the stanza.
Allow host to setup password for the match. Hash it on the host side and
store inside Netserver. If no password is given, matches will behave
as it is not required.
On the client side, if password for the match is required, show
additional window before trying to connect and ask for password, then
hash it
and send with iq request for ip, port and stun.
Server will answer with ip, port and stun only if passwords matches,
else will asnwer with error string.
Some security:
Passwords are hashed before sending, so it is not easy to guess what
users typed. (per wraitii)
Hashes are using different salt as lobby hashing and not using usernames
as salt (as that is not doable), so they are different even typing the
same password as for the lobby account.
Client remembers which user was asked for connection data and iq's id of
request. If answer doesn't match these things, it is ignored. (thnx
user1)
Every request for connection data is logged with hostname of the
requester to the mainlog file (no ips).
If user gets iq to send connection data and is not hosting the match,
will respond with error string "not_server".
If server gets iq::result with connection data, request is ignored.

Differential revision: D3184
Reviewed by: @wraitii
Comments by: @Stan, @bb, @Imarok, @vladislavbelov
Tested in lobby

This was SVN commit r24728.
2021-01-20 18:31:39 +00:00
s0600204 a30c4a69f7 Commit the actual images for bbd808349f
(Cursed `arcanist`)


Differential Revision: https://code.wildfiregames.com/D3332
This was SVN commit r24727.
2021-01-20 15:17:20 +00:00
s0600204 bbd808349f Add a "Catafalque Bonuses" page
Permitting easy(ish) comparison of the bonuses granted by each civ's
Catafalque unit.

Accessible from the Main Menu's "Learn to Play" submenu.


Accepted by: @Freagarach
Comments by: @wowgetoffyourcellphone
Screenshot: https://code.wildfiregames.com/F1785729
Differential Revision: https://code.wildfiregames.com/D3332
This was SVN commit r24726.
2021-01-20 15:12:08 +00:00
wraitii b5bbed4690 [gameplay] Rework attack forge techs
Follow up to D3287/9a3da390b9.
- Remove the specialised infantry/cavalry attack technologies, in favour
of generalist melee/ranged techs to make it easier to switch army
compositions.
- Lower the costs of the technologies substantially.
- Make melee techs cost Food/Metal and Ranged techs Wood/Metal, like
resistance techs.
- City phase upgrades take 60s
- New names and descriptions for the ranged attack technologies.

Initial patch by @borg-, rebased and updated by @Nescio.

Differential Revision: https://code.wildfiregames.com/D3366
This was SVN commit r24725.
2021-01-20 14:23:16 +00:00
s0600204 406ce2f5e2 Fix error emitted if an Observer opens structree/civinfo via hotkey
This was SVN commit r24724.
2021-01-20 14:11:48 +00:00
s0600204 78bf609986 Correct grammar in tooltip
Whilst "merely" *is* in the thesaurus as a synonym for "only", it
doesn't work
in this context.

This was SVN commit r24723.
2021-01-20 13:50:33 +00:00
wraitii edecd14b7b [gameplay] Update siege techs.
A23 siege techs were rarely used. This:
- Lowers the cost of the attack tech slightly.
- Remove the cost techs which were not very useful or interesting.
- Rework the armor tech into a Health bonus
- Introduces a tech to pack/unpack faster.

Patch By: borg-
Accepted By: Feldfeld
Differential Revision: https://code.wildfiregames.com/D2878
This was SVN commit r24722.
2021-01-20 09:44:30 +00:00
Freagarach 57d0e7bd96 Add resource and population counts to the summary screen.
Patch by: @toonijn
Differential revision: D3395
Fixes: #4554
Reviewed by: @Freagarach, @wraitii
Comments by: @Angen, @Imarok, @Stan
This was SVN commit r24721.
2021-01-20 09:24:26 +00:00
wraitii cd97df87e9 Fix instacrash when saving a game & serialization fails for "no Deserialize"
9fc6c3c897 stopped supporting components with a non-null Serialize() and
a null Deserialize().
Unfortunately, these throw exceptions and it appears we have codepaths
that don't handle these exceptions (possibly all of them). Since this
error is likely, and easily fixable, and doesn't actually _crash_, I'll
issue a LogError for now.

This will possibly help modders update to A24.

Differential Revision: https://code.wildfiregames.com/D3422
This was SVN commit r24720.
2021-01-20 08:16:34 +00:00
Freagarach 3731886e2c [Gameplay] - Make gather technologies less effective.
Since they were deemed too powerful.

Patch by: @Nescio
Differential revision: D3404
Reviewed by: @Feldfeld, @wraitii
Reservations by: @borg-
Comments by: @Stan
This was SVN commit r24719.
2021-01-20 08:08:34 +00:00
Freagarach 5ee16b6d65 [Gameplay] - Remove starting hoplite from Spartans.
Deemed too overpowered.

Patch by: @Nescio
Differential revision: D3426
Reverts 214299b6c1

This was SVN commit r24718.
2021-01-20 07:15:18 +00:00
Freagarach a9b1474d4c Armour -> Resistance in aura descriptions.
Refs 0f91c5ac61.

Patch by: @Nescio
Differential revision: D3403
Comment by: @wraitii
This was SVN commit r24717.
2021-01-20 07:11:00 +00:00
Freagarach ccce5719cc Update <civ>.json information.
Removed false information, added information that was missing.
Removed history of stronger Spartan women in the game.

Initial patch by: @ValihrAnt
Redone by: @Nescio
Cleaned in between by: s0600204
Differential revision: D2720
Comments by: @asterix, @badosu, @borg-, @elexis, @Stan, @wraitii
This was SVN commit r24716.
2021-01-20 07:08:08 +00:00
Stan 9ffeb02b8a Fix typo in intro.txt
This was SVN commit r24713.
2021-01-20 00:02:47 +00:00
Stan 19eb21b647 Lower rolloff so that players that play from very high still hear sound.
Reported by: @ValihrAnt,  @Feldfeld
Discussed with: @Samulis
Refs: https://code.wildfiregames.com/D3108 / 876f6d5e50

This was SVN commit r24712.
2021-01-19 22:40:56 +00:00
vladislavbelov 7c3e885cef Implements binding a float array as a uniform input.
This was SVN commit r24711.
2021-01-19 19:57:31 +00:00
vladislavbelov 5cbf8f04ec Removes code duplications for binding shadows to shaders.
This was SVN commit r24710.
2021-01-19 19:19:04 +00:00
wraitii 4a2cc3273e [gameplay] Tweak Ranged spreads, reduce archer spread, tweak cosmetic stats.
The major change here is that Archer spread is reduced to 2 to make them
have much better aim than before at max-range, where they often missed.
This makes their DPS more predictable over their range.

This makes ranged unit's spread proportional between citizen soldiers,
advanced/elite CS, champions and heroes.

Because of the spread reduction and because promotion more strongly
reduces spread, the 10% spread reduction from the archery tradition
technology is removed.

Gravity values are tweaked.
LaunchPoint values are raised and standardised by unit type.

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D3374
This was SVN commit r24709.
2021-01-19 19:15:06 +00:00
wraitii 9d82ae15af [gameplay] Fix chasing range cavalry
This fixes chasing, particularly chasing ranged cavalry.

- Standardise the range of melee cav to 4.
- Decreases the speed of ranged cavalry slightly to make melee cavalry a
better counter & reduce the ability of ranged cavalry to dominate an
area.
- Fix UnitMotion to better chase units, by increasing direct-range
distance and making "from scratch" short paths recompute better paths
(by increasing the search range).
- Gives some free rotation time for slight angles to units. Angles below
30° take no time to rotate towards. Chasing units that recomputed a lot
of paths could be slowed down substantially by minute angle differences.

Fixes #5936

Differential Revision: https://code.wildfiregames.com/D3402
This was SVN commit r24708.
2021-01-19 19:09:55 +00:00
wraitii bc7977946b Fix missing const in f737831167
This was SVN commit r24707.
2021-01-19 18:59:46 +00:00
vladislavbelov 7ec924107c Fixes RNC and RNG after merging terrain and unit ambient colors in 1cb4ee1634.
This was SVN commit r24706.
2021-01-19 18:54:07 +00:00
Stan 1311e22bb4 Add numbered icons for certain technologies.
Refs: D3404

This was SVN commit r24705.
2021-01-19 18:34:52 +00:00
Stan 078b4100c1 Fixes FreeBSD build on 12.2
- Fix compiler warning with Clang
- Fix usage of libiconv
- Fix an incorrect SSE macro in NVTT for SSE

Patch by: @madpilot and Stan
Fixes: #5255
Differential Revision: https://code.wildfiregames.com/D3421
This was SVN commit r24704.
2021-01-19 16:59:53 +00:00
wraitii e10202d64d Tweaks to the 'auto formation' feature.
- Add an option to control the 'null formation' override, so it can be
turned off/on independently of having a default formation set. It
defaults to "Walk/Patrol only".
- Make only 'walk' and 'patrol' orders use the default formation.

This makes the system more flexible, and easier to use for competitive
play.

Differential Revision: https://code.wildfiregames.com/D3413
This was SVN commit r24703.
2021-01-19 16:14:07 +00:00
wraitii f737831167 Use UnitMotion to predict target position in Attack.js to prevent 'dancing'
Attack.js can use UnitMotion to calculate the position of the unit in
the future, accounting for odd movements such
as zigzags, turnarouds and early stops (to the extent of the current
order).
This improves the resilience of units against the 'dancing' trick.

The linear interpolation is kept as a failsafe and to avoid an edge case
in the new prediction code.

Patch by: bb
Refs #5106

Differential Revision: https://code.wildfiregames.com/D3225
This was SVN commit r24701.
2021-01-19 15:59:03 +00:00
Freagarach 59b468a0df [Gameplay] - Increase Skiritai cost.
As pointed out by @Feldfeld, Spartan swordsmen are much better troops
than basic soldiers, yet hardly cost more. Moreover, 8e19745bba
practically doubled their gather speed (from 25% to 49%).
This raises their cost a bit, to a total of 125 resources, instead of
110. For comparison, basic infantry has a total cost of 100, champion
infantry 220.

Patch by: @Nescio
Differential revision: D3423
Reviewed by: @borg-, @wraitii
This was SVN commit r24700.
2021-01-19 13:55:47 +00:00
wraitii 0ba74a5cef Minor Hotkey editor QoL: enable Save on changes only.
This enables the 'save' button only when there is (probably) something
to save. It improves the UX of using the editor since it gives feedback
that the hotkeys were indeed saved.

Refs #5867

Differential Revision: https://code.wildfiregames.com/D3419
This was SVN commit r24699.
2021-01-19 13:14:20 +00:00
wraitii 876ac2fead Prevent double-click when moving the mouse.
SDL 2.0.9 introduced a 32-pixel leeway for double clicks to register,
which makes it possible to trigger "select all units of the same type"
behaviour while trying to select different units that are close by.

This effectively reverts that by setting the "hint" to 1.

Fixes #5920

Differential Revision: https://code.wildfiregames.com/D3420
This was SVN commit r24698.
2021-01-19 13:13:00 +00:00
Freagarach 60ac4543c1 [Gameplay] - Enable Cart apartment.
Basically a beefed up house.

Original patch by: @borg-
Redone by: @Nescio
Icon by: @Stan
Differential revision: D2917
Reviewed by: @borg-, @Palaxin,
Comments by: @Freagarach, @genava55, @wraitii
This was SVN commit r24697.
2021-01-19 11:05:12 +00:00
wraitii d42c76ceb7 Fix seleucid mercenary building the library after 04240f05a7
Fixes 04240f05a7

Reported by: Hidan
Differential Revision: https://code.wildfiregames.com/D3414
This was SVN commit r24696.
2021-01-19 08:54:07 +00:00
wraitii c777c11641 Delete obsolete ptol nubian archer
The Ptolemy have not used it since A21, and Kushites have a better
Nubian archer.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3415
This was SVN commit r24695.
2021-01-19 08:51:16 +00:00
Freagarach f1de414a6d Fix sound not played when being attacked by non-capture attacks.
Wrong assumptions on reviewing 2627714c07 and 7f7a3edfae made it such
that non-capture attacks did not play a being-attacked sound anymore.
We only want a different sound when being captured.

Differential revision: D3408
Tested by: @Stan
This was SVN commit r24694.
2021-01-19 07:22:27 +00:00
Freagarach 214299b6c1 [Gameplay] - Let Spartans start with a Champion.
The Kushites start their games with an healer, the Mauryas with an
elephant. The Spartans were known for their superior hoplites; this
patch gives them one champion infantry at game start, to make them feel
a bit different from other factions. It won't suddenly make them win
games, although it could help a bit defending against very early raids.
Somewhat relevant forum threads:
https://wildfiregames.com/forum/topic/35419-differentiating-civs-spartans/
and
https://wildfiregames.com/forum/topic/22868-rethinking-the-meta-with-sparta-a-historical-approach/?tab=comments#comment-338125.

Patch by: @Nescio
Differential revision: D3412
Reviewed by: @Palaxin, @wraitii
Reservations by: @ValihrAnt
Comment by: @borg-
This was SVN commit r24693.
2021-01-19 07:03:36 +00:00
Freagarach 77dc5ef955 [Gameplay] - Merge wonder population auras.
Since wonders already have many bonuses by default.
This merges the two population auras to one that increases the
population cap after researching the technology and instead of flat +50,
it now is relative: +20%.

Patch by: @Nescio
Differential revision: D2951
Reviewed by: @Palaxin
Comments by: @badosu, @borg-,
Reservations by: @bb, @Freagarach
This was SVN commit r24692.
2021-01-19 07:00:07 +00:00
wraitii 11ef6b17d0 [gameplay] Tweak market technologies
- Remove movement speed technology, which was a straight trade bonus.
- Buffed health tech from +2 armour to +50% HP, moved to town phase,
made costlier.
- Changed gain of trade techs to +15% each.

The intent is to slightly reduce the snowballing effect from trade
techs.

Patch by: Nescio
Comments by: borg-
Differential Revision: https://code.wildfiregames.com/D3357
This was SVN commit r24690.
2021-01-18 20:23:21 +00:00
wraitii 279f1823df [gameplay] Cleanup to / rebalancing of animal templates
All animals have the default resistance of 1H/1P/1C. This makes macemen
able to kill them again.
Damage has been reduced on some templates.
HP has been reduced across the board.
Fix the goat cost with respect to other domestic animals after
D3301/082bd8bd44.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3397
This was SVN commit r24689.
2021-01-18 20:19:38 +00:00
wraitii c57a4d90a1 Fix segfault from a formation infinite loop.
#5932 reported a segfault. The direct cause is an infinite loop in
Order.Repair in a formation controller.
There are multiple issues at play here, but the core problem is that the
controller has been marked for destruction, but remains alive over the
turn and UnitAI timers can fire. This leads to an unexpected state that
triggers an infinite loop.

To avoid this problem, immediately switch the formation controller to a
clean state when it's being disbanded.

Fixes #5932

Differential Revision: https://code.wildfiregames.com/D3410
This was SVN commit r24688.
2021-01-18 18:29:40 +00:00
wraitii 04240f05a7 [gameplay] Tweak mace, ptol, sele specific structures
- Make the library a Ptolemaic exclusive. The tech discount is 15%
unstackable.
- Enable Theater for Ptolemy & Seleucid, tweak stats.
- 'Hellenistic Metropolis' is now in the Civil Centre, and no longer
affects military colonies/crannogs.
- The Ptolemaic lighthouse no longer reveals all shores, instead simply
has a very large vision range. It's moved to City Phase.
- The Carthaginian super dock is moved to city pahse as well.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D3350
This was SVN commit r24687.
2021-01-18 18:19:11 +00:00
user1 8172dbbde0 Fix lobby gamelist issues when clients join and leave a match.
This patch will:

  - Pass `gameRegisterStanza` to `playerAssignmentsControl` constructor.
  - Remove handlers for `onClientJoin` and `onClientLeave` from
`gameRegisterStanza` class.
  - Call `gameRegisterStanza` method `sendImmediately` only once after
all handlers have run and after updating g_PlayerAssignments .
  - Remove from `gameRegisterStanza` the dependency on
`playerAssignmentsControl` since the `onClientJoin` and `onClientLeave`
handlers are removed.

Reviewers: Angen, wraitii

Accepted By: wraitii
Trac Tickets: #5929, #5933

Differential Revision: https://code.wildfiregames.com/D3406
This was SVN commit r24686.
2021-01-18 16:47:25 +00:00
wraitii d583048690 [gameplay] Make siege engines uncapturable
Siege engines are faster to destroy than to capture. As such, capture as
a default is annoying, since it's not the best tactical choice.
Unfortunately, fixing this for now means removing "Capturable" from
siege engines.

Rams/Siege towers retain 50 Pierce Armour, others get 25.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2493
This was SVN commit r24685.
2021-01-18 16:06:08 +00:00
wraitii 82a07e23fb Fix MapBrowser in MP
Network settings must be synchronised when the map selection is
submitted. Fixes ae9ea5b859.

Reported by: Imarok
Differential Revision: https://code.wildfiregames.com/D3405
This was SVN commit r24684.
2021-01-18 13:22:06 +00:00
Stan 6062a95720 Fix Jebel barka's pmp file.
This was SVN commit r24683.
2021-01-18 13:02:38 +00:00
Stan 483cef87d4 Fix 3872ee43b5 and 768c84aa46
Tested by: @Langbart
Fixes: #5934

Differential Revision: https://code.wildfiregames.com/D3409
This was SVN commit r24682.
2021-01-18 12:16:27 +00:00
wraitii a5bad817a0 Fix mod selector "refresh list" button.
Object.Keys() on GUI object doesn't work following 7c04ea0211.

Reported by: Stan
Fixes #5931

Differential Revision: https://code.wildfiregames.com/D3399
This was SVN commit r24681.
2021-01-18 11:32:51 +00:00
wraitii 58039b6017 [gameplay] Restore civic centre garrison healing
This was removed originally in D3264/eb1163b872.
It made early-game aggression less viable.

Approved By: FeldFeld, borg-, ValihrAnt
Differential Revision: https://code.wildfiregames.com/D3401
This was SVN commit r24680.
2021-01-18 11:21:35 +00:00
wraitii 3ecad00672 [gameplay] Delete armor_hero_01 technology
This unique technology for heroes was not useful.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2939
This was SVN commit r24679.
2021-01-18 11:17:52 +00:00
vladislavbelov e5d00c29d7 Removes showsky from intro after 549b6893ce. Fixes #5935
This was SVN commit r24678.
2021-01-18 11:15:48 +00:00
wraitii b890cc4780 Fix savegame list being too high.
It was occluding the input field when saving, and the border in any
case.

Reported by: nifa
Differential Revision: https://code.wildfiregames.com/D3383
This was SVN commit r24677.
2021-01-18 11:06:44 +00:00
wraitii f0b87ff13c Fix market waypoints.
(setting waypoints to more than 2 markets still does not work properly,
but it also did not in A23).

Fixes #5923

Differential Revision: https://code.wildfiregames.com/D3400
This was SVN commit r24676.
2021-01-18 11:00:02 +00:00
wraitii d0a42f2f00 Further Hotkey fixes.
12cceed3d9 broke meta-key releases. This fixes that.
Also fix a much older issue where pressing new keys would not release
less specific hotkeys.

Add tests.

Reported by: Imarok
Tested by: langbart
Fixes #5930
Fixes #5927

Differential Revision: https://code.wildfiregames.com/D3396
This was SVN commit r24675.
2021-01-18 10:58:16 +00:00
Stan 85a54b904e Fix trailing coma after 1cb4ee1634
This was SVN commit r24673.
2021-01-18 08:05:19 +00:00
s0600204 e01140b1b2 Improve detection of empty notification messages
In the case that a player started or aborted researching a phase
technology, a
blank line was being added to the chat history of the player in question
and
any mutual ally or observer, where the player, ally, or observer had
their
`gui.session.notifications.phase` setting at the default value of
"completed".

This was happening because in the above case the returned value of
`ChatMessageFormatSimulation.phase` class's `.parse()` method is `{text:
""}`.


Related a3eccc043d
Fixes #5921

This was SVN commit r24671.
2021-01-17 19:37:45 +00:00
wraitii 692e236499 Speed up carry capacity tech research / resource value modification.
Carry capacity changes triggered 4x recomputation of gather rates
(because modifiersManager isn't as efficient as it can be), and this was
slow enough to matter. This reduces the work sufficiently to not matter
much.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3373
This was SVN commit r24670.
2021-01-17 18:29:11 +00:00
Angen 2d9e74598a [Petra/Ai] Fix not traning champion cavalry and infantry after 925170f600 and 8ee6774d12
Since champions have been moved to barracks, researching unlocking
technologies became the must in order to train them.
Therefore:

Specificaly research `unlock champion` technologies.
Increase priority of minor techs to 250.
Remove some duplicated checks.

Differential revision: D3380
Reviewed by: @wraitii
This was SVN commit r24669.
2021-01-17 16:13:31 +00:00
s0600204 6bb1de61ec Format hotkey tooltip when an alternate key-name is used
Some keys have multiple names that they may be identified by in config
files,
such as the Escape key which may be identified by either "Esc" or
"Escape", or
the number-pad keys which may be identified with a name in the form
"Num{xxx}"
(e.g. "NumMinus") or the alternate "Keypad {x}" (e.g. "Keypad -").

The alternate names were not being picked up and formatted correctly
when
displayed in tooltips. Now they are.


Accepted By: wraitii
Differential Revision: https://code.wildfiregames.com/D3358
This was SVN commit r24668.
2021-01-17 16:04:51 +00:00
wraitii 5657c5211b Make the in-game menu go over the dev overlay.
There was a Z-conflict since the addition of the hotkeys button.

Patch by: ffffffff
Fixes #5928

Differential Revision: https://code.wildfiregames.com/D3393
This was SVN commit r24667.
2021-01-17 15:58:11 +00:00
Stan 3872ee43b5 Fix 768c84aa46 style, add tests.
Patch by: @bb
Small fixes by: @Stan
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3103
This was SVN commit r24665.
2021-01-17 15:44:14 +00:00
Stan 4c4da81cc4 Fix no pch build.
This was SVN commit r24664.
2021-01-17 15:40:10 +00:00
vladislavbelov 549b6893ce Removes sky toggling by a hotkey.
Reported By: Langbart
This was SVN commit r24663.
2021-01-17 14:27:44 +00:00
vladislavbelov 57389cb9cb Partly restores the requested functionality to hide skies removed in 78d4dd0109.
This was SVN commit r24662.
2021-01-17 13:28:37 +00:00
vladislavbelov 1cb4ee1634 Combines terrain and units ambient colors into the single color.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3237
This was SVN commit r24661.
2021-01-17 13:10:00 +00:00
vladislavbelov 6ddbf75db1 Increase PMP version for checkrefs.pl after 2f8c7cf575.
This was SVN commit r24660.
2021-01-17 11:01:11 +00:00
Freagarach 931afb9989 [Gameplay] - Purge Roman Sibylline Books and Cart Exploration techs.
Since it affects gameplay also in a negative way (units wandering off
farther) and that entities with already high vision range benefit much
more than those with smaller vision ranges (the area is pi times radius
square).

Patch by: @borg-
Differential revision: D3365
Reviewed by: @Nescio, @wowgetoffyourcellphone
Comments by: @Freagarach, @wraitii
This was SVN commit r24659.
2021-01-17 09:50:27 +00:00
Freagarach abe35ed029 [Gameplay] - Reduce Archer and Structure ranges.
Due to the new way attack ranges are calculated (d0fc8ff67d), structures
can shoot significantly further, making raiding much harder.
This patch lowers the maximum attack range of archers and structures
from 70 to 60, and of slingers from 50 to 45 (javelineers keep 30), as
requested by @Feldfeld and @ValihrAnt. It also reduces the vision range
of defensive structures and artillery accordingly.

Patch by: @Nescio
Differential revision: D3381
Reviewed by: @wraitii
Informally accepted by: @borg-
Comment by: @Angen
This was SVN commit r24658.
2021-01-17 09:42:20 +00:00
Freagarach 8ee6774d12 [Gameplay] - Move infantry from fortress to barracks only.
Having some civs able to train their champions at the barracks, others
at (not too expensive) specific structures and some only at the (still
expensive) fortress is neither consistent nor balanced.

Patch by: @Nescio
Differential revision: D3384
Reviewed by: @borg-
Idea approved by: @wraitii
This was SVN commit r24657.
2021-01-17 09:36:00 +00:00
Stan 6ea368d236 Fix missing geometry for the celt carnyx.
Reported by: @wowgetoffyourcellphone
Thread:
https://wildfiregames.com/forum/topic/35390-missing-geometry-for-carnyx

This was SVN commit r24656.
2021-01-17 09:34:46 +00:00
Freagarach fc7aa1d01e [Gameplay] - Tweak Ptol structure cive bonus again.
Changes from Cost and Build time to Cost and Health, for that is less
complicated.

Patch by: @borg-
Differential revision: D3355
Reviewed by: @Nescio
Comments by: @Freagarach, @wraitii
This was SVN commit r24655.
2021-01-17 09:10:09 +00:00
vladislavbelov 2f8c7cf575 Increases the maps version to 7 for XML and PMP files.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3281
This was SVN commit r24653.
2021-01-17 02:12:04 +00:00
vladislavbelov 4a69e9117e Removes usages of GetRenderPath to checking for support of shaders.
This was SVN commit r24652.
2021-01-16 23:18:56 +00:00
vladislavbelov 78d4dd0109 Removes useless option to show sky
Differential Revision: https://code.wildfiregames.com/D3382
This was SVN commit r24651.
2021-01-16 21:16:31 +00:00
wraitii 1eb342c595 Fix missing 'else return' in isPressed following 12cceed3d9
Reported by Vladislavbelov & nephele

This was SVN commit r24650.
2021-01-16 17:16:02 +00:00
wraitii e9fa4445f5 Swap Ptolemaic Slinger & Javelineer
D3269 / 1649a8c221 made Mercenaries unable to gather. Ptolemies
Javelineers are mercs, so thy now had a non-gatherer starter unit,
putting them at a disadvantage.
This swaps the Merc javelineer with the slinger to correct for that.

Patch by: Nescio (for Stockfish0ad)
Differential Revision: https://code.wildfiregames.com/D3378
This was SVN commit r24649.
2021-01-16 15:57:42 +00:00
wraitii 55fd2b3441 Fix typos in 12cceed3d9
Fix 12cceed3d9

This was SVN commit r24648.
2021-01-16 15:46:56 +00:00
wraitii 61236cae5b Improve cavalry balance.
- Spear cavalry counters Cavalry better
- Sword cavalry performs better against ranged units, having lower hack
armor but better pierce armour.
- Sword cavalry performs worse against Spear cavalry (same reason).

Patch by: borg-
Differential Revision: https://code.wildfiregames.com/D3256
This was SVN commit r24647.
2021-01-16 15:36:20 +00:00
wraitii 78dc5ffc7d Fix a few template oversights in recent commits.
This patch fixes a few oversights:
* When redoing D3287, a typo slipped in, spotted by @borg-: “wood”
instead of “food”.
* From the same patch, @Angen suggested to change a technology name,
from “Metal Shield” to “Metal Rim”.
* When redoing D2494, I missed that the ptol polybolos has a third less
reload time; as a consequence its damage per second is now 50% higher
than that of other bolt-shooters; this patch fixes that by adjusting its
damage.
* Likewise, D3235 adjusted archer attacks but omitted the crossbowman,
which currently has half the base damage of its champion counterpart but
three times the reload time, which means its damage per second is only
one-sixth the archer's; this patch raises its base damage sixfold to
give the crossbowman the same damage per second as the archer.

Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3375
This was SVN commit r24646.
2021-01-16 15:32:29 +00:00
wraitii 12cceed3d9 Fix hotkeys not releasing properly.
a4852c4c01 changed hotkeys to use scancode, but didn't change g_keys to
reflect that, and this could break hotkey release.
This fixes that by explicitly using scancodes. Note that we might want a
g_keys map in the future, but it seems un-necessary at the moment.

Also remove the last remnants of 'negated' hotkeys, which were disabled
following b995135138.

Tested By: OptimusShepard
Fixes #5922

Differential Revision: https://code.wildfiregames.com/D3379
This was SVN commit r24645.
2021-01-16 15:24:58 +00:00
wraitii 7f1ee23d88 Fix AI's handling of buildRestriction distances following d0fc8ff67d
d0fc8ff67d / D2759 make buildRestriction distances take obstruction
sizes into account.
This requires AI adjustment, which wasn't done then.

Differential Revision: https://code.wildfiregames.com/D3364
This was SVN commit r24643.
2021-01-16 10:41:59 +00:00
wraitii e2ff38453f Fix lag on OOS with AIs
Following 9fc6c3c897, the OOS debugSerializer would try to serialize AI
objects entirely. This is extremely slow (might be an infinite loop in
some cases).
Instead, it should print the result of Serialize() in those cases.

(The original idea was that it would print more debugging information,
but in practice it seems to mostly print things that show up when
diffing but aren't actually sources of OOS, so essentially garbage).

Fixes #5917

Differential Revision: https://code.wildfiregames.com/D3361
This was SVN commit r24641.
2021-01-16 10:33:00 +00:00
Freagarach 925170f600 [Gameplay A24] - Unlock Champion Cavalry with a technology.
This puts them on-par with champion infantry.

Patch by: @Nescio
Differential revision: D3372
Reviewed by: @borg-
Comment by: @wraitii
This was SVN commit r24640.
2021-01-16 06:50:45 +00:00
Freagarach 5cccc7b282 [Gameplay A24] - Remove Spartan population penalty.
Since they don't have much bonuses (structure health, stronger female
citizens) to stand up against two penalties (no stone walls and this).
This removes the population penalty; other civilisations have better
bonuses but no such penalties.
Besides, Sparta was larger than other city states in ancient Greece,
both in terms of area and army size.

Patch by: @Nescio
Differential revision: D3376
Reviewed by: @borg-
This was SVN commit r24639.
2021-01-16 06:41:28 +00:00
Freagarach b5c783e519 [Gameplay A24] - Tweak Melee Infantry range.
- axemen, macemen, swordsmen: 3.5 -> 3
- spearmen: 4.5 -> 4
- pikemen: 7 -> 8
In single combat or small numbers the effect of this patch is probably
negligible; however, in large groups more pikemen could hit a single
target. Given that pikemen have by far the lowest damage per second,
increasing the range differences won't hurt.
In reality pikes were two to three times as long as spears, and up to
six pikes extended in front before an opponent could touch the first
pikemen, so this improves historical realism too.

Patch by: @Nescio
Differential revision: D3080
Reviewed by: @borg-
Comment by: @wratiii
This was SVN commit r24638.
2021-01-16 06:37:51 +00:00
Freagarach 91ee0093ca [Gameplay A24] - Tweak War Elephant damage.
Now that rams are available to all civs, it's no longer necessary for
elephants to keep having the same amount of crush damage as rams.
This patch therefore reduces their crush damage by 20%, but raises their
hack damage by 50%, making them less effective vs structures but better
against units.

Patch by: @Nescio
Differential revision: D3371
Reviewed by: @borg-, @wraitii
This was SVN commit r24637.
2021-01-15 18:28:48 +00:00
Freagarach afff5b9f8d [Gameplay A24] - Reduce ranged soldier resistance.
A frequent complaint is that ranged troops are too effective in 0 A.D.
They're supposed to die quickly, however, they get the same resistance
increases as melee troops. This limits the advanced and elite resistance
bonus to melee only (thus also excluding healers) and reduces the
resistance of ranged champions and heroes by two levels, to stay in pace
with their elite counterparts.
As a consequence, nothing changes for basic ranged troops, but advanced
are about 11% easier to kill, and elite, champion, and heroes about 23%.

Patch by: @Nescio
Differential revision: D3369
Reviewed by: @wraitii
Comment by: @borg-
This was SVN commit r24636.
2021-01-15 18:24:59 +00:00
Freagarach 1649a8c221 [Gameplay A24] - Differentiate mercenaries further from Citizen Soldiers.
Mercenaries:
- Can't gather but can build structures.
- Cost 60% less food, neither wood nor stone, but metal.
- Less training time.

Patch by: @Nescio
Differential revision: D3269
Reviewed by: @borg-, @wraitii
This was SVN commit r24635.
2021-01-15 18:18:57 +00:00
Freagarach 2eda2a0ab4 [Gameplay A24] - Add Carnyx unit to Gaul.
The carnyx was a long, bronze, Celtic trumpet and used on the
battlefield; its sound would intimidate opponents.
This patch introduces a trainable infantry champion for the carnyx-using
actor, at the assembly, and adds a generic template and an aura file,
which lowers the attack damage of nearby enemy soldiers a bit.
While it has an aura that could make a difference, it has no training
restrictions (unlike heroes); to compensate for that, it has a higher
cost, less resistance and less attack damage than other champions. If it
turns out to make the Gauls too strong, its values can be adjusted in
the future.
Having this (historically attested) unit would make the Gauls less
similar to other civs.

The specific name was suggested by @genava55 on the forums.
Icon adapted by @Stan from @niektb.

Original patch by: @Stan
Redone by: @Nescio
Differential revision: D3320
Reviewed by: @borg-
Comments by: @Freagarach
This was SVN commit r24634.
2021-01-15 18:11:14 +00:00
vladislavbelov aede7473f2 Makes the color of tutorial new messages softer.
This was SVN commit r24633.
2021-01-15 17:25:12 +00:00
FeXoR 6f3c0e18cf Remove heightmap grascale pictures and corresponding scenarios due to uncertain copyright status
Differential Revision: D2777
	Fixes #5112
	Patch by @Nescio
	Accepted by @FeXoR

This was SVN commit r24632.
2021-01-15 16:51:06 +00:00
wraitii 6a67e9a52d Address concerns in 5473393e30 (RL interface)
Fixes 5473393e30.

This:
- Puts RL code under the RL namespace to avoid name collisions
- Avoids usage of new/delete
- Adds more documentation
- Does general cleanup (const-correctness, move semantics, argument
types, early returns...)

Patch by: irishninja
Comments by: Vladislavbelov, wraitii
Differential Revision: https://code.wildfiregames.com/D2947
This was SVN commit r24631.
2021-01-15 16:30:05 +00:00
vladislavbelov 6282960991 Removes useless option for shadows on water
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3368
This was SVN commit r24630.
2021-01-15 15:45:39 +00:00
Stan de2b16a904 Prevent the game from playing sounds too often (8 times for a cavalry slaughter animation) and allow for subprops with a different event time to still play the sound at the same as their parent.
Comments by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D3118
This was SVN commit r24629.
2021-01-15 14:34:45 +00:00
wraitii 01d24173d2 Make the Athenian long_walls tech cost stone.
A pure stone cost makes it easier to research and more unique.

Patch By: borg-
Accepted By: wraitii, Nescio
Differential Revision: https://code.wildfiregames.com/D3356
This was SVN commit r24628.
2021-01-15 13:02:24 +00:00
vladislavbelov 3dd37c687e Fixes PCH and removes unused warnings after 25332f9b86.
This was SVN commit r24627.
2021-01-15 11:21:24 +00:00
Stan b57ee3c18d Use arrow sounds instead of flesh sounds for javelins.
Patch by: @Samulis
This was SVN commit r24626.
2021-01-15 10:09:03 +00:00
vladislavbelov b1a89fbd89 Replaces UNICODE characters in the code by consistent ASCII characters.
Beside consistency improves reading for such console tools like svn diff
or vim diff.

This was SVN commit r24625.
2021-01-15 10:07:36 +00:00
wraitii 171afdc7a6 Make foundations not ConquestCritical
Foundations were originally made conquest critical in 722578fdcd.
However, it remains rather frustrating that a player can evade defeat by
placing an unbuilt, uncommitted foundation. While allies can revive a
player with only a foundation, that cannot happen in 1v1, where it is
simply undue frustration, and the inconvenience seems greater than the
feature.
This thus removes them again from the conquest critical list.

Patch By: nephele
Differential Revision: https://code.wildfiregames.com/D2674
This was SVN commit r24624.
2021-01-15 10:02:31 +00:00
wraitii ce9e965afd Remove population bonus from most non-house buildings.
Houses increase the population limit. Various other structures did it
too as a side-effect.
This changes that, making houses more unique.

This also removes the Gaul/Brit bonus that most buildings increased
population, as they already build structures 20% faster and that is
deemed a sufficient early-game advantage.

Accepted By: borg-
Differential Revision: https://code.wildfiregames.com/D2950
This was SVN commit r24623.
2021-01-15 09:19:08 +00:00
Freagarach 46a5b704ac Avoid GUI errors for captured structures with paired tech of different civ.
If there is a building that has a paired tech researchable, where the
two techs have a civ requirement but the parent pair tech doesn't, then
the selection panels will throw errors.
This has happened with add6b0206c,
https://wildfiregames.com/forum/index.php?/topic/24732-de-alpha-24/page/2/
and other incidences.
Now when both paired techs have an unmet civ dependency they are not
shown, when one of them hasn't, it is shown.

Fixes: #5915
Original patch by: @elexis
Changes by: @Freagarach
Differential revision: D2171
Comment by: @Imarok
This was SVN commit r24621.
2021-01-15 08:55:01 +00:00
Freagarach 6a871f7d3c Building snapping loading screen tip.
Since many players might not notice the new snapping feature
(a8f241da5d), a loading screen tip is nice.

Patch by: @elexis
Differential revision: D2545
Comments by: @bb, @Nescio, @vladislavbelov
Some minor changes by: @Freagarach
This was SVN commit r24620.
2021-01-15 08:47:31 +00:00
Freagarach 313bd29786 Add loading screen tip for heroes.
Because heroes permanently die (de3ed2cd19) it is nice to users of that.

Differential revision: D3294
Comments by: @Nescio, @Stan
This was SVN commit r24619.
2021-01-15 08:36:57 +00:00
wraitii 0944856cc1 Allow hotkeys/config settings to be empty.
This changes ConfigDB to support empty settings, marked with `= ""`. It
also changes hotkey to handle unused hotkeys, but stil have them appear
in the hotkey editor.
Fixes an issue where the current editor would bug when saving an empty
hotkey.
Removes the old system for unused hotkeys, adjust hotkey files
accordingly.

Reported by: FeldFeld
Differential Revision: https://code.wildfiregames.com/D3307
This was SVN commit r24618.
2021-01-15 08:05:10 +00:00
Freagarach e5bd8a7aa5 Fix Jebel Barkal giant.
Adjusts the jb.js to not try and place walls outside of the map.
Only adds really added walls to the entity list (refs. #5919).

Patch by: @elexis
Differential revision: D3299
Tested by: @Freagarach, @Stan
Fixes: #5177
Refs. #5150

This was SVN commit r24617.
2021-01-15 07:59:19 +00:00
wraitii 292d2c5d19 NetClient: don't LOGERROR when flushing messages while disconnected.
The NetClient code is now threaded, and this means it can try to flush
messages while 'knowingly' being disconnected.
This can be avoided by storing some state in NetClientSession

Improves 2d40068cd1, refs #3700

Differential Revision: https://code.wildfiregames.com/D3352
This was SVN commit r24616.
2021-01-15 07:54:55 +00:00
Freagarach 03fa2f4728 [Gameplay A24] - Adjust elephant temlate values.
- Changes the Hero Elephant damage to twice that of Champion Elephants
(consistent with other classes).
- Reduces Champion Elephant crush damage resistance to the same of other
Champions.
- Give all elephants the same walk speed.
- Removed the bonus vs cav from GAIA elephants.

Patch by: @Nescio
Differential revision: D2853
Reviewed by: @borg-, @wraitii
Comments by: @Feldfeld
This was SVN commit r24615.
2021-01-15 07:49:35 +00:00
wraitii 9c88071149 Fix gamesetup map size not updating for clients.
Clients don't get map size updates shown in the gamesetup (they do
appear in the description).

Tested by: Freagarach
Differential Revision: https://code.wildfiregames.com/D3351
This was SVN commit r24614.
2021-01-15 07:48:12 +00:00
Freagarach 8421ba77fb Fix PetraAI not building many houses.
Previous to 7f77cf2f3e the AI got its population bonus per entity from
the Cost component, which every entity happened to have.
Thereafter, the population bonus was handled by a separate component,
which was not always present leading to `(void 0)` additions to the pop
cap and PetraAI not constructing houses.

Differential revision: D3360
Reviewed by: @Angen, @wraitii
This was SVN commit r24613.
2021-01-15 05:59:23 +00:00
Freagarach 89060a3efa [Gameplay A24] - Enable elephant stables for all civs with elephants.
And moves elephant training thereto.
This means the Persians get to train them again, by popular demand.
Mauryas are not the only ones anymore that have the elephant stables,
but they can build it earlier.

Patch by: @Nescio
Differential revision: D3362
Reviewed by: @borg-
This was SVN commit r24612.
2021-01-15 05:53:26 +00:00
s0600204 c064772609 Adjust subsection sizes of civinfo page
To better fit the content being displayed.

Patch by: @Nescio
Accepted by: @s0600204
Differential Revision: https://code.wildfiregames.com/D3295
This was SVN commit r24611.
2021-01-14 22:56:54 +00:00
wraitii 6fa478e31a Fix common OOS following 7460d0e56e.
7460d0e56e uses a GCHashTable to recognize objects. However, It should
have used MovableCellHasher to maintain a stble hashmaps when GC
pointers change.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3363
This was SVN commit r24610.
2021-01-14 20:08:32 +00:00
user1 346bd50c8c Do not show message box in lobby for an empty message with no sender.
Reviewed By: wraitii
Trac Tickets: #5348

Differential Revision: https://code.wildfiregames.com/D3354
This was SVN commit r24609.
2021-01-14 19:12:12 +00:00
Freagarach 86ddf09640 [Gameplay A24] - Drastically change artillery attacks.
Artillery is not that effective in 0 A.D., partly because their damage
per second is unimpressive (especially compared to rams or war
elephants), partly because of their splash damage.
Splash damage was added in f72d820cd4 (nearly eight years ago). The
values have changed multiple times, as has the exact calculation (see
simulation/components/Attack.js). While it's quite interesting in
theory, in practice it's not that effective. @fatherbushido explained
how it works on the forums. It's important to understand the actual
splash damage depends on the distance to the centre of entities, in
contrast to ordinary attacks, which do full damage when they hit the
footprint (edge).
Splash damage has some serious problems:
- It may have no effect vs entities with footprints longer than the
splash radius, such as many (most?) structures and warships.
- The AI does not take it into account.
- It's anachronistic: exploding shells did not exist yet in 0 A.D.'s
timeframe. Missiles were rigid objections, and even the very largest
projectiles were well under a metre in diameter.

This patch therefore removes splash damage from artillery (except bolt
shooters).
Fireships and fireraisers now deal fire damage instead of a combination
of other damage types.

Basically, stone throwers are good against large unit masses and
structures only, while bolt shooters are unit killers.
Artillery and bolt towers no longer get additional projectiles from
garrisoned units.
Roman artillery does not get a larger range but keeps the increased
damage.

Patch by: @Nescio
Differential revision: D2494
Reviewed by: @borg-, @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24608.
2021-01-14 16:18:26 +00:00
Freagarach c2f5ddfc68 Fix wrong variable usage in UnitActions.js.
Introduced in 32583008a0. Experienced by @wraitii.

Differential revision: D3359
Reviewed by: @wraitii
This was SVN commit r24607.
2021-01-14 12:29:26 +00:00
Freagarach 0c673522b6 [Gameplay A24] - Adjust some siege engine stats.
- Changes footprints to better match their visuals.
- Lowers ram cost to compensate for ther reduced effectiveness (against
units).
- Loot = 20% cost.
- Change experience loot to relate to health.
- Give Kush ram +2 garrison capacity and +20 attack damage since it is
the same actor as the Persian ram.
- Adjust fireraiser template.

Patch by: @Nescio
Differential revision: D3345
Reviewed by: @borg-
This was SVN commit r24606.
2021-01-14 12:27:05 +00:00
Freagarach 837a9dfac5 [Gameplay A24] - Move shared vision / dropsites to CC.
Since they are conceptually more policical techs than commercial.

Patch by: @Nescio
Differential revision: D3321
Reviewed by: @borg-
This was SVN commit r24605.
2021-01-14 12:17:46 +00:00
Freagarach 9a3da390b9 [Gameplay A24] - Seperate forge armour techs.
This separates the pierce and hack damage resistance techs but lets them
apply to all soldiers (including elephants).

Patch by: @borg-
Differential revision: D3287
Reviewed by: @Nescio, @wraitii
This was SVN commit r24604.
2021-01-14 12:14:03 +00:00
Stan e3b2cc61c1 Use the same background for the techs.
This was SVN commit r24603.
2021-01-14 12:11:17 +00:00
Stan 3886776a04 Fix some icons as per Nescio's comment on 0138039a67
Refs: https://code.wildfiregames.com/D1779 14a8ec3b20

This was SVN commit r24602.
2021-01-14 11:09:08 +00:00
s0600204 b594266008 Use correct hotkey in tooltip of Reference Suite's Close Buttons
The various pages of the Reference Suite (`structree`, `civinfo`,
`viewer`) all
use the same `CloseButton` object, and the same hotkey to close each
page.

The hotkey that is listened for is the one assigned to `cancel`, however
the
tooltip was attempting to display the hotkey assigned to `close` (which
doesn't
actually exist).

This was SVN commit r24601.
2021-01-14 01:48:21 +00:00
vladislavbelov 5b626246ae Removes remaining after 6f3b4b31fd shadow calculations in water models.
This was SVN commit r24600.
2021-01-13 23:31:37 +00:00
vladislavbelov a9c27b412b Removes CPU lighting after no FFP
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D3346
This was SVN commit r24599.
2021-01-13 21:03:55 +00:00
vladislavbelov 6f3b4b31fd Removes GLSL shaders code duplication for fog and shadows
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D3340
This was SVN commit r24598.
2021-01-13 20:44:27 +00:00
Stan f06733f305 [gameplay A24] Enable gaul assembly
Refs: https://code.wildfiregames.com/D3320

Patch by: @Nescio
Reviewed by: @borg-
Differential Revision: https://code.wildfiregames.com/D3344
This was SVN commit r24597.
2021-01-13 15:59:58 +00:00
wraitii 847793ee7f Do not count formation members as 'idle' if the controller is not.
This made citizen workers show up in the 'idle worker' GUI button when
e.g. formation-patrolling between two points (since 6778fc4ea6 / D2913)

Co-written with: Freagarach

Differential Revision: https://code.wildfiregames.com/D3335
This was SVN commit r24596.
2021-01-13 15:27:18 +00:00
wraitii 6ed6dcdfd9 Fix xmlvalidator following a4852c4c01
The xmlValidator complained about GUI pages.
ff924aaffc missed that script.

Fixes #5912

Differential Revision: https://code.wildfiregames.com/D3349
This was SVN commit r24594.
2021-01-13 10:33:01 +00:00
wraitii 65772447f7 Fix shadows-on-water option.
Fixes 26f7a3df96 & 8a1b3d6769.
Use watershadows instead of shadowsonwater for coherence.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3348
This was SVN commit r24593.
2021-01-13 10:04:25 +00:00
Stan 9bfdc46aa3 Fix issue with duplicate tags. Perl script doesn't like it.
This was SVN commit r24592.
2021-01-13 09:15:02 +00:00
Freagarach ae5e10b956 Fix typo in e8d99aedee after rebasing.
Spotted by @Angen.

This was SVN commit r24591.
2021-01-13 09:01:45 +00:00
Freagarach 5bd78d774d [Gameplay A24] - Alter ptol structure bonus.
Remove free structures but reduce their wood cost.

Patch by: @Nescio
Differential revision: D3329
Reviewed by: @borg-
This was SVN commit r24590.
2021-01-13 07:00:55 +00:00
Freagarach e8d99aedee [Gameplay A24] - Change nisean_horses technology.
Nisean war horses were reserved for the heaviest shock cavalry (i.e.
champion spearmen in 0 A.D.).
- Limit to Champion Cavalry Spearmen.
- Increase training time by 10%.
- Food cost raised to 400.
- Made the "Horse Breeding" technology a requirement.

Original patch by: @borg-
Taken over by: @Nescio
Reviewed by: @borg-
Comments by: @Feldfeld, @Palaxin, @ValihrAnt
This was SVN commit r24589.
2021-01-13 06:54:21 +00:00
Freagarach fd904dd635 [Gameplay A24] - Add new Gaul civ bonus.
Giving their cavalry +10% melee attack damage.

Patch by: @Nescio
Differential revision: D3328
Reviewed by: @borg-
This was SVN commit r24588.
2021-01-13 06:40:40 +00:00
Stan 0138039a67 Add some new technologies icons and update some others from Delenda Est
This was SVN commit r24587.
2021-01-13 02:36:14 +00:00
Stan 90bdbc9470 Add a unused gaul carnyx player actor for https://code.wildfiregames.com/D3320
This was SVN commit r24586.
2021-01-13 01:48:23 +00:00
Stan b7443e5508 Improved sounds by @Samulis.
Refs: #5856 https://code.wildfiregames.com/D3113

This was SVN commit r24585.
2021-01-13 01:40:13 +00:00
Stan 401d76e1c0 Improved sling impact sounds by @Samulis.
Rename to match conventions, set piority to 80 as per the wiki.

Refs: #5856 https://code.wildfiregames.com/D3113

This was SVN commit r24584.
2021-01-13 01:39:50 +00:00
Stan 501ce20226 Improved shield impact sounds by @Samulis.
Rename to match conventions, set piority to 80 as per the wiki.

Refs: #5856 https://code.wildfiregames.com/D3113

This was SVN commit r24583.
2021-01-13 01:31:58 +00:00
Stan 882459ebc3 Improved arrow impact sounds by @Samulis.
Rename to match conventions, set piority to 80 as per the wiki.

Refs: #5856 https://code.wildfiregames.com/D3113

This was SVN commit r24582.
2021-01-13 01:21:43 +00:00
Stan 2f32b68f1a Fix priorities according to https://trac.wildfiregames.com/wiki/SoundGroup
This was SVN commit r24581.
2021-01-13 00:53:38 +00:00
Stan e5339a66c6 Improved construction sounds by @Samulis
While at it fix the priority following
https://trac.wildfiregames.com/wiki/SoundGroup

Refs: https://github.com/0ADMods/SoundsMod/pull/2

This was SVN commit r24580.
2021-01-13 00:48:44 +00:00
Stan 735c8918af Improved gather meat sounds
Fix an incorrectly named variant,
Enable gather meat sounds
Replace the sword attack sound by a knife attack sound

Patch by: @Samulis
This was SVN commit r24579.
2021-01-13 00:06:03 +00:00
Stan 0f1ba33750 Improved lumbering sounds by @Samulis
Refs: https://github.com/0ADMods/SoundsMod/pull/2

This was SVN commit r24578.
2021-01-12 23:55:15 +00:00
vladislavbelov e5cbd3decd Removes unused GL texture properties after removed FFP.
This was SVN commit r24577.
2021-01-12 23:18:29 +00:00
vladislavbelov f1a3b446f7 Removes the unused terrain rendering function after removed FFP.
This was SVN commit r24576.
2021-01-12 23:14:08 +00:00
Stan 2556fb9ba9 Use the correct sound for healer creation
Patch by: @lion.kanzen
This was SVN commit r24575.
2021-01-12 23:08:22 +00:00
Stan 5093182c4e Improved foraging leaves sound (when gathering fruit). Actually enable the sound. Fix naming.
Patch by: @Samulis
This was SVN commit r24574.
2021-01-12 23:02:57 +00:00
Stan 01c10bf74d New selection sound for the library by @lionkanzen
This was SVN commit r24573.
2021-01-12 22:47:05 +00:00
Stan f44c16462b Improved archery sounds by @samulis
Refs: ​https://github.com/0ADMods/SoundsMod/pull/2

This was SVN commit r24572.
2021-01-12 22:42:14 +00:00
Stan 3a1dbf315e Improved javelin attack sounds by @Samulis
Refs: https://github.com/0ADMods/SoundsMod/pull/2

This was SVN commit r24571.
2021-01-12 22:33:07 +00:00
Stan 9dbf1554f4 Improved pike attack sounds by @Samulis
Refs: https://github.com/0ADMods/SoundsMod/pull/2

This was SVN commit r24570.
2021-01-12 22:32:18 +00:00
Stan f96c3a24a9 Improved spear attack sounds by @Samulis
Refs: https://github.com/0ADMods/SoundsMod/pull/2

This was SVN commit r24569.
2021-01-12 22:29:56 +00:00
Stan 7bf454398c Improved sword attack sounds by @Samulis
Refs: https://github.com/0ADMods/SoundsMod/pull/2

This was SVN commit r24568.
2021-01-12 22:28:27 +00:00
Angen 3273ff13bf [gameplay] 10% loot for support units and ranged slinger
Change loot for support units and citizen soldiers following champion
loot pattern from 84a3f36537

10% loot is present for other citizen soldiers so this makes quite sense
for support units as well

last rebalance done in 94791c53c6

Differential revision: D3327
Comments by: Nescio, borg-
This was SVN commit r24567.
2021-01-12 19:30:30 +00:00
Freagarach a0288b9c9b Rename Gaul Theater to Assembly.
Its function is different. Meaningful values remain unchanged.

Patch by: @Nescio
Differential revision: D3331
This was SVN commit r24566.
2021-01-12 19:25:35 +00:00
Imarok a3eccc043d Hint the location for "You have been attacked" notifications
Icon edited by Stan.
Fixes: #5132
Differential Revision: https://code.wildfiregames.com/D1461
This was SVN commit r24565.
2021-01-12 19:13:16 +00:00
Freagarach 1449ddf439 Correct technology tooltips and formatting.
Also puts resources on a new line and purges entries with `0`.
Moves the Immortal class visible since it is used by a technology (and
thus should be known to a player).

Patch by: @Nescio
Differential revision: D3338
This was SVN commit r24564.
2021-01-12 18:52:12 +00:00
wraitii 7460d0e56e Revert dad2857538 / Keep track of serialized objects using a GCHashTable
This reverts dad2857538. That diff had two issues:
- It modifies the JS objects, which means subsequent serialization in
quicksave are 'dirty'.
- It doesn't work with non-extensible objects. That's rather annoying,
and has already caused problems.
It also revert f0faab7a42, which was necessary because of the second
issue.

Fixes #5908

Differential Revision: https://code.wildfiregames.com/D3336
This was SVN commit r24563.
2021-01-12 18:43:45 +00:00
wraitii 511fe22a83 Add a map to test some 'dancing' evasion behaviour.
Test some cases of projectile evasion using:
- Manual dancing
- Patrol dancing
- 'Square' dancing.
- 'Zigzag' dancing.

Differential Revision: https://code.wildfiregames.com/D3325
This was SVN commit r24562.
2021-01-12 18:03:20 +00:00
wraitii 78764926f8 Fix 9fc6c3c897 - Set entity/template before deserializing.
Following 9fc6c3c897, components Deserialize() was called before
entity/template were set, which is incorrect.

Refs #4698.

Differential Revision: https://code.wildfiregames.com/D3337
This was SVN commit r24561.
2021-01-12 16:15:40 +00:00
Angen a3c810b5eb Remove U+FEFF character from kush elephant_stables and athen wonder
This character is invisible in templates, but pyrogenesis does not know
how to render it, so it renders missing character, which looks bad.
Thanks @s0600204 for grep investigation.

Reviewed by: @Nescio
Differential revision: D3323
This was SVN commit r24560.
2021-01-12 15:17:07 +00:00
Freagarach 71f9e2a30b Regroup special technologies.
Some techs are shared between multiple civs and having them in a folder
that is named differently (successors/hellenes) can be confusing.
This patch deprecates the subfolders and moves all techs in the main
folder.

(Also did svn propset on *.json to not have to do it for every changed
template.)

Patch by: @Nescio
Differential revision: D888
Comment by: @fatherbushido
This was SVN commit r24558.
2021-01-12 14:50:24 +00:00
Freagarach 962c896f28 Check for cmpUnitAI when extracting formations.
59d0885d68 Changed the way to get formation UnitAIs, but didn't account
for selecting entities with and without UnitAI.
This fixes that.

Differential revision: D3333
Reviewed by: @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24557.
2021-01-12 14:28:09 +00:00
Freagarach 300ff96d98 [Gameplay A24] - Enable Mauryan palace.
- Moves the maiden guard champions and heroes there.
- Removes the need to unlock champions.

Patch by: @Nescio
Differential revision: D3330
Reviewed by: @borg-
This was SVN commit r24556.
2021-01-12 14:25:37 +00:00
vladislavbelov ffcfdddb13 Adds author of the original patch for 25332f9b86 to credits.
This was SVN commit r24555.
2021-01-12 08:24:33 +00:00
vladislavbelov 63975ef977 Fixes include for 25332f9b86, map > unordered_map.
This was SVN commit r24554.
2021-01-12 07:49:48 +00:00
vladislavbelov 25332f9b86 Adds #include directive support to shaders
Comments By: Stan, wraitii
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3030
This was SVN commit r24553.
2021-01-11 23:23:30 +00:00
Freagarach 7a15ee1c21 [Gameplay A24] - Tweak Fortress cost and Health.
- 10% Lower build time.
- Cost changed from stonly [sic] to stone and wood.
- Reduced Health by 10%.
- Removed resistance addition.
- Equalised the Iberian fortress since there is no historical
justification.

Patch by: @Nescio
Differential revision: D3324
Reviewed by: @borg-
Comment by: @Stan
This was SVN commit r24552.
2021-01-11 20:06:45 +00:00
Stan 205486d6f3 Fix sound errors when no sound card is detected.
Based on a patch by: @Imarok
Refs: #3285

Differential Revision: https://code.wildfiregames.com/D1481
This was SVN commit r24551.
2021-01-11 18:56:33 +00:00
Imarok 687a9335f0 Remove cache detection
Reviewed by: wraitii
Fixes: #4360
Differential Revision: https://code.wildfiregames.com/D3165
This was SVN commit r24550.
2021-01-11 17:30:16 +00:00
Angen 7148aa5554 Display gather rates per subtype
Currently gather rates per subtype of resource are averaged , which
hides important information for players. Therefore they do not realise
some units may be better collecting grain or fruit.

Also removing todo from the code.

Thank @Stan for fruit and grain icons without cursor and new fish.

Differential revision: D3310
Accepted by: wraitii
Comments by: Freagarach, Nescio
Ref: #4077

This was SVN commit r24549.
2021-01-11 16:03:16 +00:00
Freagarach 1b2ef6988a [Gameplay A24] - Introduce two new technologies at the stable.
Now the stable is available for all civs (c4eeb82d83) new techs for it
are welcome.
This introduces:
- town-phase technology that gives cavalry +10% health;
- city-phase technology that gives the stable -0.1 corral batch training
time (similar to the one the barracks has).
The two Persian levy technologies, which used to give -20% training time
and -5% health, now simply grant -10% training time instead.

Patch by: @Nescio
Differential revision: D3317
Reviewed by: @borg-
This was SVN commit r24548.
2021-01-11 13:54:53 +00:00
Freagarach 2223336ce5 Fix cart super dock production queue.
6013aaebd3 removed training_phoenician_naval_architects but failed to
remove it from the super dock of Carthage.
Noticed by by @Angen.

This was SVN commit r24547.
2021-01-11 13:12:12 +00:00
Freagarach 6013aaebd3 [Gameplay A24] - Change ship technologies.
- +2 damage resistance -> +25% health and moved to city phase.
- +2 damage resistance -> +10% movement speed and moved to city phase.
- batch time modifier -> construction time
- Renames some stuff and cleans production queue.

Patch by: @Nescio
Differential revision: D2987
Reviewed by: @borg-
Comment by: @wraitii
This was SVN commit r24546.
2021-01-11 12:56:41 +00:00
Freagarach c2479d961f [Gameplay A24] - Make fireships unable to attack anything but ships.
Since they're essentially floating bonfires.

Patch by: @Nescio
Differential revision: D2802
Reviewed by: @wraitii
Informally accepted by: @borg-
Comment by: @elexis
This was SVN commit r24545.
2021-01-11 12:43:00 +00:00
Freagarach f7a6aa6f70 [Gameplay A24] - Move Citizen Soldier health increase from phase progression to promotion.
Patch by: @Nescio
Differential revision: D3315
Reviewed by: @borg-, @wraitii
This was SVN commit r24544.
2021-01-11 12:35:24 +00:00
Freagarach d6ff007088 Commit resources at dropsite and add tests.
cdfa6cb8b4 made it such that a ResourceGatherer takes a target to commit
resources, this extends that to dropping resources at the dropsite.
While add it also added some tests for ResourceDropsite and -Gatherer.

Differential revision: D3300
Comments by: @Stan, @wraitii
This was SVN commit r24543.
2021-01-11 11:59:07 +00:00
Freagarach 1c505439f7 Fix some C++-style notes from b5df81af76.
/ b5df81af76

Differential revision: D3096
Reviewed by: @vladislavbelov, @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24542.
2021-01-11 11:26:31 +00:00
Freagarach ebadfe260a [Gameplay A24] - Make unlock_shared_dropsites independent from unlock_shared_los.
Since one may start a match with all visible and then the tech is
useless and hides what is underneath.

Patch by: @Nescio
Differential revision: D2999
Reviewed by: @borg-
This was SVN commit r24541.
2021-01-11 09:42:38 +00:00
Freagarach 9eebd100ff [Gameplay A24] - Increase defensive structure vision range.
Fix larger structures being able to shoot further than they can see.
(At least for most cases, a large elevation bonus can still mess this
up.)

Patch by: @Nescio
Differential revision: D3314
Reviewed by: @borg-
This was SVN commit r24540.
2021-01-11 09:24:14 +00:00
Freagarach a46d74b14d [Gameplay A24] - Unify ranged attack ranges.
New values:
- javelineers: 30
- slingers: 50
- crossbowmen: 60
- archers and structures: 70
- archers with archery tradition - 80

Patch by: @Nescio
Differential revision: D3297
Reviewed by: @borg-
This was SVN commit r24539.
2021-01-11 09:21:24 +00:00
Freagarach ec26d3ef3f [Gameplay A24] - Deprecate Gaul Tavern.
Taverns only appeared as a consequence of growing Roman influence
(https://wildfiregames.com/forum/topic/24495-celtic-reference/page/6/?tab=comments#comment-399399)
in the first century BC.
Moves fanatics to their temple.

Patch by: @Nescio
Differential revision: D3316
Reviewed by: @borg-
Comments by: @Stan
This was SVN commit r24538.
2021-01-11 09:16:56 +00:00
Freagarach 9b78b4476e Some cleaning in input.js.
Make linter useful again.

- var -> let
- Linter issues (except default cases for switches).
- Delete unused comments.
- Removed some trailing commas in objects.

Differential revision: D3298
This was SVN commit r24537.
2021-01-11 09:10:38 +00:00
s0600204 0bf18827d9 Restore civ-specific buildings to the civinfo page
Adds a new class `CivSpecific` which, when combined with the `Structure`
class,
is then used by the `civinfo` page to identify buildable structures
specific to
a selected civilisation. (The `SpecialBuilding` class previously used
was
removed from templates over half a year ago.)

This should resolve the main concern raised on 190d6e7cf5.

The `civinfo` captions have also been updated to match.

Patch by: @Nescio
Accepted by: @s0600204
Differential Revision: https://code.wildfiregames.com/D2733
This was SVN commit r24535.
2021-01-11 00:09:17 +00:00
Angen 2c34cde895 Fix strange character at the end of kush arsenal specific name
Currenlty when one looks into specific name of kush arsenal there is
weird character at the end.
According Nescio there is empty character.
Introduced in 2b3c829e74

Differential revision: D3313
Reviewed by: @Nescio
This was SVN commit r24534.
2021-01-10 17:52:42 +00:00
wraitii be286d4345 Increase turn rate of most unit types slightly
Following general comments by players that the new turn rates were too
slow for good feeling/gameplay, this increases turn rates for most
units.
This remains a rather conservative increase, so further changes may be
needed.

Differential Revision: https://code.wildfiregames.com/D3274
This was SVN commit r24533.
2021-01-10 13:23:39 +00:00
wraitii c7fac7ee88 Small fixes for status effects
Fixes the default name.
Remove comment that was invalid after 876b035336.
Deepfreeze data.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3306
This was SVN commit r24532.
2021-01-10 09:54:12 +00:00
Freagarach fe2e6fd696 Allow mods to insert or delete individual resource icons more easily.
In 52f311da2b code was made resource agnostic except a few places.
This fixes one of them.
(Notice that this approach also addresses Vladislavs recommendation to
load all textures at XML parsing time rather than at JS runtime
(D1745).)

Ticket: #3934
Patch by: @elexis
Differential revision: D2329
Reviewed by: @Freagarach, @wraitii
This was SVN commit r24531.
2021-01-10 09:41:00 +00:00
wraitii 5ee8354e99 Fix windows SEH hook when crashing in an std::thread
Follows 107d3d461f and other 'pthread->std::thread' diffs.

Windows uses Structured Exception Handling to allow reporting errors
(both C++ and hardware) nicely. This works by wrapping the code in a
__try __catch block.
The pthread wrapper did this automatically, but we now need to do it
explicitly for std::thread.

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3261
This was SVN commit r24530.
2021-01-10 08:39:54 +00:00
Freagarach f876db857a Remove duplication from cmpAutoBuildable init.
Differential revision: D3296
Reviewed by: @wraitii
Comment by: @Stan
This was SVN commit r24529.
2021-01-10 07:25:52 +00:00
Freagarach 312dbbea9e [Gameplay A24] - Give all civs rams.
To allow all civs to counter rams.
The rams are to be differentiated in future patches. This is kind of a
placeholder to fix balancing.

Patch by: @Nescio
Differential revision: D2815
In favour: @badosu, @Feldfeld, @genava55, @ValihrAnt, @wraitii
Reservations: @borg-, @Imarok,

This was SVN commit r24528.
2021-01-10 07:23:45 +00:00
Freagarach 082bd8bd44 [Gameplay A24] - Differentiate domestic animals.
Since 8cb7c4ec34 they had the same cost/health/food, this fixes that.
- Enables all four animals at all corrals; the Mauryas have a zebu
instead of an ordinary cow, and cart, kush, ptol sanga cattle, since in
reality the big four (goat, sheep, pig, cattle) had already spread
throughout the Old World in the Stone Age and in our time frame were
available practically everywhere; it was not an either-or situation;
each animal had a somewhat different function.
- Gave them different stats:
-- 1:1 cost:health ratio
-- 1:2 cost:meat ratio
-- Four goats approximately equal three sheep or two pigs or one cow.

Patch by: @Nescio
Differential revision: D3301
Reviewed by: @borg-
Comments by: @Angen, @wraitii
This was SVN commit r24527.
2021-01-10 07:08:12 +00:00
Angen 8aff581691 Update action-gather-fish with new visual
Created by @Stan.

This was SVN commit r24526.
2021-01-09 19:44:14 +00:00
FeXoR 5fbd5fbd95 Avoid an error when calling createObjectGroupsByAreas or createAreasInAreas with areas argument being empty or containing an empty (sub) area.
Differential Revision: D1492
	Fixes #5112
	Original patch by smiley
	Commandeered, edited and tested by @FeXoR
	Discussed by @smiley, @elexis, @vladislavbelov and @FeXoR

This was SVN commit r24525.
2021-01-09 18:22:47 +00:00
Angen e48f7f4aa5 Fix wrong technology token
Introduced in eb1163b872.

Differential revision: D3308
Patch by: Nescio
This was SVN commit r24524.
2021-01-09 15:19:38 +00:00
Freagarach eb1163b872 [Gameplay A24] - Unify garrison heal rates.
Makes all (standard) structures don't heal at first, execept for the
wonder (heal rate of `5`) and temple (`3`).
Replaces the barracks healing technology by one that allows healing in
all structures (`+1`).

Summarising:
This patch makes the 0 rate the default and merges the technologies to a
single one, researchable at the temple, but affecting garrisoned units
in all structures, except for outposts and walls (i.e. those with
visible turret points). The new situation is:
```
0: structures by default
1: structures with technology
3: temple by default
4: temple with technology
5: wonder by default
6: wonder with technology
```

Patch by: @Nescio
Differential revision: D3264
Reviewed by: @borg-
This was SVN commit r24523.
2021-01-09 06:50:15 +00:00
Freagarach ebcf9b9ff5 Fix promoting entities not reacting to nearby enemies.
When an entity promotes it autogarrisons in the turret position but
because `GARRISONE.enter` returns early a turret never reaches the
`IDLE`-state and thus won't automatically react on nearby enemies.
This is explicitly a temporary fix.

Differential revision: D3293
Reviewed by: @wraitii
This was SVN commit r24521.
2021-01-07 15:30:25 +00:00
Stan 3747b42f02 Add a pipeline to generate test coverage.
Fixes: #5739

This was SVN commit r24520.
2021-01-07 15:05:24 +00:00
Stan a7b74fc41e Delete unused and deprecated scaffolds.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D3019
This was SVN commit r24519.
2021-01-06 17:23:43 +00:00
wraitii 2d40068cd1 Thread the NetClient session.
This threads the netclient session, which avoids timeouts when the
main-thread is not polling (map creation, very long simulation frames).

Unlike the NetServer, which should be as independent as possible from
the main thread, the NetClient is fundamentally tied to the game thread.
Therefore, this only threads the session object.
To ensure good performance and ease-of-use, lock-free queues for
in/out-going messages are used.

This fixes artificial timeouts, while also improving actual ping reports
(since frame-time is no longer a factor).
It effectively reverts D1513/eda236522c and 2e7e1c0b2b, all hacks around
lag-timeouts (and bits of 1a3fb29ff3).

Based on a patch by: Stan
Comments by: Vladislavbelov
Fixes #3700, refs #3373

Differential Revision: https://code.wildfiregames.com/D2848
This was SVN commit r24518.
2021-01-06 15:26:11 +00:00
wraitii 8ae3c09dc0 Fix renderer crash in GCC 7.5.
The 'arena' allocator does not take memory alignment into account, which
can result in crashes at -O3 with gcc 7.5 (presumably because of SSE
instructions).

This accounts for alignment issues, fixing the issue.
Also do various cleanup in lib/allocators.

Reported by: Bellaz89, Freagarach
Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3181
This was SVN commit r24517.
2021-01-06 14:56:17 +00:00
Freagarach 58d98c9a5f Fix oversights in recent commits.
- Sounds of macemen (2847eb2a20, 85f46d6d66).
- Kushite healer start unit on (most) skirmish maps (2452e3fb97).
- Fortress tooltips (014c2922f2 and c4eeb82d83).
- Rome siege wall foundations (934025b2fb).
- Removed IshtarGate visible class.
- Move Ishtar Gate of Babylon from Persians (it is Neo-Babylonian)
(1a6f155780).
- Rename `barracks.png` -> `military.png` (c4eeb82d83) and
`ishtar_gate.png` -> `bull.png` icons (refs D2551).
- Insert placeholder icons for free and autoresearched technologies
(D3262#145001).
- Update balancing credits (de3ed2cd19).

Patch by: @Nesio
Differential revision: D3292
This was SVN commit r24515.
2021-01-06 06:45:33 +00:00
Freagarach 284bf20d97 [Gameplay A24] - Change Parade of Daphne tech.
Change description.
Affect Champions training time instead of fortress' batch time modifier.

Patch by: @borg-
Differential revision: D3273
Reviewed by: @Nescio
This was SVN commit r24514.
2021-01-06 06:18:22 +00:00
Stan b5243cd574 Fix compilation error on FreeBSD. MAP_NO_RESERVE was never implemented, and as such had no effect there.
Reported by: @madpilot
Refs: https://reviews.llvm.org/D7485, #5255

Differential Revision: https://code.wildfiregames.com/D1594
This was SVN commit r24513.
2021-01-05 19:06:36 +00:00
Stan 0221e70e51 Fix two Clang warnings.
This was SVN commit r24512.
2021-01-05 11:49:24 +00:00
wraitii f34fb5614c Improve behaviour of formations stuck within other units.
Large units risk being stuck between other units. This is true in
general, but particularly weird with formations, since individual units
may well not be stuck, only the invisible formation controller.
This alleviates the issue by ordering units to move individually when
the controller appears stuck.

It introduces a new "VERY_OBSTRUCTED" unit motion message, which
triggers when a unit has failed to move for several turns.

Reported By: Angen
Reviewed By: Freagarach
Fixes #4935

Differential Revision: https://code.wildfiregames.com/D3209
This was SVN commit r24511.
2021-01-05 10:12:47 +00:00
Freagarach d28a91b83d Deprecate template_helpers folder.
And move the damage_types to simulation/data (i.e. one level up).

Differential revision: D3276
Idea accepted by: @wraitii
Tested by: @Stan
This was SVN commit r24509.
2021-01-04 14:43:44 +00:00
Stan a24c8419c5 [Gameplay A24] - Add a poisoned status effect to the maurya champion infantry archer
Reviewed by: @borg-
Comments by: @Freagarach
Fixes #5768
Refs: https://code.wildfiregames.com/D3276

Differential Revision: https://code.wildfiregames.com/D3279
This was SVN commit r24508.
2021-01-04 13:50:51 +00:00
Stan bc00a6b8df Replace CLOCK_REALTIME by CLOCK_MONOTONIC as suggested by @janwas.
Add sanity checks
Fixes #5760

Tested by: @wraitii, @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3066
This was SVN commit r24507.
2021-01-04 11:08:19 +00:00
Freagarach 8de6d85127 Allow ejecting single entities from non-owned garrisonHolder when allowed to control all.
Found by @wraitii in D1960.

Differential revision: D3065
This was SVN commit r24505.
2021-01-04 06:31:29 +00:00
wraitii d06ff05fc4 Fix hotkey tooltips not showing the correct keys.
Follows D2814 / a4852c4c01
Hotkey tooltips used 'untranslated' hotkeys instead of the accurate
ones, as they directly pulled from config values.

Noted & tested by: Stan

Differential Revision: https://code.wildfiregames.com/D3277
This was SVN commit r24504.
2021-01-03 10:14:07 +00:00
Freagarach c79222cfc0 Fix stable not being able to train war dogs and chariots.
When committing c4eeb82d83 a rebase was missed.

Patch by: @borg-
Differential revision: D3282
This was SVN commit r24503.
2021-01-03 05:35:19 +00:00
Freagarach 3851a48298 Store the garrisonHolder in cmpGarrisonable instead of iterating orders.
Refs. f6c9db33d6, 4fadd75ace
Differential revision: D2376
Comments by: @elexis, @Stan, @wraitii
This was SVN commit r24502.
2021-01-02 07:34:52 +00:00
Freagarach 32583008a0 Combine "EntityCommand" and "AllyEntityCommand".
By specifying the players which are allowed to use(/see) a command
button and adding an enabled/disabled property to the info.

Differential revision: D2343
Comments by: @Angen, @Stan
This was SVN commit r24501.
2021-01-02 07:19:17 +00:00
Freagarach 7f7a3edfae Get attack effects from JSON.
Reads attack effects from JSON files to allow easier introduction (one
still needs to modify other components).

Differential revision: D2661
Comments by: @Angen, @bb, @Stan, @wraitii
This was SVN commit r24500.
2021-01-02 07:09:08 +00:00
Freagarach 2847eb2a20 Clean up sound groups in unit templates.
Moves attack sound groups to where the weapon is defined (where it was
not already the case).
Removed sounds from entities that can't use the sound.

Patch by: @Nescio
Differential revision: D2855
This was SVN commit r24499.
2021-01-02 06:56:45 +00:00
Freagarach 43fd7c91a3 [Gameplay A24] - Add visible garrison points to Roman siege wall tower.
Allows four `Ranged+Infantry` to occupy turrets on the tower.
Also gives all siege wall segments the same cost-to-health ratio.

Patch by: @Nescio
Differential revision: D2993
Reviewed by: @borg-
This was SVN commit r24498.
2021-01-02 06:53:14 +00:00
Freagarach de3ed2cd19 [Gameplay A24] - Permadeath for heroes.
Part of:
https://wildfiregames.com/forum/index.php?/topic/27214-borg-expansion-pack-mod-implementation-in-0ad-alpha-24-release/.
Refs. #1432

Differential revision: D3265
Reviewed by: @borg-, @Nescio
This was SVN commit r24496.
2021-01-01 07:39:24 +00:00
s0600204 ababc796b4 Remove unneeded bonus info from {civ}.json files
This commit removes two things from the `{civ}.json files, for the
following
reasons:

1. The team-bonus information, as the only thing that was reading it
(the
   `civinfo` page) no longer does so.

2. Information about civ-bonuses that have been implemented via a single
   auto-researchable technology, as the `civinfo` page is now capable of
   displaying information from technology files and, in fact, now does
so.

This was SVN commit r24494.
2021-01-01 05:58:34 +00:00
s0600204 ad6263a5a6 Remove entity information from {civ}.json files
As of 190d6e7cf5, the `civinfo` page no longer reads information about
Heroes and Special Structures/Technologies from the `{civ}.json` files,
but
from relevant templates.

Nothing else uses the entity/tech descriptive information contained in
the
`{civ}.json` files, so we can safely remove it.

Note: The Team and Civilisation Bonus information contained within the
      `{civ}.json` files are not touched in this commit.

This was SVN commit r24493.
2021-01-01 02:58:21 +00:00
s0600204 190d6e7cf5 Adapt the civinfo page to read from templates
Instead of loading information about heroes, special buildings, et al.,
from the
`{civ}.json` files, load the information desired from templates.

Determination of "specialness" works as follows:

 * Heroes are detected via the `Hero` class.
 * Special Structures are detected via the `SpecialBuilding` or `Wonder`
class.
 * Technologies are determined to be "special" when they can be
researched by
   the currently selected civ, but are not open to be researched by
every civ.
 * Team Bonuses are any applicable aura that reside in the appropriate
folder.


Accepted by: Freagarach
Comments by: Stan
Differential Revision: https://code.wildfiregames.com/D759
This was SVN commit r24492.
2021-01-01 01:55:13 +00:00
Stan 3ec8a91f30 Fix incorrect prop height for floating objects.
Differential Revision: https://code.wildfiregames.com/D3033
This was SVN commit r24491.
2020-12-31 16:17:58 +00:00
Stan 1bb336829d Add initial support for MCST Elbrus 2000 (e2k) CPU architecture
patch by: @r-a-sattarov
Reviewed by: @Stan
Fixes #5877, Refs #5869

Differential Revision: https://code.wildfiregames.com/D3162
This was SVN commit r24490.
2020-12-31 15:52:12 +00:00
Stan d28d17e96c Remove SSE detection duplication in Colors and ModelRenderer
- Rename macros to be more explicit
 - Move detection code to a separate file
 - Remove a lot of checks in ARB mode (ModelDef.cpp would check for sse
multiple times per frame)
 - Make explicit the SSE2 dependency for Windows

Comments by: @vladislavbelov @wraitii @OptimusShepard
Differential Revision: https://code.wildfiregames.com/D3212
This was SVN commit r24489.
2020-12-31 15:37:28 +00:00
Stan e009d322cc Add missing files in 4942cabab5
This was SVN commit r24488.
2020-12-31 14:27:02 +00:00
Stan 4942cabab5 Fix most Clang 10 Warnings
Refs: #5550, #5294

Remove dead code from f71be3c764
Fix buggy code from ff50b0b74c
Comments by: @wraitii, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3177
This was SVN commit r24487.
2020-12-31 14:25:37 +00:00
Stan a395a0ab66 [BOOST 1.75 2/2] Update binaries for windows (1.65 → 1.75).
Refs #3004

This was SVN commit r24484.
2020-12-31 12:13:25 +00:00
Stan e3c5cc83b7 Fix oversight in 0d28281485
This was SVN commit r24482.
2020-12-31 11:07:10 +00:00
Stan 0d28281485 Update JSON_SPIRIT from 4.06 to 4.08
This was SVN commit r24481.
2020-12-31 10:25:34 +00:00
wraitii 59d0885d68 Allow picking a default formation for walk (and walk-like) orders.
This allows choosing a "default formation", which is activated
automatically for units given walk orders (and attack-walk etc.).
Conversely, units in formation that are given a gather/build/... order
are taken out of formation and given the order individually.
The default formation can be selected by right-clicking on any formation
icon.

This leverages formations for walking, where they are quite efficient
(in fact, perhaps too efficient), while circumventing issues with
various orders.

Choosing the "null formation" as the default formation de-activates the
behaviour entirely, and plays out exactly like SVN.

This makes it possible to queue a formation-order then a
noformation-order (i.e. walk then repair), though the behaviour isn't
very flexible.

For modders, it should be relatively easy to change the setup for each
order, and/or to force deactivating/activating formations in general.

Tested by: Freagarach, Angen
Refs #3479, #1791.
Makes #3478 mostly invalid.

Differential Revision: https://code.wildfiregames.com/D2764
This was SVN commit r24480.
2020-12-31 10:04:58 +00:00
Freagarach 83a1f93828 [Gameplay A24] - Allow building palisades in neutral territory.
This is a rather controversial change, so if it feels compleatly off, we
should revert.
The game is Alpha, so try anyways.

Patch by: @Nescio
Differential revision: D2507
Accepted by: @borg-, @Lionkanzen,
In favour: @borg-, @Lionkanzen, @wraitii
Reservations: @elexis, @Feldfeld, @badosu
Reservations against former patch: @chrstgtr, @PhyZic, @Stan, @ValihrAnt

This was SVN commit r24479.
2020-12-31 08:33:48 +00:00
Freagarach 85f46d6d66 Introduce macemen templates.
For easier differentiation.

Patch by: @Nescio
Differential revision: D1354
This was SVN commit r24478.
2020-12-31 07:31:07 +00:00
Freagarach db6f7c1471 [Gameplay A24] - Alter Roman army camp production queue.
Removes siege engines from them such that if one wants siege engines,
they need to construct an arsenal.
Instead it now trains advanced melee infantry.

Patch by: @Nescio
Differential revision: D3174
Reviewed by: @borg-
Comments by: @Freagarach, @Stan
This was SVN commit r24477.
2020-12-31 07:22:20 +00:00
Freagarach 88b5eec22f [Gameplay A24] - Deprecate Stoa and their champions.
For their current implementation is historically problematic:
-
https://wildfiregames.com/forum/index.php?/topic/28464-can-we-give-macedonians-some-love/
-
https://wildfiregames.com/forum/index.php?/topic/28099-thracian-mercenaries/
- https://wildfiregames.com/forum/index.php?/topic/28002-royal-stoa/
- https://wildfiregames.com/forum/index.php?/topic/27997-macemen/
-
https://wildfiregames.com/forum/index.php?/topic/25504-special-units-and-so-on/
-
https://wildfiregames.com/forum/index.php?/topic/25503-special-buildings-and-so-on/

Patch by: @Nescio
Differential revision: D2863
Reviewed by: @borg-
Comments by: @badosu, @wowgetoffyourcellphone, @wraitii
This was SVN commit r24476.
2020-12-31 07:16:04 +00:00
Freagarach d2b9f40e73 [Gameplay A24] - Standardise archer attack speeds.
Gives all archers a reload time of 1 s and gives 1:2:4 damage ratio for
basic, champion and hero archers.

Patch by: @Nescio
Differential revision: D3235
Reviewed by: @borg-
Comment by: @ValihrAnt
This was SVN commit r24475.
2020-12-31 06:59:06 +00:00
Freagarach 0fed3bd452 [Gameplay A24] - Balance hero health.
Standardises heroes health to:
- Healer/Infantry: 1000
- Cavalry: 1200
- Elephant: 1500

Patch by: @borg-
Differential revision: D3250
Reviewed by: @Nescio
This was SVN commit r24474.
2020-12-31 06:55:25 +00:00
vladislavbelov 84c8ec6cf3 Orients toward default angle for snapping to edges when possible
Fixes #5807

Tested By: Freagarach, wowgetoffyourcellphone, wraitii
Differential Revision: https://code.wildfiregames.com/D3238
This was SVN commit r24473.
2020-12-30 21:04:37 +00:00
Freagarach 95e84fa923 Standardise hero regnal numbers.
- Uppercase -> lowercase.
- Title -> regnal number.
- Added where appropriate.
Actors are not changed.

Patch by: @Nescio
Differential revision: D2156
This was SVN commit r24472.
2020-12-30 08:02:22 +00:00
bb 3dc19aa753 Only have techs that affect the bolt and art tower researchable there.
Patch By: Nescio
Differential Revision: D3266
refs 136022564d

This was SVN commit r24471.
2020-12-29 21:22:05 +00:00
Freagarach c4eeb82d83 [Gameplay A24] - Enable stable for all civilisations.
Moves cavalry there.
Moves chariots there.
Moves wardogs there.
Makes the unlock_champions tech cheaper because it now only unlocks
infantry.

Removed increased cost of cart_temple since the kush one doesn't have
that either.

Patch by: @Nescio
Differential revision: D2801
Reviewed by: @borg-, @ValihrAnt
Comments by: @Angen, @badosu, @Feldfeld
This was SVN commit r24470.
2020-12-29 11:57:12 +00:00
Freagarach 521639cad6 [Gameplay A24] - Tweak maceman attacks.
- Raises the champion's reload time but ensure same DPS for better
visuals.
- Changed citizen's attack to be like the champion's.
- Macemen don't benefit from steelworking tech (which is about swords).

Patch by: @Nescio
Differential revision: D3234
Reviewed by: @borg-, @ValihrAnt
This was SVN commit r24469.
2020-12-29 11:41:14 +00:00
Freagarach a79a47effe Allow to limit unit count per match.
This allows to limit the number of times a specific template can be
constructed/trained/created during a match.

Part of:
https://wildfiregames.com/forum/index.php?/topic/27214-borg-expansion-pack-mod-implementation-in-0ad-alpha-24-release/
Refs.
https://wildfiregames.com/forum/topic/24682-champions-and-civilisations-balance-mod-for-a23/

Differential revision: D2411
Reviewed by: @wraitii
Comments by: @Angen, @Stan
This was SVN commit r24468.
2020-12-29 11:00:54 +00:00
wraitii 71a61d5f50 Fix Idle formation rearranging when an entity dies.
Idle formations re-arrange whenever a member leaves the formation.
Because Idle formation entities can attack nearby units (the formation
stays idle for this), any death will re-arrange the formation, causing
the entities to move in formation before going back to attack.

This looks odd and makes formation less usable. Given that it's tricky
to change the controller state with the current code, this instead
reforms the formation on a timer, only when all members are IDLE.

It fixes the issue and looks generally similar in other cases.

Reported By: wowgetoffyourcellphone
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3236
This was SVN commit r24467.
2020-12-29 10:08:55 +00:00
wraitii f0faab7a42 Fix serialization errors when hosting MP game.
Follows D2746 / 9fc6c3c897 and dad2857538.
Player colors are copied from the settings, which are deep-frozen, thus
not extensible. Cloning them restores that, allowing serialization.

Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D3263
This was SVN commit r24466.
2020-12-28 17:44:20 +00:00
wraitii 9fc6c3c897 Correctly serialize/deserialize user-defined JS objects.
Generalize component/AI serialization system to any user-defined JS
object. This includes Vector2D/3D, fixing an old issue.
As with components/AI, JS Objects may implement a Serialize/Deserialize
function to store custom data instead of the default, which attemps to
serialize all enumerable properties.

Fixes #4698

Differential Revision: https://code.wildfiregames.com/D2746
This was SVN commit r24462.
2020-12-27 17:18:13 +00:00
Angen 1432343eeb Fix upgrades not being sorted by phase in structuretree
Currenlty there is regression in structuretree from b2842e8021, when
upgrade for sentry tower is not in the correct phase row.
Thix is fixing that.
Probably typo in condition.

Differential Revision: D3252
Reviewed by: bb
This was SVN commit r24461.
2020-12-27 15:47:30 +00:00
Angen 06dfd3eaa0 [gameplay-a24] Lower cost of briton special tech for grain gather rate
The technology introduced in 586b045d09 for gauls is a bit overprised.
This is lowering the price to the original cost of rotarymill and
lowering gain a bit more because the tech is not just gobal but
available in phase earlier. Also it is "almost" half on cost and effect
of the current phase II tech which is available for everyone.

Differential Revision: D3253
Reviewed by: borg-
This was SVN commit r24460.
2020-12-27 15:46:00 +00:00
wraitii ae9ea5b859 Map browser, used in the gamesetup and in the main menu.
This grid-based system allows browsing all available maps at a glance,
encouraging more diversity and making it nicer to pick a map.

Moves the mapCache and the map filters controller to the gui maps/
folders, and include that folder where it is used, instead of them being
in common/ or the gamesetup.

Comments By: Freagarach
Patch By: Nani (reworked by elexis then wraitii)
Fixes #5315 (though further work, such as proper scrolling, would be
nice).

Differential Revision: https://code.wildfiregames.com/D1703
This was SVN commit r24459.
2020-12-27 15:26:19 +00:00
wraitii f31443eccb Increase projectile speed slightly across the board.
This bumps arrows from 75 to 100, slingers to 90 and javelins from 62.5
to 70. It's both slightly more realistic and helps with dancing, since
the problem is the ratio of unit speed vs projectile speed.

Further increases would reduce dancing, but also make it harder to see
projectiles which isn't desirable.

Refs #5106

Differential Revision: https://code.wildfiregames.com/D3179
This was SVN commit r24458.
2020-12-27 08:26:32 +00:00
wraitii eafc2a4ea8 Don't show the sword-shield icon if there is nothing to show.
Reviewed By: Freagarach
Refs #5883

Differential Revision: https://code.wildfiregames.com/D3258
This was SVN commit r24457.
2020-12-27 08:12:44 +00:00
wraitii d7caa91420 Switch to the running animation only above a certain ratio of the walk speed.
Following D3221/38c3827d3b, units switch to the 'run' animation when
moving faster than their walkspeed.
This makes formations 'flickery' because units often move slightly
faster than their walkspeed when the formation rotate slightly, which
happens often. It looks fairly bad.

This switches to the running animation halfway through, though a more
general system would be more desirable.


Approved By: Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D3224
This was SVN commit r24456.
2020-12-27 08:07:10 +00:00
wraitii 1e8299dcdb Fix off-by-one line number in JS error reporting.
Post SM60 upgrade, CompileFunction started actually adding a line in
front of the source buffer, shifting the error reporting in the
simulation and other callers of LoadScript.
The GUI isn't affected as it uses LoadGlobalScript, which uses Evaluate
directly.

Refs #5859
Fixes #5895

Differential Revision: https://code.wildfiregames.com/D3257
This was SVN commit r24455.
2020-12-27 07:51:30 +00:00
wraitii 8a77efd849 Fix no-pch builds following 5b46ce0778
Component.h is loaded by convention in all CmpComponents and is
requireed to use CmpPtr.

Fixes #5898

Differential Revision: https://code.wildfiregames.com/D3259
This was SVN commit r24454.
2020-12-27 07:48:26 +00:00
Freagarach 4c1d6eb236 Fix entities turning when attacking while fleeing.
Bug revealed by non-instantaneous turning.

Code by: @bb
Differential revision: D3241
Reviewed by: @wraitii
This was SVN commit r24453.
2020-12-27 07:21:18 +00:00
Freagarach 7f6602cffd Show the number of builders together with build time.
Also adds the remaining time to the tooltip.

Differential revision: D2425
Reviewed by: @bb
This was SVN commit r24452.
2020-12-27 06:56:37 +00:00
Freagarach 6a3cad75eb Correct technology specific names.
Also:
- Added generic Greek names for Ptolemies and Seleucids.
- Remove those where requirements prevent it for a civ.
- Simplified Greek romanisation, per
https://wildfiregames.com/forum/index.php?/topic/25202-transliteration-of-ancient-greek-into-english/page/3/&tab=comments#comment-378658.

Patch by: @Nescio
Differential revision: D2025
This was SVN commit r24450.
2020-12-26 06:21:37 +00:00
Freagarach 47b9d2a02e Play sound of entity that is able to perform a command.
In unit_actions.js sounds of the first entity that is able are now
played, instead of trying to play a sound of the first entity of the
selection, which may or may not be able to perform the command.

Differential revision: D3099
Reviewed by: @bb
This was SVN commit r24449.
2020-12-26 05:46:13 +00:00
Angen fe1356b80c [Petra/AI] Fix wrong function call in worker.js after FastMoving class introduction
Introduced in 164af0742a.
Missed when doing review.
Reported by: Freagarach
This was SVN commit r24448.
2020-12-25 17:46:35 +00:00
bb 9ae637bd43 var => let and some periods in fogging
Implicitly reguested by Freagarach

This was SVN commit r24447.
2020-12-25 17:02:52 +00:00
bb 136022564d Change tower armour tech to a roughly equivalent health one
Patch By: Nescio
Comments By: borg, Freagarach
Differential Revision D2937

This was SVN commit r24446.
2020-12-24 17:02:01 +00:00
bb 87849f4fe9 Fix some translatable strings
Patch By: Nescio
Comments By: Freagarach
Differential Revision: D3134
This was SVN commit r24445.
2020-12-24 16:25:32 +00:00
Freagarach e90609fa28 Some cleaning in unit_actions.js.
Let the `hotkeyActionCheck` and `preselectedActionCheck` use the regular
`actionCheck` to reduce duplication.
Save the first able entity used to orderOne.
Removed some functions which were used merely once.
Combined non-target actions with the regular ones.

Differential revision: D3222
Reviewed by: @bb
Comments by: @wraitii
This was SVN commit r24444.
2020-12-24 07:45:42 +00:00
Freagarach 3d61c227f3 Make slaughter actually kill animals in one strike.
Changed in 37d3adcf23, presumably erroneous given a relevant IRC log
(2012-12-02), and in daf572eb43.

Refs. D193.

Differential revision: D3233
Reviewed by: @Nescio
This was SVN commit r24443.
2020-12-24 06:35:33 +00:00
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
wraitii 1b67a079fb Reduce duplication in JSI GUI objects implementation.
- Store the functions in an unordered_map. A no-container implementation
is doable but likely not worth the added code complexity, maybe with
C++20
- Move more things into the _impl.h
- Clear out the un-necessary friends declaration in the specific types
by moving the functions to the public interface, which makes sense.
- Fix a memory leak (JS::PersistentRootedObject weren't deleted).

This doesn't change what one needs to do to add a new type, but it does
reduce the actual code that's necessary, and makes it less error prone.

Differential Revision: https://code.wildfiregames.com/D3214
This was SVN commit r24384.
2020-12-13 15:06:18 +00:00
Stan 876f6d5e50 Improve sound attenuation so that zooming out actually reduce the sound level.
Patch by: @Samulis
Differential Revision: https://code.wildfiregames.com/D3108
This was SVN commit r24382.
2020-12-13 00:04:17 +00:00
Stan aa3bd08513 Fix non-visual replay on Windows. Use the actual detected resolution.
Differential Revision: https://code.wildfiregames.com/D3208
This was SVN commit r24381.
2020-12-12 08:18:24 +00:00
Imarok 00aeebea6d Add getTextSize() for CButton
Summary: 9c5062147a introduced the `getTextSize()` to all GUIObjects for
getting the rendered size of a text. 8190293f8b made it only available
to CText. `getTextSize()` can also be useful for CButtons so this diff
adds the function back to CButtons. There seem to be no other GUIObjects
besiders CText and CButton where `getTextSize()` makes sense.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3195
This was SVN commit r24378.
2020-12-11 16:12:46 +00:00
wraitii 5e754a86a9 Associate .zip and .pyromod files with 0 A.D. on MacOS
- Change the .Plist to associate 0 A.D. with .pyromod files (as owner,
so the default choice), and .zip (as alternate, so not the default, but
will appaer in the 'open with' dropdown).
- Make 0 A.D. actually load mods opened like that on MacOS. The files
aren't actually opened with command line arguments, but via Cocoa stuff,
which SDL2 handles via the 'DropEvent' event. This ought also work on
windows and linux.

Closes #5357

Differential Revision: https://code.wildfiregames.com/D3190
This was SVN commit r24377.
2020-12-11 15:43:25 +00:00
Stan bf85e4ac38 Allow boolean and u16 modifications for C++
Allow boolean modifications JavaScript
Allow territory influence weight, and root, to be changed via tech.


Differential Revision: https://code.wildfiregames.com/D3069
This was SVN commit r24373.
2020-12-11 14:07:48 +00:00
wraitii c013ee3778 Fix usage of remove_if in CHotkeyPicker
I was not aware of the erase-remove idiom and failed to notice that
remove_if simply reorders the elements.
Noted by Stan thanks to VS17 warnings.

Fixes a4852c4c01 / D2814

This was SVN commit r24371.
2020-12-11 10:02:05 +00:00
Stan 14cc771b6d Fix zip with comments triggering assertion on game startup
Fixes #5165

Patch by: @Teiresias
Differential Revision: https://code.wildfiregames.com/D1511
This was SVN commit r24368.
2020-12-10 19:09:10 +00:00
Stan ea38089853 Fix userreport detection of sound cards
Differential Revision: https://code.wildfiregames.com/D3025
This was SVN commit r24367.
2020-12-10 18:36:05 +00:00
Stan cc65e0e8a2 Add support for HAIKU detection by the SDL.
This was SVN commit r24366.
2020-12-10 18:15:50 +00:00
Stan d09c5bf8bc Small cleanup of test_wdbg_sym.h
This was SVN commit r24364.
2020-12-10 16:13:29 +00:00
Stan b6114adc8d Fix tests on Windows in no pch mode.
This was SVN commit r24363.
2020-12-10 15:58:17 +00:00
Freagarach c9695dd669 Really remove domestic class from violent arctic wolves.
Failed to be done in 28cb8a4c06, noticed by @Angen.

This was SVN commit r24362.
2020-12-10 10:45:57 +00:00
wraitii 764440e017 Remove the Engine threading when using Atlas
MacOS requires some UI-related API calls to happen on the main thread.
There are several SDL functions that call UI-things, and those were,
since #500 / 08b4d96cf2, in a separate thread.
This crashes on Catalina, instead of simply warning (see #5470).

It is not the first time we had such issues, as originally the Engine
was on the main thread and AtlasUI on a separate thread.
That didn't work on MacOS, so the threading was inverted in #500 /
08b4d96cf2, with AtlasUI on the main thread and the Engine in another
thread.
Unfortunately, this still wasn't enough.

This formally unthreads the engine, running it on a wxTimer, to avoid
these issues.

Future work should focus on:
- Further decoupling the simulation from the engine itself, as what
Atlas really needs is a threaded simulation, not a threaded engine.
- Making the simulation itself more threaded
- Making it possible to do tasks asynchronously under Atlas.

Refs #500
Fixes #5470

Differential Revision: https://code.wildfiregames.com/D2752
This was SVN commit r24361.
2020-12-10 09:42:58 +00:00
wraitii 6778fc4ea6 Make units wait a few seconds at waypoints during Patrol.
This makes 'dancing' impossible with patrol, for both single units and
formations.
It further makes the formation and regular patrol code more similar.

The diff harcodes an integer wait time as it relies on timer calls
instead of range queries, as that was much simpler to implement.
Animations for the waypoint-waiting is also unimplemented.

Reviewed By: Freagarach
Refs #5106

Differential Revision: https://code.wildfiregames.com/D2913
This was SVN commit r24360.
2020-12-10 09:18:13 +00:00
Freagarach 28cb8a4c06 Remove domestic attribute from wolves on polar sea.
This made entites use slaughter against the wolves instead of normal
attacks.
After b97d251322 the class is not needed anymore to be able to move the
wolves.

The fix of the wolves stacking in one place is deferred.

Patch by: @Dunedan
Differential Revision: D2771
Reviewed by: @wraitii
Comments by: @elexis
This was SVN commit r24359.
2020-12-10 08:34:04 +00:00
wraitii aa305cc14b Properly clean up _testcache folder.
Introduced in 61e3f1ec0d / D1839.

This was SVN commit r24358.
2020-12-10 08:18:18 +00:00
Freagarach 1e0a6f66f0 Show gatherers next to resource icons.
And total gatherers next to the population icon.

Closes #643
Patch by: @mammadori
Differential Revision: D3155
Earlier revisions reviewed by: @Angen, @wraitii
Comments by: @Nescio, @s0600204, @Stan
This was SVN commit r24357.
2020-12-10 08:13:46 +00:00
Freagarach 8accbce1d7 Fix nomad maps after moving templates to civ folders.
Broken in b57abe806c as noticed by @mammadori.

Differential Revision: D3188
Tested by: @mammadori
This was SVN commit r24356.
2020-12-10 07:55:32 +00:00
wraitii 605386a278 Fix OOS in bdbd0b9dbf
Preview entity IDs vary from user to user.

Reported by: Freagarach
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D3196
This was SVN commit r24354.
2020-12-09 16:45:14 +00:00
wraitii 69f31a67a4 More improvements to the release scripts.
- Add a 'dev' option to the mac bundle that's much faster, intended to
quickly test bundle-like behaviour.
- Add an option to only archive the 'mod' folder, intended to speed up
the CI weekly builds and avoid taking too much disk
space.
- Tweak the windows installer, add an option to create a shortcut to the
desktop (Fixes #1637). This uses the readme 'hack'
 which appears to be a relatively standard way of doing that.
- Make the scripts executable.
- Update jenkinsfile.

Follows d95550248b

Differential Revision: https://code.wildfiregames.com/D3191
This was SVN commit r24353.
2020-12-09 15:22:24 +00:00
wraitii 369c2e8801 Further header & precompiled cleanup, fix no-PCH builds.
GUIObjectBase is made a IGUIObject* to avoid including those headers
un-necessarily. Subsequent diffs ought to clean up the various of
pointers for that with a similar type with reference semantics.

Also:
- Add standard C and C++ headers (mostly cstring for memcpy, string and
vector) where needed.
- Swap out some includes for forward declarations
- Clean up un-necessary boost includes in precompiled and other headers.
- Clean up precompiled headers, including fewer things.
- Move ACPI to the windows-specific folder as it's included there only
and mostly specific to that platform.

Thanks Stan for the testing.

Differential Revision: https://code.wildfiregames.com/D3129
This was SVN commit r24352.
2020-12-09 14:39:14 +00:00
bb 715f441fbb Add context for mustang attack
Reviewed By: Nescio, wraitii
Differential Revision: D3197
This was SVN commit r24350.
2020-12-08 22:33:56 +00:00
wraitii 050c5401b1 Adjust range visualisation and aura ranges following d0fc8ff67d
d0fc8ff67d / D2759 made ranges account for entity size, making auras
larger than they needed to be. This accounts for that.

Units haven't been changed, the delta is not worth modifying imo.

As discussed with Nescio, this means that, for a given aura, larger
buildings will now have a larger "aura area". This particularly affects
oblong buildings.
A proper solution for this would be to not approximate some structures
as a circle, but remains to be implemented.

Note that for current 0 A.D., this effect is unlikely to be a
significant gameplay advantage to one civilisation over another.

Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D3169
This was SVN commit r24349.
2020-12-08 12:53:07 +00:00
wraitii 4bfc7048f0 Fix tests in bdbd0b9dbf
Forgetting about the tests is a categorical imperative.

This was SVN commit r24348.
2020-12-08 09:29:04 +00:00
wraitii bdbd0b9dbf Make construction previews local entities (fix 7bf933d5f6)
Identity classes where added to construction previews in D576 /
7bf933d5f6. This meant they counted towarde entity limits, as they were
not local entities.

This diff fixes that by making them local entities.

Thanks for s0600204 for raising the issue

Reported by: wowgetoffyourcellphone
Refs #2907

Differential Revision: https://code.wildfiregames.com/D3187
This was SVN commit r24347.
2020-12-08 08:32:15 +00:00
Stan d4773df0c1 Version the documentation pipeline used on Jenkins
This was SVN commit r24344.
2020-12-07 15:49:47 +00:00
wraitii d95550248b Rework bundle creation scripts.
This reworks the OSX bundle script, to run it easily on CI and to
further also build the unix tarballs and the windows installer.

Clean up the MacOS bundle detection, by not forcing a compilation-time
switch.
Clean up shared library compilation: changing the installation name
isn't necessary for 0 A.D.

Differential Revision: https://code.wildfiregames.com/D3161
This was SVN commit r24343.
2020-12-07 13:44:42 +00:00
Stan a2f3b25923 Update tinygettext to match upstream.
We're now ISO on the plural forms
(https://github.com/tinygettext/tinygettext/pull/30), so remove the
modified warning.
We use boost filesystem as <filesystem> and <experimental/filesystem>
are not available on the macOS CI yet.
(https://github.com/tinygettext/tinygettext/issues/31)

Differential Revision: https://code.wildfiregames.com/D3185
This was SVN commit r24342.
2020-12-07 13:15:31 +00:00
Stan 421fbfd278 Make Profiler2 configurable in visual mode. Non visual doesn't load the config so it's not possible. Also update the profiler2 page to be able to change the port
Differential Revision: https://code.wildfiregames.com/D2444
This was SVN commit r24340.
2020-12-07 08:11:23 +00:00
wraitii d92a2118b0 [SM78 2/2] Update to Spidermonkey 78 APIs
This ugprades 0 A.D. to the latest ESR at the moment of writing.

Mostly straighforward API changes (see meta-Bug 1633145)
- js::Class is merged with JSClass
- JSNewArrayObject becomes JS::NewArrayObject
- ArrayObject-functions are moved to a new public header Array.h
- JSMSG error messages have again been changed, requiring some tweaks.
- AutoValueArray becomes RootedBalueArray (Bug 1634435)
- 'uneval' is behind a Realm flag (Bug 1565170), but no removal is
planned in the short-term future.
- Some minor GC API changes (Bugs 1569564 and 1633405)
- Error reporting has had some tweaks, and error flags have been removed
(Bug 1620583)
- StructuredClone are now always thread-safe, simplifying an API change
introduced in SM52 (Bug 1607791)

Tested by: Stan, Freagarach, mammadori
Closes #5861

Differential Revision: https://code.wildfiregames.com/D3168
This was SVN commit r24333.
2020-12-06 14:03:02 +00:00
wraitii 6da64bf354 [SM78 1/2] Upgrade Spidermonkey build system and binaries to 78.6.0
SM78 drops usage of Python 2 in favour of Python 3.

SM78 is the first ESR to actually use rust, which means a new static
library is bundled.
This means LLVM-objdump is now a dependency of Spidermonkey, and also 0
A.D.

SM78 also removes the need for NSPR on Windows (Bug 1556646).

Tested by: Stan, Freagarach, mammadori
Refs #5694
Refs #5861

Differential Revision: https://code.wildfiregames.com/D3167
This was SVN commit r24332.
2020-12-06 14:00:57 +00:00
Angen 46413134bb simplify mercenary cost
Move repetitive cost change for mercenary from templates to technology
json.

Differential revision: https://code.wildfiregames.com/D2685
Patch by: Nescio
This was SVN commit r24330.
2020-12-06 08:34:31 +00:00
Angen 1bd3d7ee5b Fix macos-differential typo
This was SVN commit r24329.
2020-12-06 07:56:07 +00:00
Freagarach f62d233f55 Two fixes after the moving of templates to civ-dirs.
b57abe806c had some errors in the patch. @Nescio noted that the fortress
builder script was using the wrong civ. And the committer noticed the
elephantine random map was broken.

Differential Revision: D3122
Tested by: @Nescio
This was SVN commit r24328.
2020-12-06 07:39:27 +00:00
Freagarach 2e79c0a177 Remove health component from relics.
Since relics ought to be undestroyable, a health component makes no
sense. This makes that the Invulnerability-flag can be removed and
relics can be captured again (after 0f91c5ac61#inline-5236).

Differential Revision: D1268
Original patch by: @temple
Reviewed by: @wraitii
Comments by: @bb, @elexis
Fixes #5007, #5847, 0f91c5ac61#inline-5236

This was SVN commit r24327.
2020-12-06 07:22:51 +00:00
Imarok 40f3a967d9 Handle unknown APIC IDs in the ACPI SRAT
Patch by: Itms
Fixes: #5412

Differential Revision: https://code.wildfiregames.com/D1789
This was SVN commit r24326.
2020-12-05 13:40:29 +00:00
Stan d20e68ff0f Revert 429d5d6194 as the linking is broken
This was SVN commit r24324.
2020-12-04 19:02:07 +00:00
Stan 429d5d6194 Fix FCollada on platforms without ecvt
Based on a patch by: @NF
Tested by: @nephele
Tested on FreeBSD, Windows, Kubuntu, macOS
Fixes: #1325
Differential Revision: https://code.wildfiregames.com/D2399
This was SVN commit r24323.
2020-12-04 14:39:07 +00:00
wraitii f44390f3fc Fix 3391542fec: AA / Sharpness not being correctly enabled at the start.
Reported by: OptimusShepard
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D3138
This was SVN commit r24318.
2020-12-03 12:19:44 +00:00
wraitii 72d8bf47d4 Fix potential UB in 783e77cc8d
Reported by: Vladislav
Differential Revision: https://code.wildfiregames.com/D3180
This was SVN commit r24317.
2020-12-03 12:16:19 +00:00
Angen b3704338e9 [gameplay-a24] Increase hack damage of pikemen
This patch increases the attack base hack damage of pikemen from 1 to 2.

Differential revision: D2972
Patch by: borg-
Reviewed by: Nescio
Comments by: myou5e, wraitii, badosu, ValihrAnt
This was SVN commit r24316.
2020-12-02 18:39:17 +00:00
Angen 3ffc23008d [Petra] do not pass min == max range in moveToRange
Original diff D2512

Reported on forum by gameboy:
https://wildfiregames.com/forum/index.php?/topic/27384-strange-landing-on-the-island-and-unable-to-attack/

Units with goal where minrange = maxrange rarely arrive to destination,
because they miss it.
See Todo in unitmotion
Relative part:

In the meantime, one should avoid that 'Speed over a turn' > MaxRange -
MinRange, in case where min-range is not 0 and max-range is not
infinity.

For that reason avoid passing minrange = maxrange from ai.
Also warn in cpp unitmoition when getting this kind of command.

Differential revision: D3149
Reviewed by: @wraitii
This was SVN commit r24315.
2020-12-02 18:11:02 +00:00
Stan 5a66f89044 Update ICU on Windows to 68.1 with the v140_xp toolset.
- Remove the last usage of the MACRO "TRUE" as it's deprecated and
replace it by its value "1" the == operator is overloaded to return a
UBool(int8_t)  refs 9b9a96382c
- Remove two unused DLLs
- Update and add EOL to headers.

Refs #3004

This was SVN commit r24314.
2020-12-02 16:47:28 +00:00
wraitii 1b150b303f Update i18n scripts to run on Python3
The `pology` library runs on Python2 and development appears stalled. It
is also not available on pip.
The `babel` library, BSD-licensed, provides, amongst many other things,
a replacement for .POT / .PO manipulation.

The `poediff` tool that we used to detect spurious i18n change is
replaced with a Python script that does a simpler but good enough job
(it is also much, much faster).

These replacements let the i18n scripts run on Python3 entirely.

Makes D506 redundant.

Comments by: Itms
Reviewed By: Gallaecio
Refs #5694

Differential Revision: https://code.wildfiregames.com/D2757
This was SVN commit r24313.
2020-12-02 10:05:27 +00:00
wraitii 783e77cc8d Fix f78d3ddf71 - actually speed up MP/lobby chat.
f78d3ddf71 / D1781 would fix an important source of lag... If it
actually used the code.
Also clean up some comments.

Reported by: Vladislav
Differential Revision: https://code.wildfiregames.com/D3176
This was SVN commit r24312.
2020-12-02 09:28:46 +00:00
Stan d38fde3682 Do not attempt to rebuild bundled libs every time, and do not run CMAKE for nvtt everytime. Also pass -fpic for NVTT to prevent build failures on FreeBSD (reported by @nephele).
Unify the build scripts between macOS and Linux.

Reviewed by: @Freagarach, @wraitii
Differential Revision: https://code.wildfiregames.com/D3173
This was SVN commit r24310.
2020-12-01 19:29:21 +00:00
wraitii 6f841d0ccb Update mac WxWidgets to 3.0.5.1
This was SVN commit r24309.
2020-12-01 14:18:24 +00:00
wraitii 7e91806be3 Use C++17 to compile 0 A.D.
Supported compilers are Clang 5, GCC 7, Visual Studio 17, Xcode 9.3

Update Atlas alongside since the replacement APIs are c++17 only.
De-activate the StyledTextCtrl module of WxWidgets on mac, since that is
a wrapper around the Scintilla Text editor and doesn't compile with
C++17 (as it uses auto_ptr). We don't use the editor, so this is also a
win on the compilation time front.

Closes #5862

Differential Revision: https://code.wildfiregames.com/D3166
This was SVN commit r24308.
2020-12-01 14:17:12 +00:00
wraitii f78d3ddf71 Fix Lobby/MP Gamesetup chat lag with many messages.
CText requires re-rendering every message when adding a new one, which
quickly becomes very slow.
Use CList and a custom method to work around this.

These classes are in need of a more complete refactoring.

Based on a patch by: nani
Differential Revision: https://code.wildfiregames.com/D1781
This was SVN commit r24306.
2020-12-01 09:42:05 +00:00
Stan dcc73561c2 Remove Xcursor dependency following bbcd9b34cc
Fixes #5842

This was SVN commit r24304.
2020-11-30 18:10:02 +00:00
Stan d719a66b43 [gameplay] remove female inspiration aura
Discussed with: @Imarok, @wraitii
Thread:
https://wildfiregames.com/forum/topic/33873-please-make-it-a-little-less-sexist/?tab=comments#comment-411342

Differential Revision: https://code.wildfiregames.com/D3172
This was SVN commit r24303.
2020-11-30 15:57:13 +00:00
wraitii 48c31ce03f Update random_shuffle usage for C++17
C++14 deprecates and C++17 removes functions we use for random sounds.
This makes FastRand() fit the URG interface, and uses the appropriate
function.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3107
This was SVN commit r24302.
2020-11-30 15:52:16 +00:00
wraitii 46399371ed Remove binary_function usage.
std::binary_function was a pre-C++11 construct, that is removed entirely
in c++17, and no longer necessary regardless.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3164
This was SVN commit r24301.
2020-11-30 15:45:05 +00:00
Stan ad2f08a355 Use a more common locale, en_US.UTF-8 is not always present.
Refs https://code.wildfiregames.com/D2101
Thread:
https://wildfiregames.com/forum/topic/28209-binariessystemtest-fmtsprintf-f-with-separator/?tab=comments#comment-396875

This was SVN commit r24300.
2020-11-30 13:59:05 +00:00
Stan 6eda2b1803 Fix debug_printf warning
This was SVN commit r24299.
2020-11-30 13:52:12 +00:00
wraitii 02578e46bf [SM68 2/2] Update to Spidermonkey 68 APIs
No noteworthy API changes.

Details:
- Remove UTF16 script execution since UTF8 is supported in SM68 and
going forward
- Several new headers includes are required
- Realms replace Compartments as "global holders" (see meta-Bug 1357862)
- JSRequests are removed entirely (Bug 722345), see also aae417bd29
- Trivial API updates in ProxyHandlers, ArrayBuffer, Warnings, GC
reasons, Context options, ObjectIsFunction, ValueVectors and
JSCompartment

See also the migration guide:
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples/blob/esr78/docs/Migration%20Guide.md

Tested by: Freagarach, Stan, Subitaneo
Fixes #5860

Differential Revision: https://code.wildfiregames.com/D3144
This was SVN commit r24297.
2020-11-30 09:03:20 +00:00
wraitii d8332a2938 [SM68 1/2] Upgrade Spidermonkey build system and binaries to 68.12.1
No noteworthy build system changes, however rust is now necessary for
Spidermonkey compilation.
On windows, clang-cl is now necessary.

Tested by: Freagarach, Stan, Subitaneo
Refs #5860

Differential Revision: https://code.wildfiregames.com/D3143
This was SVN commit r24296.
2020-11-30 08:59:49 +00:00
Stan d2075bed5d Fix graphics issue with old AMD cards.
Reviewed by: @vladislavbelov
https://upload.jabberfr.org/hUkR3nTdfhbhHI92/0b5c64c3-136c-4744-a4ca-a70222a3cfaf.png

This was SVN commit r24292.
2020-11-29 16:26:28 +00:00
s0600204 f230988e0e Add globalscript helper function for Auras
Similar to those for templates and technologies.

This was SVN commit r24290.
2020-11-29 04:44:38 +00:00
s0600204 7cde8a9df4 Rewrite the civinfo page to use OOP principles
Tested by: Nescio, Freagarach
Refs: #5387
Differential Revision: https://code.wildfiregames.com/D2822
This was SVN commit r24289.
2020-11-29 04:20:17 +00:00
wraitii 416cc90c3e Drop support for compiling with Visual Studio 2015
Ahead of the SM68 migration, where we will need to use VS17, drop
support for compiling with VS16.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3158
This was SVN commit r24286.
2020-11-28 16:54:48 +00:00
wraitii 3b81fff942 Fix BuildingAI error in FireArrows
Fixes d0fc8ff67d

Differential Revision: https://code.wildfiregames.com/D3159
This was SVN commit r24284.
2020-11-28 14:06:17 +00:00
wraitii 2cfd1b9fac Fix MacOs bundle for Python3
Update the lib used to handle plists, as dmgbuild changed things for
Python3.

Refs #5694

Differential Revision: https://code.wildfiregames.com/D3157
This was SVN commit r24282.
2020-11-28 10:23:06 +00:00
wraitii cf6aaf37a4 Fix visual-replays not processing turn 0 commands.
Use FinishedOwnCommands, which is intented to plan commands for the N+2
turn, but can be used to run commands immediately by the replay manager,
and unlike FinishedUpdate is called before the first update.

Reported by: Freagarach
Fixes #5546

Differential Revision: https://code.wildfiregames.com/D3067
This was SVN commit r24280.
2020-11-28 09:14:29 +00:00
wraitii 7bf933d5f6 Fix VisualActor tech changes for mirages
Correctly recompute the actor when something changes that could modify
it (ownership change, ...).
Make sure mirages are updated when they reappear after being hidden.
Make sure foundations have proper identity classes.
Make sure mirages don't respond to value modifications in the visual
component.
Clarify a few comments.

Earlier work by: Sandarac
Fixes #2907

Differential Revision: https://code.wildfiregames.com/D576
This was SVN commit r24279.
2020-11-28 08:57:15 +00:00
wraitii b79c7186f8 Fix Hotkey/input handling in input boxes.
If modifiers (except shift) are used, hotkeys should still be triggered.

Fixes a4852c4c01 / D2814

Reported by: Stan`
Differential Revision: https://code.wildfiregames.com/D3154
This was SVN commit r24278.
2020-11-28 08:24:39 +00:00
Stan 7b49f9217e Fix incorrect index in 9ae084519f
Noticed by: @Angen
This was SVN commit r24276.
2020-11-27 20:02:34 +00:00
wraitii 259c57929d Fix MP OOS when rejoining on turn 0
Reported by: elexis
Fixes #5185

Differential Revision: https://code.wildfiregames.com/D3068
This was SVN commit r24275.
2020-11-27 15:41:24 +00:00
wraitii 4b76e33e4d Fix MacOS bundle build
clean-workspaces.sh now cleans SM libs, so it needs to be called before
building libraries.

Differential Revision: https://code.wildfiregames.com/D3153
This was SVN commit r24274.
2020-11-27 11:00:53 +00:00
Stan d867b829b4 Add missing file in https://code.wildfiregames.com/D3126 / 9ae084519f
This was SVN commit r24273.
2020-11-27 09:40:45 +00:00
s0600204 4928508dcd Properly set and get GUI objects' style attribute in JS
This fixes tab buttons not playing sounds when pressed.

Original patch by: Stan
Amended patch reviewed by: Stan

Differential Revision: https://code.wildfiregames.com/D3109
This was SVN commit r24270.
2020-11-27 02:30:42 +00:00
Stan 8b720117ee Follow up of D3126. Refactor L10.cpp following wraitii's advice.
This was SVN commit r24269.
2020-11-26 22:29:36 +00:00
Stan 9ae084519f Fix most of the new vs2017 induced warnings.
Refs: https://code.wildfiregames.com/D3096
https://code.wildfiregames.com/D3103 #5862
Reviewed by: @wraitii
Comments by: @Angen
Differential Revision: https://code.wildfiregames.com/D3126
This was SVN commit r24268.
2020-11-26 22:28:50 +00:00
s0600204 d7d0f142d8 Update (and debundle) fmt dependancy
We now support the most recent released version of `fmt` available (at
the time
of committing).

As we no longer patch `fmt` to get it to work within `pyrogenesis`, this
commit
also mostly removes its source from our code-tree (some headers are
retained for
Windows builds).


If you are a user of...

Linux/BSD: You will now need to have `fmt` installed from your
distribution's
           package repository. The minimum supported version of `fmt` is
`4.0`.

      OSX: The source is acquired and compiled (in `build-osx-libs.sh`),
           then included and linked automatically.

  Windows: The relevant header files are retained and, along with a
pre-built
           library, are the only things still bundled.


Accepted by: wraitii
Tested by:
* Freagarach (Lubuntu 18.04, `fmt 4.0.0`)
* Krinkle (MacOS 10.14, `fmt 6.1.2`)
* nephele (Alpine Linux)
* wraitii (MacOS 10.14)
* Nescio (Fedora 33, `fmt 7.0.3`)

Windows library files built by: Stan
Fixes: #3190
Differential Revision: https://code.wildfiregames.com/D2689
This was SVN commit r24267.
2020-11-26 21:01:32 +00:00
wraitii fb3a0b7add Use new JS Map/Set APIs in the serializer
Patch by: Itms (for the most part)
Refs #5860

Differential Revision: https://code.wildfiregames.com/D3146
This was SVN commit r24266.
2020-11-26 18:15:47 +00:00
Angen 64243cf5f3 Revert b1a78ce285
Fix in b1a78ce285 actually worked by accident, and introduced more
serious issue with minimal range.

Differential revision: D3148
Fixes: #5864
Reviewed by: wraitii
This was SVN commit r24264.
2020-11-26 15:51:46 +00:00
wraitii 97e254c295 Fix MacOS GNUTLS linking against the 10.12 SDK
This also speed up compilation in general.

This was SVN commit r24263.
2020-11-26 14:47:36 +00:00
wraitii eb7940b418 Silence warnings about unused result.
Introduce a DISCARD macro to ignore the warn_unused_result attribute
used by Spidermonkey, and reuse it elsewhere.

Differential Revision: https://code.wildfiregames.com/D3147
This was SVN commit r24261.
2020-11-26 13:58:59 +00:00
wraitii 22d1742311 Fix MacOS libpng compilation against the 10.12 SDK
This was SVN commit r24260.
2020-11-26 09:15:36 +00:00
wraitii a33b3883e1 Fix forgotten patch file in 9a1c7cb8d2
This was SVN commit r24258.
2020-11-26 08:00:43 +00:00
wraitii 9a1c7cb8d2 Upgrade Mac OS libraries
All are updated except:
- WxWidgets (not sure about compatibility)
- libogg (doesn't compile)
- zlib/libsodimum which have no update.

This drops supports for 10.11 and earlier, meaning we can now assume
SSE4.1 is present.
Updates the build system to account for this.

Closes #5777 (by virtue of upgrading to SDL 2.12)

Refs #4362

Differential Revision: https://code.wildfiregames.com/D3111
This was SVN commit r24257.
2020-11-26 07:20:10 +00:00
Stan 646ff183ae Fix horse breed animations. Fix naming conventions while at it.
Patch by: @Alexandermb
This was SVN commit r24255.
2020-11-25 22:08:46 +00:00
Stan c4c7d3c760 Fix recent macOS builds.
Fix aarch64 build for NVTT.
Fix warning about GLVND when building on Linux (Patch by @Stan)
Native EOLs.

Patch by: @Itms
Differential Revision: https://code.wildfiregames.com/D2563
This was SVN commit r24245.
2020-11-24 19:36:19 +00:00
wraitii d07f271d60 [SM60 2/2] Update to Spidermonkey 60 APIs
Two noteworthy changes:
- Proxies are update to the SM60 API, having an explicit reserved slot
and a private slot, in which the 'proxy data' and the C++ object are
stored. This fixes a debug assertion failure of SM52 (See bugs 1237504
and 1339411)
- The GC callback behaviour has changed slightly, and we should now only
look for GC_SLICE_BEGIN and GC_SLICE_END calls (Bug 1364547)

Other updates are minor:
- Bug 1339036: JSTYPE_VOID beomes JSTYPE_UNDEFINED
- Bug 1308236 - avoid ambiguous comparison by changing NULL to nullptr
- Bug 1421358, GC::reason::REFRESH_FRAME was removed. API is indicated
in jsapi.h so use that.
- Compartment behaviours update
- ClassOps changes (Bug 1389510 removed the getter/setter - 7c04ea0211 -
and bug 1370608 added one more before that so net minus one)
- Minor tests touchups again.

Tested by: SubitaNeo, Stan
Thanks to bellaz89 for the Shared Array fix

Closes #5859

Differential Revision: https://code.wildfiregames.com/D3116
This was SVN commit r24243.
2020-11-24 15:47:03 +00:00
wraitii f2cf2c97ad [SM60 1/2] Upgrade Spidermonkey build system and binaries to 60.9.1
This changes VS to use the same library name as other platforms, since
the toolsets are binary-compatible going forward. This makes the build
script slightly more streamlined on windows.
Also enable building NSPR on windows as part of the spidermonkey build,
instead of compiling it separately.

Tested by: SubitaNeo, Stan
Refs #5859

Differential Revision: https://code.wildfiregames.com/D3115
This was SVN commit r24242.
2020-11-24 15:41:52 +00:00
Stan a226c4804e Fix segfault in FCollada with Visual Studio > 2013. Bump the version of fcollada for macOS; Linux has no check. add native eol to the file.
Reviewed by: @wraitii
Comments by: @smiley
Differential Revision: https://code.wildfiregames.com/D2474
This was SVN commit r24241.
2020-11-24 11:07:05 +00:00
wraitii 5ef6ff054d Prepare for VS2017 upgrade - workspace updates
This:
- Generates a VS solution for VS17
- Explicits the boost toolset chosen, leveraging ABI compatibility to
avoid recompiling the library (for now).
- Likewise, reuses the Spidermonkey libraries. The SM60 upgrades does
away with putting the toolset in the library name entirely.

Refs #5862

Differential Revision: https://code.wildfiregames.com/D3130
This was SVN commit r24240.
2020-11-24 08:29:21 +00:00
Stan 1fbf51ccf1 Fix OS detection on Windows 10.
Compatibility mode will be handled in a later diff.

Comments by: @Itms, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2420
This was SVN commit r24238.
2020-11-23 10:11:37 +00:00
wraitii 15001ec798 Enable C++14
Spidermonkey 60 can only be compiled with C++14. This conflicts with
building 0 A.D. with C++11, so upgrade to C++14 first.
This in itself should not drop compiler support on any platform.

Tested on Windows by: Stan
Tested on Linux by: Freagarach
Refs #5859
Refs #5862

Differential Revision: https://code.wildfiregames.com/D3124
This was SVN commit r24235.
2020-11-22 14:34:31 +00:00
wraitii 2288de4aa6 Remove UniqueRange custom code in favour of unique_ptr
UniqueRange was a unique_ptr replacement with a few tweaks (such as a
compulsory custom deleter). Its features are not really used, it
contains outdated atomic calls, and it blocks D1511, thus it is removed.

Refs #5165

Differential Revision: https://code.wildfiregames.com/D613
This was SVN commit r24234.
2020-11-22 13:43:19 +00:00
wraitii 3391542fec Fix rendering options failures following 8a1b3d6769
Two issues are fixed:
- Atlas on non-Mac crashed when started from within the game.
- MSAA options crashed if enabled on startup.

The underlying issues where improper shutdown, and assuming the renderer
was initialised than it might not be (in particular, the post-processor
wasn't).

Tested by: Stan
Differential Revision: https://code.wildfiregames.com/D3131
This was SVN commit r24233.
2020-11-22 11:09:13 +00:00
wraitii b3c5347e26 Real fix for d0fc8ff67d,
Follows from d0fc8ff67d, 95dbb8be25.
The original diff asserted that only "real" entities would make range
queries. This proved inaccurate as building previews can too. However,
simply removing the assertion doesn't fix the issue, given that they
still aren't found and we still need to account for their size.

This fixes that properly by special-casing local entities.

Thanks s0600204 for giving this a look.

Reported by: Mr.lie
Differential Revision: https://code.wildfiregames.com/D3132
This was SVN commit r24231.
2020-11-22 09:29:45 +00:00
wraitii 7c04ea0211 Make JS GUI Objects Proxy objects.
The JS-side counterparts of C++ objects are now Proxy objects, in
anticipation of SM60 changes that remove the get/set hooks entirely.
This makes semantic sense too as they are essentially phantom wrappers
around the C++ objects, with no proper JS representation.

By using different proxy handlers for different GUI object types, we can
further fix issues encountered in D2136 by defining the relevant
functions only on objects that should have them.

The main complexity with proxy handlers is that Spidermonkey assumes in
several places that they are static and data-less, so they cannot be
used directly to hold data. This diff works around that issue by storing
per-script-interface data in the CGui directly.

Further API changes in SM60 make this slightly cleaner.

Comments by: Itms
Refs #5859

Differential Revision: https://code.wildfiregames.com/D2768
This was SVN commit r24229.
2020-11-21 17:49:06 +00:00
wraitii 8a1b3d6769 Allow registering hooks that trigger on config changes.
Rendering options use this capability to simplify their implementation.
This makes it easier to add new options.

Comments by: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2293
This was SVN commit r24228.
2020-11-21 11:57:14 +00:00
wraitii f6348b9617 Clean up header includes, add new forward declarations.
This cleans up many un-necessary header includes, either simply
providing nothing or forward declarations in their place.

No major compilation time change here, though this does reduce depencies
in some headers.

Also fix up old MacOS STL-include fixes that are no longer relevant.

Differential Revision: https://code.wildfiregames.com/D3128
This was SVN commit r24227.
2020-11-21 11:20:29 +00:00
Stan 8726a2abbf [gameplay] tweak human training times to make them feel less "spammy"
Patch by: @Nescio
Reviewed by: @borg-
Like by: @Lionkanzen
Differential Revision: https://code.wildfiregames.com/D2866
This was SVN commit r24226.
2020-11-21 11:13:15 +00:00
Stan 560127a5c8 [gameplay] Remove structure <Loot/xp> as most builings are destroyed by siege.
Patch by: @Nescio
Reviewed by: @ValihrAnt
Comments by: @borg-
Differential Revision: https://code.wildfiregames.com/D2992
This was SVN commit r24225.
2020-11-21 11:08:37 +00:00
wraitii 95dbb8be25 Fix broken assertion in d0fc8ff67d
I incorrectly assumed no local entities would be making range queries,
but some building previews do. The assert is thus incorrect.

Reported by: SubitaNeo
Fixes #5870

Differential Revision: https://code.wildfiregames.com/D3125
This was SVN commit r24223.
2020-11-20 15:30:55 +00:00
wraitii ff924aaffc Fix no-PCH builds and checkrefs following a4852c4c01
Fixes D2814 / a4852c4c01.


Differential Revision: https://code.wildfiregames.com/D3123
This was SVN commit r24222.
2020-11-20 11:41:56 +00:00
wraitii eef9e9517b Fix .dae files with Windows paths inside.
FCollada asserts, but only on windows for whatever reason, when loading
a file that contains a Windows path.
There are many others, but the game explicitly fixes those, so I haven't
changed them for now.

Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3120
This was SVN commit r24220.
2020-11-20 08:26:46 +00:00
Stan 640efa557e Add a hashing function for CStr8 & CStrW
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D3106
This was SVN commit r24218.
2020-11-19 15:25:27 +00:00
wraitii d0fc8ff67d Update range queries to account for entity size.
CCmpRangeManager queries do not take obstruction size into account,
meaning they return fewer entities than they should. This particularly
affects buildings with ranged attacks, gates, and a few other templates.

This is, unfortunately, a slight performance decrease.

Discovered following Angen's comment [[
https://code.wildfiregames.com/D2738#116269 | here ]].

Comments by: Angen
Reviewed By: bb
Refs #3381 (not marking it down as 'fixes' and I'm not entirely sure it
was the only moving part here).

Differential Revision: https://code.wildfiregames.com/D2759
This was SVN commit r24217.
2020-11-19 14:07:24 +00:00
Freagarach b57abe806c Move civ-specific templates to subfolders.
See also
https://wildfiregames.com/forum/index.php?/topic/28614-template-folder-structure/.

Differential Revision: D2952
Reviewed By: @Nescio
This was SVN commit r24216.
2020-11-19 10:20:25 +00:00
wraitii a4852c4c01 Let players remap hotkeys in-game, fix default hotkeys being qwerty-specific.
- Provide a "Hotkey" screen to let players remap hotkeys in-game using a
convenient setup.
- Make all .cfg hotkeys refer to scancodes (i.e. position on the
keyboard), so that default hotkeys now translate correctly for AZERTY,
QWERTZ and other layouts.
- 'BackSpace' is now an alias for 'Delete', and works for killing units.
This fixes #1917, as macs don't have a proper delete key and would need
to use Fn+Del otherwise. This shifts "timewarp" to Shift+BackSpace.

Functionally, this switches hotkeys to scancodes, as that makes more
sense (they are combinations of key positions, not actual text output).
SDL includes are cleaned and key names are reused.

Fixes #2850, Fixes #2604, Refs #1810, Fixes #1917.

Follows work in 3d7784d2af.

Various diffs tested by: Angen, Stan, Freagarach
Comments by: Nescio
Differential Revision: https://code.wildfiregames.com/D2814
This was SVN commit r24215.
2020-11-19 09:27:26 +00:00
wraitii e6adfd01bf Deactivate RTTI (except in AtlasUI) on all platforms.
D2768 inherits from a Spidermonkey class, and SM is built without rtti.
This won't compile unless we also compile without RTTI, and that diff is
required for SM60.
Further, windows was already compiling without RTTI and our coding
conventions say to not use it, so this is more of a regularization.

AtlasUI is left unaffected as WXWidgets uses it (and it's a dynamic
library so separate enough to do that).

Differential Revision: https://code.wildfiregames.com/D3104
This was SVN commit r24214.
2020-11-19 08:36:25 +00:00
Freagarach f1881a0ccd Missed a rebase when committing 0cdd69e8e5.
Adds the attack name.
Diff: D2595.

This was SVN commit r24213.
2020-11-19 07:05:57 +00:00
Freagarach 0cdd69e8e5 Separate elephant archer from cavalry templates.
Making it easier to change just one of the two.
Also makes some stats more similar to that of a champion elephant, most
notably the vision was increased from 92 to 100 and deleted wedge
formation.

Patch by: @Nescio
Differential Revision: D2595
Comments by: @Angen, @bb.
This was SVN commit r24212.
2020-11-19 06:42:29 +00:00
Stan 5faf62d9ee Allow affecting garrison list via tech and auras
Reviewed by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D3070
This was SVN commit r24210.
2020-11-18 21:39:22 +00:00
bb 85c9a48db0 Generalize to arbitrary translatable attacknames in the GUI
Reviewed By: Nescio, Freagarach
Comments By: wraitii, elexis
Differential Revision: D2995
refs: #252

This was SVN commit r24209.
2020-11-18 21:34:33 +00:00
Freagarach 2dd223af29 Rename nuba -> noba.
Also renames clubman to maceman.

Patch by: @Nescio
Differential Revision: D3018
This was SVN commit r24207.
2020-11-18 20:13:30 +00:00
wraitii 0cbd07b455 [SM52 3/2] Revert static linking change on linux - other fixes.
This reverts static linking on linux from 6bb08fb424, it appears to fail
to link and/or crash, depending.

- Commit the tarball.
- Update update-workspaces.sh

Refs #4893

Differential Revision: https://code.wildfiregames.com/D3114
This was SVN commit r24205.
2020-11-18 19:08:15 +00:00
wraitii fd8f5abd2e [SM52 2/2] Update to Spidermonkey 52 APIs.
No particularly noteworthy changes, as most complex API changes were
already supported in SM45 and done.
The addition of JSStructuredCloneData allows to remove our custom class.

Changes:
- InformalValueTypeName is back in the API, so remove our
implementation.
- Stop using JSRuntime entirely in favour of JSContext*
- JSPropertyDescriptor is renamed.
- CompartmentOptions are tweaked slightly (no functional changes)
- JS::Construct - API update.
- JSClass split - API update.
- A js.msg error message was removed, so we had to use a different one.
- Tests fix: fix comparison of union instances
- Disable warning in spidermonkey Vector.h
- Update error reporting to SM52 (minor API updates)
- Ignore warnings about unused return values (would come from OOM, which
isn't recoverable)

Most of the patching was done by Itms.

Tested by: Stan, Freagarach
Fixes #4893

Differential Revision: https://code.wildfiregames.com/D3095
This was SVN commit r24203.
2020-11-18 14:39:04 +00:00
wraitii 6bb08fb424 [SM52 1/2] Upgrade Spidermonkey build system and binaries to 52.9.1
Of note is the change to static linking on *nix (MacOS already used it).
The logic is that we can only use one single version of SM, so that
advantage of dynamic linking is lost regardless. We might also see
performance gains in the future with LTO enabled. It is also slightly
easier to distribute the program as a result. Expect a negligible size
increase in the binary size (offset somewhat by no longer needing to
distribute .so files). Finally, it streamlines the build script.

Also noteworthy in this commit:
- The MacOS build script is folded back into the general build script.
- the perl/sed command is replaced by patching the configuration file,
which at least warns if it starts failing in the future.

Binaries for windows provided by @Itms
The bulk of the patching was also done by @Itms.

Tested by: Stan, Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3094
This was SVN commit r24202.
2020-11-18 14:34:17 +00:00
wraitii 935af751b9 Fix building without precompiled headers.
Broken in several recent diffs.
This also fixes (very) old missing standard headers.

Differential Revision: https://code.wildfiregames.com/D3110
This was SVN commit r24200.
2020-11-18 11:35:36 +00:00
Stan 0f2b00326f Notify players with a sound when a player is defeated
Includes alarm_defeated_ally.ogg by @Samulis

Reviewed by: @bb
Comments by: @Angen Freagarach
Differential Revision: https://code.wildfiregames.com/D2860
This was SVN commit r24199.
2020-11-18 09:14:08 +00:00
bb 28c11ab6f2 Lets not break tests in 029751c135
This was SVN commit r24198.
2020-11-18 08:31:03 +00:00
bb 029751c135 Don't uselessly traffic constant statuseffect translatable strings and icons through the guiinterface.
Reviewed By: wraitii
Differential Revision: D3112
Fixes: 876b035336

This was SVN commit r24197.
2020-11-18 08:25:43 +00:00
Stan 841b381607 Correct a few weapon prop names.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D3015
This was SVN commit r24196.
2020-11-17 10:06:09 +00:00
Stan 4f897d7151 Napatan voices for the Kushites. Audio fixes (reverb, background noises) and equalization by @Samulis
This was SVN commit r24195.
2020-11-16 22:36:39 +00:00
vladislavbelov d0c1d119dc Using same value for unit and terrain ambient colors for random maps.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3079
This was SVN commit r24194.
2020-11-16 20:40:31 +00:00
Freagarach 61eb93d0f7 Move entities from other/ to structures/.
Because they inherit from template_structure.xml.

Patch by: @Nescio
Differential Revision: D3097
This was SVN commit r24193.
2020-11-16 20:06:01 +00:00
Stan 3a4a7ee5f9 Make cheering moddable
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D3081
This was SVN commit r24192.
2020-11-16 14:47:41 +00:00
Angen bd43bdca69 Cancel packing orders by Stop command
Make packing states to react to Stop command, which is supposed to
cancel current orders.

Fixes: #4015
Differential Revision: D3105
This was SVN commit r24191.
2020-11-16 09:33:09 +00:00
vladislavbelov 9937116f2b Adds MSAA to anti-aliasing techniques.
Tested By: Freagarach, OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2812
This was SVN commit r24188.
2020-11-15 20:07:48 +00:00
wraitii 25490bfec3 Improve JS Exception handling.
- Check for pending exceptions after function calls and script
executions.
- Call LOGERROR instead of JS_ReportError when there is a conversion
error in FromJSVal, since that can only be called from C++ (where JS
errors don't really make sense). Instead, C++ callers of FromJSVal
should handle the failure and, themselves, either report an error or
simply do something else.
- Wrap JS_ReportError since that makes updating it later easier.

This isn't a systematical fix since ToJSVal also ought return a boolean
for failures, and we probably should trigger errors instead of warnings
on 'implicit' conversions, rather a preparation diff.

Part of the SM52 migration, stage: SM45 compatible (actually SM52
incompatible, too).

Based on a patch by: Itms
Comments by: Vladislavbelov, Stan`
Refs #742, #4893

Differential Revision: https://code.wildfiregames.com/D3093
This was SVN commit r24187.
2020-11-15 18:29:17 +00:00
wraitii 88bc973530 Delete useless JS::Value forward declaration.
ProfileViewer.h forward-declares JS::Value but doesn't use it. Starting
in SM68, JS::Value is a union, and this breaks at compilation.

Last modified in c02a7e1a7b, useless since 2af94c5898

Differential Revision: https://code.wildfiregames.com/D3102
This was SVN commit r24186.
2020-11-15 07:51:15 +00:00
bb 768c84aa46 Optimize the GUI event broadcast
Patch By: nani
Differential Revision: D2638
This was SVN commit r24185.
2020-11-14 21:54:17 +00:00
Stan 10c3bcbf5f Allow right-click on disabled buttons.
Reviewed by: @Angen
Fixes #5269
Fixes #5095

Differential Revision: https://code.wildfiregames.com/D2651
This was SVN commit r24184.
2020-11-14 18:16:24 +00:00
Stan 6b5fe442c7 Remove unused function that triggers warnings on Windows.
This was SVN commit r24183.
2020-11-14 18:11:58 +00:00
wraitii 2f29b81027 Fix JS OOM in tests following aae417bd29
aae417bd29 made ScriptInterface not recreate a new JSContext since it
becomes a compartment wrapper, but that means we need to GC tests or
they might OOM.

To make it mostly seamless, GC on any test setup. The JS tests are
pretty close to the 16Mb limit as it stands so GC them manually too, for
good measure.

Refs #4893

Differential Revision: https://code.wildfiregames.com/D3101
This was SVN commit r24182.
2020-11-14 15:13:56 +00:00
wraitii aa15066c69 Rename ScriptRuntime to ScriptContext
SM52 essentially replaces JSRuntime with JSContext (though JSContext
itself was replaced with JSCompartment).
To prepare for this migration, rename all Runtime-related things to
Context.

Part of the SM52 migration, stage: SM45 compatible.

Patch by: Itms
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3091
This was SVN commit r24181.
2020-11-14 10:57:50 +00:00
wraitii aae417bd29 Explicitly make ScriptInterface a Compartment wrapper.
ScriptInterface is now a wrapper around a JSCompartment, and thus always
has a well-defined global.

The error reporter is moved to ScriptRuntime in anticipation of that
handling JSContext in a later diff.

Part of the SM52 migration, stage: SM45 compatible.

Patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3090
This was SVN commit r24180.
2020-11-14 08:46:32 +00:00
Stan 0046783e73 Unify sling actors and simplify templates.
This was SVN commit r24178.
2020-11-14 00:10:56 +00:00
wraitii ab5616b4c4 Mass rename CxPrivate to CmptPrivate.
As part of the SM45->52 migration, a ScriptInterface becomes a wrapper
around a JSCompartment, not a JSContext, thus we ought to store private
data for the compartment and not the context.
This is a mass rename of CxPrivate to CmptPrivate to match that before
the actual changes.

Part of the SM52 migration, stage: SM45 compatible

Patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3089
This was SVN commit r24177.
2020-11-13 16:44:15 +00:00
wraitii ee0d204bf6 Wrap JSAutoRequest and replace usage of JSContext* with the wrapper.
JSAutoRequest is required before calling into most JSAPI methods, for GC
reasons.
Calling it is required and fragile as one must not forget.
Further, SM52 and later make manipulating JSContext* dangerous as that
can cross Compartment(Realm in SM68) barriers (and ScriptInterface now
matches a Compartment).

The solution to both problems is to avoid using JSContext* in 0 A.D.
itself. To achieve this, a Request class is introduced, and must be used
to access a JSContext* from a scriptInterface. Further, Request is
passed to other ScriptInterface functions isntead of JSContext*, making
it obvious that the caller has already called it, reducing errors and
redundant JSAutoRequest calls.
Only JSNative functions now get a naked JSContext* without protection,
but the likelihood of forgetting a request is lower since many
ScriptInterface functions now expect it.

JSContext* is directly passed to JSAPI functions only.

Part of the SM52 migration, stage: SM45 compatible

Based on a patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3088
This was SVN commit r24176.
2020-11-13 13:18:22 +00:00
Stan 6a029d2a84 Fix incorrect README.txt following 849cbc13ee.
This was SVN commit r24175.
2020-11-13 10:50:48 +00:00
Stan 6d187f2145 Do not attempt to gather when full on that resource.
After this change, units will move directly to the nearest resource
dropsite when they are idle but carrying resources at full capticity,
instead of trying to gather, then realising again they are full, and
going back to the dropsite.

Reviewed by: @Freagarach
Comments by: @Angen, @wraitii
Differential Revision: https://code.wildfiregames.com/D2791
This was SVN commit r24172.
2020-11-12 11:01:42 +00:00
wraitii 66cc595c53 Encapsulate runtime creation.
- Makes it easier to change down the line (and change is coming)
- Allows making g_ScriptRuntime thread-local easily.
- Remove ParentRuntime, which is not used at the moment.

Part of the SM52 migration, stage: SM45 compatible.

Patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3087
This was SVN commit r24171.
2020-11-12 09:34:40 +00:00
wraitii 90367cdc53 Remove DefPersistentRooted and unneeded includes.
DefPersistentRooted is essentially a wrapper around unique_ptr and has
no real reason to exist.

Part of SM52 migration, stage: SM45 compatible.

Patch by: Itms
Tested by: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3086
This was SVN commit r24170.
2020-11-12 08:24:30 +00:00
wraitii ace639f96f Use JS::Trace over CallXTracer
CallXTracer functions were removed in
https://bugzilla.mozilla.org/show_bug.cgi?id=1235598

Part of the SM52 migration, stage: SM45 compatible.

Patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3092
This was SVN commit r24169.
2020-11-12 08:04:24 +00:00
wraitii dad2857538 Use Symbols to store JS object references when serialising and delete ObjectIDCache
When serialising JS objects, we keep track of any encountered object,
and serialize it only once. Any further serialisation instead stores an
ID referring to the original object (essentially an opaque pointer).
The trouble of course is to have a unique, persistent identifier for
such an object.
svn uses an ObjectIDCache, essentially a "JS Object -> ID" map (which
internally is essentially a "JS heap pointer -> ID" map).

JS, since ES15, includes a "Symbol" primitive type, which is a unique,
immutable identifier. They are also not iterable by for..in or
GetOwnPropertyName or related.
This means they can be used to store the tag directly on the object
(since it's impossible overwrite a user property).
Thanks to this, we can forgo ObjectIDCache in the serializers, and since
following D2897 it becomes unused, we can delete it, along with the
Finalization code it used.


Part of SM52 migration, stage: SM45-compatible changes.

Patch by: Itms
Tested By: Freagarach
Refs #4893

Differential Revision: https://code.wildfiregames.com/D3085
This was SVN commit r24167.
2020-11-12 06:40:19 +00:00
Alexandermb d5bbf900bc Missing attack ranged archer variants fromr P24164
This was SVN commit r24166.
2020-11-11 23:10:28 +00:00
Alexandermb 26f233028b Elephant asian size adjustment as requested months ago.
(Didn't committed due to lack of internet).

This was SVN commit r24165.
2020-11-11 22:14:32 +00:00
Alexandermb 7a4b20e964 Bow Sync animation sync between prop and infantry (stil shoots earlier due to repeat time)
This was SVN commit r24164.
2020-11-11 22:08:43 +00:00
Freagarach a5481897eb Clean up structure vision.
By default structures now have a vision range of 4 (to allow them to
reveal themself). Effectively no values are changed (beyond those in
templates/other).

Patch by: @Nescio
Differential Revision: D3036
This was SVN commit r24163.
2020-11-11 20:27:24 +00:00
Freagarach 876b035336 Allow resistances to StatusEffects.
Differential Revision: D2908
Reviewed by: @wraitii
Comments by: @bb.
This was SVN commit r24162.
2020-11-11 20:07:30 +00:00
Freagarach b5df81af76 Store turret positions in map files.
Follow up on 8bfb449375. Allows saving turret positions in the map file,
instead of relying on the order in which the entities are added.

Differential Revision: D2614
Reviewed by: @wraitii
Comments by: @Angen, @bb, @vladislavbelov.
This was SVN commit r24161.
2020-11-11 19:40:44 +00:00
vladislavbelov 9669b5f1a9 Removes additional depth texture copying and reusing existing refraction depth.
Tested By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3084
This was SVN commit r24160.
2020-11-11 18:46:52 +00:00
Stan 3392330ee9 Play a sound on invalid building placement.
Comments by: @bb, @Freagarach
Sound by @Samulis

This was SVN commit r24159.
2020-11-11 17:38:59 +00:00
Stan 38ce7c44a6 Remove useless arguments from colorFades.js, update comments, and remove useless return. Also remove redundant check.
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2334
This was SVN commit r24158.
2020-11-11 10:58:09 +00:00
wraitii f22449bf24 Remove serializablePrototype code
The script interface has code to serialize/deserialize JS objects with a
user-defined prototype. That code is usable in the AI, but currently
unused (and there are no plans to use it in the long run).

Removing it allows removing more code down the line, which helps with
the SM45-52 migration.

Collaboration with itms.

Refs #4893

Differential Revision: https://code.wildfiregames.com/D2897
This was SVN commit r24157.
2020-11-11 08:43:13 +00:00
Stan 9c46062319 Optimize arrows in quivers (reducing their polycount)
Do not use props , to reduce drastically the number of drawcalls. Those
should only be used for uneven terrain.
Do not load the kart struct for every arrow use prop_weap like all the
other weapons.
Do not use basic_trans where not necessary

Noticed by: @vladislavbelov, @OptimusShepard.
This was SVN commit r24156.
2020-11-11 01:06:19 +00:00
vladislavbelov e038f7844b Fixes terrain overlays by removing fixed pipeline dependency.
Tested By: Freagarach, wraitii
Differential Revision: https://code.wildfiregames.com/D3074
This was SVN commit r24154.
2020-11-09 18:50:40 +00:00
Stan c1eb728ffa Add a generic preview for mainland, so that it doesn't pick one randomly.
This was SVN commit r24153.
2020-11-09 18:07:01 +00:00
wraitii bb8456691b Avoid overflow in UnitMotion.
ComputeTargetPosition called Dot() with large enough vectors that it
overflowed. Avoid that by not actually doing the full dot product.

Reported by: Itms
Fixes #5852

Differential Revision: https://code.wildfiregames.com/D3061
This was SVN commit r24152.
2020-11-09 13:25:50 +00:00
wackyserious 055a659685 Observe proper naming conventions for changeset 4704ac6e03
Reviewed by: Stan`
This was SVN commit r24151.
2020-11-09 11:44:49 +00:00
wackyserious 4704ac6e03 New Texture: Thracian thureos shield
Thread:
https://wildfiregames.com/forum/topic/31815-committed-thracian-mercenary-seleucid-texture-update/?tab=comments#comment-409930

This was SVN commit r24150.
2020-11-09 10:27:39 +00:00
Freagarach b97d251322 Move the controllability of an entity to cmpIdentity.
Where controllability is defined as the ability to receive _any_ order
from the player.
Fixes the concern not raised at a1dc9cadd8#42637.

Differential Revision: D1960
Reviewed By: @wraitii
Comments by: @bb, @Stan.
This was SVN commit r24148.
2020-11-09 08:38:09 +00:00
Freagarach 41570a2dc1 Fix tower classes in maps.
e07f12bea6 Changed the class names of Defense Towers, but it forgot to
update maps, this patch fixes that.

Differential Revision: D3063
Reviewed By: @Nescio
This was SVN commit r24147.
2020-11-09 08:02:30 +00:00
vladislavbelov 61c6da91e8 Moves foam calculation into a separate function and fixes its lighting.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3071
This was SVN commit r24145.
2020-11-08 22:17:58 +00:00
vladislavbelov 8c77c4b2b6 Refactors coordinates of SOverlayTexturedLine, replaces array of floats by array of CVector2D.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3072
This was SVN commit r24144.
2020-11-08 14:47:25 +00:00
vladislavbelov 4b52e87934 Adds wireframe mode to overlays and replace the private m_TerrainRenderMode usages by related getter.
This was SVN commit r24143.
2020-11-08 11:31:32 +00:00
wraitii ad7ac8d595 Fix UpdateComponents logic for pathfinding following d592bf9cb6
Following d592bf9cb6, paths requested at turn N were set-up to be
computed between the end of turn N and the start of turn N+1 (which
would ultimately allow threading this computation), via calls to
'StartProcessingMoves' and 'FetchAsyncResultsAndSendMessages'.

However, the call to UpdateGrid() remained at the start of turn N+1,
between the 'start' and 'fetch' calls. Since all paths are currently
computed on the 'start' call, this means all paths are computed on a
(possibly) dirty pathfinder grid.
In particular, this leads to OOS on rejoin since the rejoiner will
recompute the grid before computing the outstanding paths.

This would also obviously be buggy in a threaded environment, since some
paths might be computed on the fresh and some on the dirty grid.

Finally, MT_TurnStart was sent before the paths were computed, which
might lead to further pathfinder grid changes (not a crashing problem
without threading, but still conceptually odd). The 'fetch' call is thus
moved before it.
This thus fixes d592bf9cb6/D1918, after 92ad6a61fa already fixed a first
issue.

Since the grid is now only updated at the end of a turn, we need to
ensure that it is correct on Turn 0, thus the pathfinder recomputes it
on InitGame.

Refs D14

Reported by: Itms
Fixes #5851

Differential Revision: https://code.wildfiregames.com/D3064
This was SVN commit r24142.
2020-11-08 08:58:19 +00:00
vladislavbelov 9d53bed0bd Adds a LOS mask to Minimap.
Commented By: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2216
This was SVN commit r24141.
2020-11-08 08:51:54 +00:00
vladislavbelov 212f1bdec4 Calculates LOS texture coordinates in shaders for overlay lines only if needed.
This was SVN commit r24140.
2020-11-07 21:34:35 +00:00
Angen 627ed773df Always update preview in biome and landscape
Introduced in af15d5972d.
Landscape and Biome previews are not updated correctly when reopeneing
gamesetup.
To solve that, remove lastBiome and lastLandscape and always try to
update preview if preview file exists and does not match with current
one.

Differential revision: D3041
Reviewed by: @Freagarach
Fixes: #5785

This was SVN commit r24139.
2020-11-07 15:26:37 +00:00
Stan ada16439ab Fix the random slowdowns and speedups on AMD CPUs for Windows
Remove the MAHAF code and binaries, which doesn't work on anything more
recent than Windows XP due to the usage of an unsigned driver.
Remove the custom timer (PMT, TSC...) code to use the Windows
recommended way aka, QueryPerformanceCounter (QPC)
Remove the deprecated functions in wpthread relating to this. Some
further cleanup will be needed, but this patch is already big enough.

This patch voluntarily excludes the Linux Fix for further investigation
as we haven't ruled out a kernel bug yet;

Discussed with: @wraitii, @vladislavbelov, @janwas, AMD Inc,
Tested by: Dakara, @OptimusShepard, Stan (On W10, Win7; with and without
PCH)

Threads:
https://wildfiregames.com/forum/topic/28367-amd-ryzen-threadripper-user-read-before-posting/
https://wildfiregames.com/forum/index.php?/topic/26890-problem-with-ryzen-3000er-series/page/3/

Differential Revision: https://code.wildfiregames.com/D2726
This was SVN commit r24137.
2020-11-06 23:18:16 +00:00
wraitii 429d190fd2 Fix Athenian Long Walls technology following 70c71bff0f.
70c71bff0f changed modifiers to explicitly support only string or
numeric values.
However, buildRestrictions territories worked with a list, which errored
out. This is now replaced with a string.

Reported by: Asger
Investigated by: Freagarach.
Reviewed By: Freagarach
Fixes #5849

Differential Revision: https://code.wildfiregames.com/D3062
This was SVN commit r24135.
2020-11-06 08:14:54 +00:00
vladislavbelov c3843d018f Refactors water shader and move normal and specular calculations into separate functions.
Commented By: Angen, Stan, wraitii
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3040
This was SVN commit r24134.
2020-11-05 17:47:14 +00:00
s0600204 352defd399 Take civ code into account when determining base template name in the Reference Suite
Issue reported by Asger,
Brought to my attention by Freagarach.


Fixes #5848

This was SVN commit r24133.
2020-11-05 14:30:19 +00:00
vladislavbelov b7cbfecd19 Replacing losMap usages by existed and more consistent losTex.
losMap was introduces in fe21c5e023.

This was SVN commit r24130.
2020-11-04 22:55:34 +00:00
vladislavbelov ad965e167d Moves simple water from fixed pipeline to shader pipelines (ARB/GLSL).
Commented By: Stan
Reported By: Freagarach
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3059
This was SVN commit r24129.
2020-11-04 22:25:08 +00:00
Freagarach e98fce58a6 Move some position-related functions to PositionHelper.
Renames helper Entity.js to Position.js and moves to there:
- `EntitiesNearPoint` (from Attacking.js).
- `InterpolatedLocation` (from Attacking.js).
- `TestCollision` (from Attacking.js).
- `PredictTimeToTarget` (from Attack.js).

Also adds a test for the helper.

Differential Revision: D2940
Reviewed By: @wraitii
Comments by: @Stan, @vladislavbelov
This was SVN commit r24128.
2020-11-04 18:56:45 +00:00
Freagarach 0addd691d1 Remove some unneeded comments in UnitAI.js.
Differential Revision: D3045
Reviewed By: @bb
This was SVN commit r24127.
2020-11-04 17:50:20 +00:00
vladislavbelov 2d54653bc3 Little cleanup of PatchRData by reordering includes and correctly formats some loops.
This was SVN commit r24126.
2020-11-04 15:53:33 +00:00
vladislavbelov c64f8824d7 Fixes wireframe mode for terrain, continuing remove fixed pipeline dependencies.
Commented By: Stan, wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3056
This was SVN commit r24125.
2020-11-04 15:52:26 +00:00
vladislavbelov d7d02a4740 Moves terrain lighting calculation to GPU.
Reviewed By: wraitii
Tested By: OptimusShepard, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D3052
This was SVN commit r24124.
2020-11-04 12:54:17 +00:00
vladislavbelov 770280436b Removes FFP option from Atlas and adds ARB/GLSL selection.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D3055
This was SVN commit r24123.
2020-11-04 12:21:55 +00:00
vladislavbelov 6e3db3d84c Removes remaining fixed program used in shader pipelines and adds check on FFP create.
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D3048
This was SVN commit r24121.
2020-11-03 18:59:27 +00:00
Freagarach 8e547cdce5 Add num pad hotkey equivalents.
Such that now e.g. control groups can be selected using those.

Patch by: @Nescio
Differential Revision: D3029
Accepted by: @wraitii
This was SVN commit r24120.
2020-11-03 18:16:19 +00:00
wraitii 478f96d0fd Fix Atlas crash in RangeManager following 939002f0dc
939002f0dc changed from vectors to grid which broke resetting when
terrain size changed.
Also use SAFE_ARRAY_DELETE for simplicity.

Reported by: vladislavbelov
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2961
This was SVN commit r24117.
2020-10-31 10:21:08 +00:00
wraitii 413003fe4f Fix a compartment mismatch in XmppClient, causing crashes in MP games.
Added in 9023f4bebb, which changed lobby GUI messages to JS::Values,
requiring a real context. The original code mistakenly inverted the
owning script interfaces.

Given the reproducibility discovered in SM52, the timeline of the bug,
and the nature of the issues encountered in MP, this is a rather safe
fix for #5655.

Reviewed By: Itms
Fixes #5655

Differential Revision: https://code.wildfiregames.com/D2922
This was SVN commit r24116.
2020-10-31 10:13:33 +00:00
Itms 726d59a995 Make PlayerHasMarket event-based.
This function is currently polling-based, and called by the GUI on each
turn, which results in a big performance hit.

Use the opportunity to rename the set of functions with more generic
names.

Reviewed By: Freagarach, wraitii
Differential Revision: https://code.wildfiregames.com/D2919
This was SVN commit r24114.
2020-10-29 09:22:48 +00:00
Stan 03f9522ff4 Remove useless SDL debug message introduced in 5593f573f4.
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D3050
This was SVN commit r24112.
2020-10-27 21:19:33 +00:00
vladislavbelov acc254533b Refactors water shader to move refraction in a separate function.
Commented By: Angen, asterix, linkmauve, Stan, wraitii
Reviewed By: Angen
Tested By: Angen, asterix, linkmauve, Stan
Differential Revision: https://code.wildfiregames.com/D2908
This was SVN commit r24110.
2020-10-25 21:00:52 +00:00
Angen a7b4d42032 Fix handling of fixed ai defined by map after 5ca68a38ef
Gamesetup fails to handle cases with fixed ai 5ca68a38ef.
Removing wrong 'this' and checking for 'undefined' to fix additional
warnings when switching maps.

Differential Revision: D3038
Fixes: #5844

This was SVN commit r24109.
2020-10-24 12:11:24 +00:00
wackyserious ba1bd070bc New Texture: Oscan Tunics (Carthaginian)
Thread: https://wildfiregames.com/forum/topic/31654-task-oscan-tunic/

This was SVN commit r24107.
2020-10-22 06:37:33 +00:00
wackyserious c9a61c7c4a New Texture: 1.) Thracian Mercenary (Seleucid and Macedonian) 2.) Rhodian Slinger (Macedonian)
Thread:
https://wildfiregames.com/forum/topic/31815-task-thracian-mercenary-seleucid-texture-update/

This was SVN commit r24106.
2020-10-22 06:10:11 +00:00
Freagarach 1582e80ccf Clean up structure templates.
- Purge unnecessary attack sounds and buildingAI-nodes.
- Define some sounds, health and territoryInfluence in children when
most of them override parent.
- Remove unused `<BuildRestrictions/Category>` reverts 9af7747d76, part
of cdcee291cf, references 5e3049f6b2. Categories can be added when
necessary.

Patch by: @Nescio.
Differential Revision: D3016
This was SVN commit r24104.
2020-10-15 11:07:35 +00:00
Stan 93ecc1af4c Fix texture mismatch noticed by wowgetoffyourcellphone. Ptolemies were using black Pharaohs instead of white ones.
Unify textures for kushites and ptolemies.
Add back the kush_struct_02.png file with a proper name this time
Some textures fixes from delenda est.
Delete the old textures and use correctly desaturated version of those.

Refs: 7943d82bfe & d8c7f6da62

This was SVN commit r24103.
2020-10-15 07:14:11 +00:00
Angen dcdc17b2dd Do not use GPUSkinning without glsl [Crash fix]
Disable GPUSkinning when glsl is disabled, because VertexAttribPointer
is not implemented on ARB/GLES and it is called by GPUSkinning.

Differential Revision: D2423
Reviewed by: vladislavbelov
Fixes: #5635

This was SVN commit r24101.
2020-10-13 16:48:04 +00:00
vladislavbelov 4eb13e620a Refactors water shader to move refraction in a separate function.
Tested By: Freagarach, Stan
Differential Revision: https://code.wildfiregames.com/D3028
This was SVN commit r24100.
2020-10-12 19:37:45 +00:00
Stan 11c94cd92b Use stones instead of arrows for quinqueremes. Noticed by Edwarf.
This was SVN commit r24099.
2020-10-12 16:37:52 +00:00
Stan 62a86fe15f Improved patrol icon. Much less like the recycling logo
This was SVN commit r24096.
2020-10-10 16:22:50 +00:00
bb c93bd91ef6 Do not hardcode attacktypes in the engine/Atlas
fixes 0ad79096bd
refs #252, D368
Reviewed By: vladislavbelov
Comments By: Stan, wraitii
Differential Revision: D2998
This was SVN commit r24095.
2020-10-10 15:12:17 +00:00
vladislavbelov 76ebb66241 Moves textures samples and calculations in the water shader to related parts of the code.
Fixes visible foams through fog.

This was SVN commit r24093.
2020-10-07 19:03:40 +00:00
vladislavbelov 5dd0d7752e Refactors water shader to move reflection in a separate function.
Commented By: Stan
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D3027
This was SVN commit r24092.
2020-10-07 18:38:56 +00:00
Stan d8c7f6da62 Remove a bunch of unused/duplicated textures. The duplicated ones might have an impact on performance for older machines. Script by @vladislavbelov.
This was SVN commit r24089.
2020-10-04 21:01:06 +00:00
Angen 0bfaedb78d Do not allow upgrading when entity is producing and vice versa.
Before this patch, when entity was upgrading and producing and finished
upgrading before production, production was canceled. That meant player
assumed unit/tech will be ready in certain time but it will not. Also
fixing interference between upgrade and production animations.

Differential Revision: D2652
Reviewed by: bb
Comments by: Stan, Freagarach
Fixes: #5749
Refs: #2706

This was SVN commit r24088.
2020-10-04 10:20:20 +00:00
vladislavbelov acfd466c32 Fixes crash with mod packing on a wrong path.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D3026
This was SVN commit r24087.
2020-10-04 10:17:34 +00:00
wackyserious fd4635e423 New Texture: Brasidas (Sparta)
Thread:
https://wildfiregames.com/forum/topic/28415-feature-hero-upgrades/?do=findComment&comment=401215

This was SVN commit r24086.
2020-10-03 13:53:25 +00:00
wackyserious ef71863613 Texture and actor file fix: Gauls and Britons (Plus new textures for Briton units)
- Fixed the issues reported by Stan and Nescio (Changeset [24082] and
[24081])

This was SVN commit r24085.
2020-10-03 13:32:55 +00:00
Stan 3e372ccd34 Remove Babylonian lion from Persian barracks.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D3011
This was SVN commit r24083.
2020-10-02 18:28:00 +00:00
wackyserious bfa95074e2 Texture Update: Gaul actor file and texture update (including Briton elite spearman texture)
Thread:
https://wildfiregames.com/forum/topic/25183-task-celtic-british-roster-britons/page/3/?tab=comments#comment-403079
and
https://wildfiregames.com/forum/topic/23002-task-celtic-unit-textures/page/12/?tab=comments#comment-403032

Reviewed by: Genava55 and wowgetoffyourcellphone
This was SVN commit r24082.
2020-10-02 12:11:55 +00:00
wackyserious 61f82bdb5f Texture Update: Celtic linothorax (Minor detail fix)
Reviewed by: Genava55
This was SVN commit r24081.
2020-10-02 08:51:16 +00:00
Stan de44d6c9d4 Fix missing and incorrect garrison flag.
Noticed by: @Mr.lie
Thread:
https://wildfiregames.com/forum/topic/30470-missing-proppoint-on-actor-gaulswonderxml/?tab=comments#comment-406235

This was SVN commit r24080.
2020-10-02 07:48:49 +00:00
Stan 1273307b58 Don't detect audio card when audio is disabled, Fix compilation with --without-audio, fix a few warnings.
Reviewed by: @bb
Comments by: @vladislavbelov, @wraitii
Differential Revision: https://code.wildfiregames.com/D2809
This was SVN commit r24079.
2020-10-02 07:35:59 +00:00
Angen e18c305ba2 Do not reset compatibilty filter when deleting replays
Differential Revision: D3024
Reviewed by: Freagarach
Fixes: #5824

This was SVN commit r24077.
2020-10-01 16:06:15 +00:00
bb b0093a43e6 Redo the previous commit by actually parsing the comments in the revision: use getTextSize. This allows some nukes in the OverlayCounterManager.
refs f09083c04d
refs #5385
Differential Revision: D1764
This was SVN commit r24076.
2020-09-28 16:20:52 +00:00
bb f09083c04d Let the Overlay width depend on the longest string in it
Based on Patch By: ramtzok1
Comments by: elexis, Polakrity, smiley, Stan
Differential Revision: https://code.wildfiregames.com/D1764
fixes #5385

This was SVN commit r24075.
2020-09-28 16:00:06 +00:00
Angen 69a13c2be5 Refactor UpdateMessageSubscriptions in CCmpRangeOverlayRenderer
Introduced in 5fbb224dc0

rewrite 3 ifs to 1 if
merge 2 member variables into 1 member variable
remove 2 function local variables
save one call for CComponentManager as both ifs would or execute or not

code is shorter and looks nicer

Differential Revision: D3009
Reviewed by: bb
This was SVN commit r24072.
2020-09-27 13:12:30 +00:00
bb fbc570674f Show correct trade info for observers
Reviewed By: Freagarach
Discussed with and code proposal taken from: elexis
Differential Revision: D3014
This was SVN commit r24071.
2020-09-25 21:34:24 +00:00
Freagarach adca4ba1f4 Introduce subfolders for geology templates.
This moves:
- geology_metal_*.xml -> ore/*_small.xml
- geology_metal_*_slabs.xml -> ore/*_large.xml
- geology_stone_*.xml -> rock/*_small.xml
- geology_stonemine_*_quarry.xml -> rock/*_large.xml

To have folders per resource subtype as was already the case for fish,
treasures and ruins.

Patch by: @Nescio.
Differential Revision: D1010
This was SVN commit r24070.
2020-09-25 08:37:04 +00:00
Freagarach 162b9e2f6b Introduce subfolders for flora templates.
This moves fruit templates to gaia/fruit/ and wood (tree) templates to
gaia/tree, thus sorting them by resource subtype, as is the case for
fish, ruins and treasures already.

Patch by: @Nescio.
Differential Revision: D1009
This was SVN commit r24069.
2020-09-25 08:29:10 +00:00
bb 44b8e87f43 Don't use GetPopulationCount() in Player.js, but use the value it returns directly
refs: 74f08a5083
Proposed By: Freagarach
This was SVN commit r24067.
2020-09-24 17:07:45 +00:00
bb 446b71e71e Remove comment added in 5b314fc0ac, but obselete since 026ce76e3f.
Noticed by: Freagarach
This was SVN commit r24066.
2020-09-24 16:59:25 +00:00
bb 74f08a5083 Clean simulation/components/Player.js
Add caps/period
var => let
don't use getter inside the component

This was SVN commit r24065.
2020-09-23 17:42:36 +00:00
bb bb5776c079 Disallow gaia to change state, i.e., gaia can't be defeated or win
Reviewed By: Freagarach
Differential Revision: D3013
Fixes #5140

This was SVN commit r24064.
2020-09-23 15:40:48 +00:00
Freagarach 840cc18277 Do not process commands sent by observers.
Differential Revision: D2810
Reviewed by: @bb.
Refs #5140.

This was SVN commit r24063.
2020-09-22 18:28:21 +00:00
bb ac57eae596 Make fauna names consistent
Patch By: Nescio
Differential Revision: D3012
This was SVN commit r24062.
2020-09-21 21:14:24 +00:00
bb c2b97cdba0 Safeguard QueryPlayerIDInterface calls
Similar to 31df44673a

This was SVN commit r24060.
2020-09-21 18:54:32 +00:00
Stan 4a4a768af6 Add missing credit in 3D work. I missed the fact he was in 2D
Noticed by: @Nescio
This was SVN commit r24059.
2020-09-21 09:05:15 +00:00
Stan 499ae887a0 New Kushite Range by @m7600. Small Edits by @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/28530-task-kushite-range/

This was SVN commit r24058.
2020-09-21 08:39:37 +00:00
Stan d3a65b1334 Optimise some textures. Reduce the noise and the size to 512x512, and while at it, compress them better. It seems GIMP doesn't.
Noticed by: @vladislavbelov
This was SVN commit r24057.
2020-09-21 08:02:27 +00:00
Angen 265a9f1f5c [Petra/AI]Handle 0 case for template parsing
[Petra]Check against `undefined` when caching variables from templates.

Current check does not allow to read 0 and false values from templates
and represents them as undefined.

Forum link:
​https://wildfiregames.com/forum/topic/29206-questions-on-ai-api3-template-handling/
Reported by: Teiresias
Patch by: smiley
Reviewed by: Angen
Differential Revision: D3010
This was SVN commit r24053.
2020-09-20 09:48:45 +00:00
Stan 2ec4abd03c Fix non power of two texture.
Noticed by @vladislavbelov

This was SVN commit r24052.
2020-09-20 09:36:23 +00:00
Stan b0e4eecdfe Fix map serialization bug in aeaba3c14c and 8190dd9054.
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2974
This was SVN commit r24051.
2020-09-20 09:33:18 +00:00
bb 31df44673a Add safeguards for all queryOwnerInterface calls
Comments By: Angen, wraitii
Reviewed By: Freagarach
Differential Revision: D2973
This was SVN commit r24050.
2020-09-19 17:55:34 +00:00
vladislavbelov ff9a5fe8f9 Render waves for fancy water effects only if we have water on screen.
Waves were added in 9ce51f4357.

This was SVN commit r24047.
2020-09-16 18:43:58 +00:00
vladislavbelov 92cbf5ead0 Reduces memory usage for fancy water by merging two textures.
Two textures were added in 9ce51f4357.

Reviewed By: wraitii
Tested By: Angen, Freagarach
Differential Revision: https://code.wildfiregames.com/D2983
This was SVN commit r24046.
2020-09-16 18:03:51 +00:00
Freagarach a330d4c7d7 Get dropsites' accepting resources from simulation instead of hardcoding them in tooltips.
Differential Revision: D2980
Reviewed by: @Angen.
Tested and comments by: @Nescio.
This was SVN commit r24045.
2020-09-16 15:28:44 +00:00
Freagarach 61d6885ec2 Split "template_gaia_geo".
To have a generic template per resource subtype, for consistency.

Patch by: @Nescio.
Differential Revision: D2991
This was SVN commit r24044.
2020-09-16 15:19:19 +00:00
Freagarach 66bae4b169 Split "template_gaia_flora*".
Into:
- template_gaia_fruit*
- template_gaia_tree*
to have a template per resource subtype for consistency.
Removed also "Dead " and " Tree" from specific names and purged the
unused "ForestPlant"-class.

Patch by: @Nescio.
Differential Revision: D2990
This was SVN commit r24043.
2020-09-16 15:14:39 +00:00
Angen 34dee54d90 Remove branch from InParabolicRange
This was SVN commit r24041.
2020-09-15 10:10:52 +00:00
bb 7335fc793a sloppyness → sloppiness
Patch By: Nescio
Differential Revision: D3003
This was SVN commit r24040.
2020-09-14 16:55:14 +00:00
bb d54ba356b6 Remove visibleclasses from guiinterface
Reviewed By: Angen
Comment By: Freagarach
Differential Revision: D2997
This was SVN commit r24038.
2020-09-13 11:17:55 +00:00
Angen fdafaf2926 Read correctly 0/false values from map files in gamesetup
After 34138a7764, if map specifies 0 as value in certain settings, this
value is ignored.
Fixing that by explicitly checking for undefined.

Differential Revision: D2982
Reviewed by: Freagarach
This was SVN commit r24037.
2020-09-11 19:24:02 +00:00
Freagarach 277fb13ba0 Don't store the gatherers per player.
94c02ec33c deprecated the use of storing the gatherers on a per player
basis.
This removes it entirely thus saving a few useless calls and operations.

Refs #1387.
Differential Revision: D2755
Reviewed by: @bb.
This was SVN commit r24036.
2020-09-11 10:19:09 +00:00
Angen e543b01077 Cheer after combat when no enemy units are in range
Cheering as is done now is highly unfair and illogical. Cheering units
are immune to all damage for 2.8 seconds.
That means unit A attacking cheering unit B is wasting its attack and
doing 0 damage while taking damage from anyone attacking it (unit A).
That can save cheering unit with 1 HP from being killed what is not fair
to the attacker.

Changes:
removing immunity to damage while cheering
do not forcing cheering order so unit can respond to attacks
removing cheering from promotion
cheering after unit cannot find more targets(units) while in combat and
has nothing else to do
tell units around to cheer as well

Differential Revision: D1977
Reviewed by: Freagarach
Accepted by: goldie, borg-
Comments by: Stan, wraitii
This was SVN commit r24034.
2020-09-10 16:37:14 +00:00
Freagarach 7853a50635 Allow guards to guard a guarding guard.
Explicitly disallowed in the past (see ticket), it now becomes possible
to e.g. guard a catafalque with a hero and guard the hero with healers.

Refs #2034.

Differential Revision: D2732
Reviewed by: @Angen, @bb.
This was SVN commit r24033.
2020-09-10 08:01:25 +00:00
Freagarach 9449e99553 Reuse "APPROACHING"-state in formation combat.
Noted by @wraitii on D1971#inline-53877.

Differential Revision: D2989
Reviewed by: @Angen, @bb.
This was SVN commit r24032.
2020-09-10 07:51:44 +00:00
Freagarach f616cc77ae Move "fauna_fish* -> "fish/*".
Mostly since fish don't inherit from fauna.

Patch by: @Nescio.
Differential Revision: D2774
This was SVN commit r24031.
2020-09-10 07:40:47 +00:00
wraitii 33e01af15e Fix formation walking following "improved ship pickup"/375c319639
Summary:
As reported by @bb and @Angen , 375c319639 broke formation walking in a
few situations.

The issue is that f489ab3a16/D2871 requires formation members to get no
messages until the controller is stopped, but 375c319639 didn't use the
correct function (on account of a missed rebase), so members stopped too
early.

Reported by: bb, Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D3006
This was SVN commit r24029.
2020-09-08 13:48:12 +00:00
Angen bcf329a884 Shrink selection panel icons
Current gui has no space for more structures/formations to be displayed
and some
civilisations are very close to hit this limit.
Alternative would be scrolling option or pages, but until then this is
acceptable solution.

Differential Revision: https://code.wildfiregames.com/D2875
Patch by: Nescio
Reviewed by: Angen, geneva55
Comments by: wraitii, Stan
This was SVN commit r24028.
2020-09-07 17:36:44 +00:00
Angen 87ec9457c3 [Petra] update usage of Elephant class
Remove Champion class from siege functions related to melee elephants.
Improve mobile dropsite code by replacing Elephant class with Unit
class.
Remove code related to fact support elephants can build as it is not
case anymore.

Differential Revision: https://code.wildfiregames.com/D2964
Patch by: Nescio
Reviewed by: Angen
This was SVN commit r24027.
2020-09-07 17:25:12 +00:00
bb 29e2a44f75 Fix broken translations of b606cad5da
This was SVN commit r24025.
2020-09-06 18:37:40 +00:00
Angen 1f5766079d Clean Formation.js
var -> let
comments - capital leters, dots
a:help - dots
spaces

Differential Revision: https://code.wildfiregames.com/D3001
Comments by: Nescio, Jenkins
This was SVN commit r24024.
2020-09-06 14:08:56 +00:00
Angen 9be759fb08 [UnitAI] inline last if in ShouldChaseTargetedEntity
This was SVN commit r24023.
2020-09-06 09:17:13 +00:00
bb b606cad5da Indent attack tooltips
Show splash per attacktype and indent

Patch By: Nescio
Comments By: Freagarach
Differential Revision: D2984
This was SVN commit r24022.
2020-09-04 20:21:59 +00:00
Freagarach f9f7b4d49f Garrison outposts visually.
Instead of disappearing inside an open structure, this lets garrisoned
entities show up on the platform of an outpost.
Also corrects some dimensions.

Patch by: @Nescio.
Differential Revision: D2986
Idea accepted by: @wraitii.
Reviewed by: @borg-.
This was SVN commit r24021.
2020-09-04 13:46:08 +00:00
Freagarach e744cfdd61 Add turret points to gates.
Gates can be garrisoned like regular wall pieces now, which looks nice.
Different civs have different amount of entities that can be placed due
to differneces in their actors:
- 4: brit, gaul, maur
- 5: sele
- 6: kush, pers
- 8: athen, cart, iber, mace, spart, roman siege wall gate
- 10: ptol, rome

Patch by: @Nescio.
Differential Revision: D2760
Informally accepted by: @badosu, @borg-, @genava55.
This was SVN commit r24020.
2020-09-04 13:33:04 +00:00
Freagarach 7f503c5f53 Allow a few more units on walls.
Medium walls now have four slots up from three.
Long walls now have eight slots up from five.

This looks nice and improves realism by making walls a tad easier to
defend.

Patch by: @Nescio.
Differential Revision: D2783
Idea accepted by: @genava55, @borg-.
This was SVN commit r24019.
2020-09-04 13:13:07 +00:00
Freagarach 00e25707dc Do not chase entities in FOW/SOD
Refs #1832 by fixing the non-animal cases.

Differential Revision: D2698
Reviewed by: @bb, @wraitii.
Fixes #3394

This was SVN commit r24017.
2020-09-02 16:10:08 +00:00
wraitii 900dfd67d4 Debuff outpost and remove un-necessary technologies.
Outposts ought to be used to get more vision, not as an accessory to
rushing.
Technologies were not very potent and hardly ever researched.

Patch by: borg-
Reviewed By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2933
This was SVN commit r24016.
2020-09-02 07:26:05 +00:00
wraitii 0c0bd2d58f Balance economy techs to make City Phase less of a snowball.
City Phase economic technologies gave +50% gathering rate increases, on
top of the pre-existing ones, which was such a huge bonus that players
could never recover from being late.

This patch balances techs so that Village and Town phase technologies
are stronger, and City phase not so potent.
Research times also increase with each phase.

Patch by: borg-
Reviewed by: wraitii, badosu
Differential Revision: https://code.wildfiregames.com/D2916
This was SVN commit r24015.
2020-09-02 07:19:45 +00:00
wraitii 344d1cc837 Slightly buff melee units by making ranged units promote slower.
Ranged units are more durable, and generally stronger than melee units
currently.
Making them promote slower (+25%) slightly reduces the gap.

Patch by: borg-
Reviewed By: wraitii, genava55, badosu
Differential Revision: https://code.wildfiregames.com/D2899
This was SVN commit r24014.
2020-09-02 07:12:15 +00:00
wraitii 7c534eae8a Allow training Axeman Cavalry at barracks.
Missed in dd5c7edea3 which introduced this template.

Patch by: borg-
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D2954
This was SVN commit r24013.
2020-09-02 07:03:32 +00:00
wraitii dab3e58a56 Move cavalry movement tech to village phase and make it cheaper.
Having two technologies was too strong a bonus.

Patch by: borg-
Reviewed By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2966
This was SVN commit r24012.
2020-09-02 06:59:33 +00:00
wraitii e916b8cc01 Improve splash damage falloff calculation to account for obstruction size.
Splash falloff was calculated using centre-to-point distance, where
nearest-edge to nearest-edge ought to have been used.
Use DistanceToPoint to correct for that.

Make sure the damage multiplier cannot go negative.
Remove GetUnitSize in favour of GetSize.

Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D2963
This was SVN commit r24010.
2020-08-31 15:01:04 +00:00
wraitii 32886202a3 Fix AI using Maurya elephant archers as hunters following 164af0742a
The Maurya elephant archer is a fast moving citizen soldier, despite
being unable to gather.
This led to an issue post 164af0742a.

Reviewed By: bb
Fixes #5800

Differential Revision: https://code.wildfiregames.com/D2962
This was SVN commit r24009.
2020-08-31 09:05:34 +00:00
Freagarach 0292962756 Standardise attack bonus tooltips.
- Use multiplication symbol.
- Correct "vs." to "vs".

Patch by: @Nescio.
Differential Revision: D2610
Reviewed by: @Gallaecio.
Opposition by: @wraitii.
This was SVN commit r24007.
2020-08-29 09:45:19 +00:00
Freagarach 0530602405 Readd safeguard against killing an entity multiple times.
Also don't try to calculate more when we are damaged with zero (`0`)
amount.

Differential Revision: D2981
Reviewed by: @Angen.
This was SVN commit r24006.
2020-08-29 05:47:06 +00:00
bb 5e6a2322e7 Damage parent of mirage instead of trying to damage the mirage
Reviewed By: Freagarach
Differential Revision: D2979
This was SVN commit r24005.
2020-08-28 18:05:33 +00:00
Freagarach 221d5d4062 Fix applying StatusEffects after 0f91c5ac61.
Fixes the ordering of arguments in HandleAttackEffects by StatusEffects.
Fixes wrongly written effectType.

Differential Revision: D2977
Reviewed by: @bb.
This was SVN commit r24004.
2020-08-28 12:42:32 +00:00
Freagarach 6c27687c0c Sort nodes in templates and data.
The nodes in the templates ought to be sorted alphabetically as should
the modifications in technologies and auras. This makes that so.
(Also added the `Civ` to the Identity of template_formation, for it is
necessary although commented out.)

Differential Revision: D2976
Reviewed by: @Nescio.
This was SVN commit r24003.
2020-08-28 08:03:29 +00:00
Freagarach 0f91c5ac61 Rename Armour to Resistance and change the way it is processed.
- Renames Armour-node to Resistance.
- Support resistance against Capture.
- Puts resistance against effects in separate nodes.
- Some cleaning.

Differential Revision: D2229
Reviewed by: @bb (accepted), @wraitii.
Comments by: @Stan, @Nescio.
This was SVN commit r24001.
2020-08-27 10:24:59 +00:00
bb 37d31a5e3d Group buildings by function in the right selection panel
Patch By: Nescio
Differential Revision: D2807
This was SVN commit r24000.
2020-08-26 15:35:48 +00:00
Freagarach 4881a7ea0e Also move loading image after d6449bf3f0, noticed by @Nescio.
This was SVN commit r23999.
2020-08-26 15:34:23 +00:00
Freagarach d6449bf3f0 Rename blacksmith -> forge.
A blacksmith is a person, a forge is the blacksmith's workshop.
This renames templates and corrects simulation and sound files.

Patch by: @Nescio.
Differential Revision: D2971
Approved by @genava55, @Gallaecio, @wraitii.

This was SVN commit r23998.
2020-08-26 15:00:00 +00:00
bb 2dd772c99f Add some missing credits
Based on patch by: Nescio
Differential Revision: D2882
This was SVN commit r23997.
2020-08-26 12:49:29 +00:00
Imarok 5f1f768ed5 Fix gametime overlay and watermark in summary screen
Reviewed by: wraitii
Differential Revision: https://code.wildfiregames.com/D148
This was SVN commit r23996.
2020-08-26 10:34:25 +00:00
Freagarach b9f82cb7ae Disable WorldPopulation option for scenarios.
Differential Revision: D2949
Reviewed by: @bb.
This was SVN commit r23995.
2020-08-25 14:40:32 +00:00
bb 3372b4618c Fix lineendings for json files
Noticed and proposed by: Nescio
Differential Revision: D2958
This was SVN commit r23994.
2020-08-25 14:17:12 +00:00
Freagarach 3c893ba402 Move "GetDamageBonus"-function from its own helper file to "Attacking.js"-helper.
Also cache calls to `cmpIdentity` to improve performance for multiple
bonuses.

Differential Revision: D2970
Reviewed by: @bb.
This was SVN commit r23993.
2020-08-24 15:17:50 +00:00
bb 0a26c55513 Fix more JsDocs numbers/bools/strings
This was SVN commit r23992.
2020-08-24 11:50:31 +00:00
bb 3ff65b451f Fix jsDocs object => Object
This was SVN commit r23991.
2020-08-24 11:01:25 +00:00
Stan 2627714c07 Allow to play different sounds based on what attacked you
Discussed with: @Lion.Kanzen
Sound by: @Samulis
Reviewed by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D2859
This was SVN commit r23989.
2020-08-21 10:45:37 +00:00
Stan 7d180bcf14 New Kush and Maur portraits, arakamani by @Sundiata, background changes by @wowgetoffyourcellphone, and the harsiotef and chanakya by @m7600
This was SVN commit r23987.
2020-08-20 15:32:41 +00:00
Stan 1316dbf162 New Pers portraits by @m7600, xerxes background retexture by @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23986.
2020-08-20 15:30:07 +00:00
Stan def60ee383 New Rome portraits by @m7600
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23985.
2020-08-20 15:29:31 +00:00
Stan e72406ae29 New Sele portraits by @m7600
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23984.
2020-08-20 15:29:18 +00:00
Stan 1ca34da2b9 New Ptol portraits by @m7600
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23983.
2020-08-20 15:27:52 +00:00
Stan 484ce28d2f New Helo portraits by @m7600, tweaks on phillip's eye by @wowgetoffyourcellphone, background change on Alexander by @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23982.
2020-08-20 15:25:49 +00:00
Stan f5cfa2b018 New Iber portraits by @m7600
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23981.
2020-08-20 15:24:14 +00:00
Stan bdb9fa18c5 Cart Hero portraits by m7600 (hamilcar) and modified background by @wowgetoffyourcellphone and Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23980.
2020-08-20 15:21:56 +00:00
Stan d8709f84f3 New Celt portraits by @m7600 and @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/27520-task-improve-hero-portraits/

This was SVN commit r23979.
2020-08-20 15:19:47 +00:00
Stan aba6223c85 New Athenians portraits by @m7600
This was SVN commit r23978.
2020-08-20 15:17:42 +00:00
Freagarach da8c747e3b Move gaia/fauna_hawk -> birds/buzzard.
The "hawk" is actually a buzzard, so renamed.
Moved outside of the "gaia" folder so mapmakers can easily identify
between birds that cannot be interacted with ("birds" folder) and those
that *can* be interacted with ("gaia" folder) even though they may have
the same template name.

Patch by: @Nescio.
Differential Revision: D2254
This was SVN commit r23977.
2020-08-20 08:45:37 +00:00
Stan 3c31a6d706 Update the thracian rhomphaia icon green to red, add an icon for the gastaphretes by @wowgetoffyourcellphone, delete an unused icon.
This was SVN commit r23976.
2020-08-19 13:27:13 +00:00
Itms 4e63ddbfd9 Add a NVTT version check at compile-time, fixes #5757, refs #5804.
This will prevent users who have an old NVTT installed on their system
from experiencing crashes. Other NVTT issues at runtime should be fixed
by clearing the cache.

Differential Revision: https://code.wildfiregames.com/D2765
This was SVN commit r23974.
2020-08-18 17:30:41 +00:00
Itms 996b37f07b Fix logic issue with the DXT1a texture format, refs #4549.
Before the NVTT upgrade, no DXT1a file would have been properly decoded:
they would all have been mistaken for a 8bpp greyscale due to a logic
issue in our code, which would have triggered a crash. I did not notice
the logic issue when performing the upgrade. As a result, decoding those
files now fails silently: their alpha bit will be ignored and they will
be handled as DXT1.

This patch fixes the logic and allows us to decode DXT1a properly, in
accordance with the format specifications. Currently, we do not use this
format.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2522
This was SVN commit r23973.
2020-08-18 16:45:56 +00:00
Itms de53e2ac44 Fixes and improvements to the CI pipelines.
- Custom fixes to coala: support python3.8 and recent versions of
cppcheck
- Adapt .coafile to current coala
- Adapt LicenseYearBear to current `svn` python package
- Move the linter configuration to the coala directory
- Remove the now unused lint-patch script
- Update Jenkins pipelines to report build stderr as a comment on Unix
(including warnings when the build succeeds), and to report lint issues
inline

Tested on Jenkins during the past week.

Differential Revision: https://code.wildfiregames.com/D2931
This was SVN commit r23971.
2020-08-18 12:47:09 +00:00
wraitii 78d973c11e Check for lastPos existence in Combat-Approaching-MovementUpdate [fix 5568bd4c16]
Fixes 5568bd4c16

`lastPos` isn't guaranteed to exist, though formations are most likely
required to make the situation happen in common gameplay.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2960
This was SVN commit r23970.
2020-08-18 07:46:29 +00:00
vladislavbelov dbca1ed99b Removes unused mapSize uniform and changes too short names of variables in wide scopes.
This was SVN commit r23968.
2020-08-17 21:20:18 +00:00
vladislavbelov 840ed69fa3 Implements correct distance to edges for the building snapping feature.
The feature was added in a8f241da5d.

Reviewed By: Itms
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2945
This was SVN commit r23967.
2020-08-17 20:13:18 +00:00
Alexandermb a909d303de Replace hele_tunic.png to hele_tunic.dds following c9a523796a
This was SVN commit r23965.
2020-08-16 15:24:22 +00:00
Freagarach ba743afcc1 Move TargetKilled function from Attacking.js-helper to KilledBy in cmpHealth.
Also update some "HPchange" to "healthChange".

Differential Revision: D2941
Reviewed by: @Angen.
This was SVN commit r23964.
2020-08-16 06:10:28 +00:00
Freagarach dd8c7b597b Remove some redundant lines from ship templates.
- Move nodes that are superseded in (practically) all children.
- Move footprints to specific children since most actors differ anyway.

Patch by: @Nescio.
Differential Revision: D2744
This was SVN commit r23963.
2020-08-15 06:06:15 +00:00
Freagarach 69e7a781c4 Use mercenaries in scenarios instead of mace_* duplicates.
Split off from D2863.

Patch by: @Nescio.
Differential Revision: D2873
This was SVN commit r23962.
2020-08-15 05:52:48 +00:00
Alexandermb 4e033dace9 Correct a typo cooper -> copper.
This was SVN commit r23960.
2020-08-13 02:21:37 +00:00
Alexandermb c9a523796a Update the cretan pelte with a new mesh (Reused from the Xiongnu shield mesh with some adjustments)
Thread:
https://wildfiregames.com/forum/index.php?/topic/28632-delenda-est-screenshots/#comment-402708

Added a few textures required by the actor.

This was SVN commit r23959.
2020-08-12 19:49:05 +00:00
Freagarach c527ca3d6c Remove some unnecessary lines from a few civic structure templates.
Patch by: @Nescio.
Differential Revision: D2850.
This was SVN commit r23957.
2020-08-10 06:06:43 +00:00
Freagarach 24e0e50a9d Javelinist -> Javelineer in templates.
Follow up to f489ab3a16.

Patch by: @Nescio.
Differential Revision: D2914
This was SVN commit r23956.
2020-08-10 05:59:56 +00:00
vladislavbelov 4f39e6675a Completely separates fixed and shader paths in sky rendering.
Removes usages of fixed pipeline functions in shader path.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2944
This was SVN commit r23954.
2020-08-09 15:21:06 +00:00
vladislavbelov b664a1ae8e Moves GL calls of fixed pipeline under the same condition.
This was SVN commit r23953.
2020-08-09 13:01:58 +00:00
vladislavbelov 4c1847d3db Removes old matrices from sky rendering in shader path.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2943
This was SVN commit r23952.
2020-08-09 11:24:09 +00:00
Angen 36c1566640 Forgot female support in d503363e83
This was SVN commit r23951.
2020-08-08 11:52:55 +00:00
Angen b3f40e54f8 Correct cart.json changes that slipped on commit rebase in d503363e83
This was SVN commit r23950.
2020-08-08 11:37:58 +00:00
Angen d503363e83 Rename italiote to italic
Differential Revision: D2796
Patch by: Nescio
Reviewed by: Angen, Stan
0 A.D. currently uses the term "Italiote" [sic]. It's best to use
precise language:

Italic refers to a branch of Indo-European and the peoples that speak it
(cf. Celtic).
Italian refers to the modern language, descendant from Latin, the people
that speak it, and their country (cf. Romanian).
Italiot (from Ἰταλιώτης) refers to Greeks living in Italy (cf. Cypriot).
From the context it's clear what 0 A.D. actually means (Samnites etc.)
is Italic.

This patch therefore:

Corrects the art file names.
Also renames the other embassy icons for consistency (cf. D2551).
Corrects the embassy template file name.
Adjusts the affected templates, AI, and map file.
Deletes the unused Celt, Iberian, Italian classes.
Updates the embassy template tooltips (cf. D2578) and cart.json civ file
entries.
Orders the <Identity> node in the templates as specified in Identity.js.

This was SVN commit r23949.
2020-08-08 11:23:34 +00:00
vladislavbelov 26ae55cad0 Adds contrast-adaptiv-sharpening filter, also helps to partly remove FXAA texture blurring.
Patch By: OptimusShepard
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2642
This was SVN commit r23947.
2020-08-07 22:16:55 +00:00
Freagarach 8d90636306 Correct buildings in PetraAI's config.js.
Add missing entries and remove deprecated rotary mill.
Also some cosmetic changes.

Patch by: @Nescio.
Differential Revision: D2887
This was SVN commit r23946.
2020-08-07 17:36:11 +00:00
vladislavbelov e49cc91257 Adds ARB shaders for GUI materials to replace fixed ones.
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2921
This was SVN commit r23945.
2020-08-07 08:32:01 +00:00
Freagarach 3b668e0a71 Fix the barter string which were in reversed order.
Also rename variables to reduce ambiguity.

Patch By: @Nescio
Differential Revision: https://code.wildfiregames.com/D2893
This was SVN commit r23944.
2020-08-07 07:34:02 +00:00
wraitii f27e5ce139 Fix ODR violation for ShaderModelRendererInternals.
ShaderModelRendererInternals is defined twice, once by ModelRenderer.cpp
and once by HWLightingModelRenderer.cpp.
Having two different definitions in the global namespace is a violation
of the C++ One-Definition-Rule.

Patch by: StefanBruens
Reviewed By: wraitii, Vladislav
Differential Revision: https://code.wildfiregames.com/D2932
This was SVN commit r23941.
2020-08-06 11:33:26 +00:00
wraitii 45d136d57e Fix GetPosition2D call when the entity may be out of the world in unitMotion
As reported by Freagarach following a7da40ac2f.

32e8ed51aa introduced a "MoveObstructed" message, that could be sent
when the entity ran into obstructions, to stop early.
In HandleObstructedMove, my intention, as written in the comment, was
that the caller would do its thing (call StopMoving(), move out of the
world etc.) and thus ComputeGoal would return early.

However, I mistakenly left the `cmpPosition->GetPosition2D()` in between
that and ComputeGoal, which would then fail.

This fixes that by moving it after the `ComputeGoal` call.

Also add a sanity StopMoving() call to a7da40ac2f's move-out-of-world
call.

Reported by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2935
This was SVN commit r23940.
2020-08-06 08:40:14 +00:00
wraitii cdefefa617 Switch Medium and Normal map sizes.
The default size used to be Medium, when "Normal" makes more sense for
that.
Further, "medium" is now halfway between tiny and giant sizes, which
also makes more sense.

Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2927
This was SVN commit r23939.
2020-08-06 07:57:27 +00:00
wraitii 02efd269c9 Only scan the relevant part of the map in DiskPlacer
This makes it faster, particularly for small radiuses.

Patch by: badosu
Comments by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2710
This was SVN commit r23938.
2020-08-06 07:03:26 +00:00
Freagarach 3fbc3f2cd5 Standardise armour technology tooltips.
Makes the tooltips of technologies that modify armour consise.

Patch by: @Nescio.
Differential Revision: D2579
Reviewed by: @Gallaecio.
This was SVN commit r23937.
2020-08-06 06:05:28 +00:00
Freagarach bbeeaae768 Rename workshop to arsenal.
A workshop is a more generic place of doing work whilst an arsenal is a
place where artillery is handled, which is the purpose of the structure
in 0 A.D..

Patch by: @Nescio.
Differential Revision: D2756
This was SVN commit r23935.
2020-08-05 18:47:17 +00:00
wraitii cb25b5e9b7 Tweak vision of walls and some special structures.
Those buildings get 1 vision (making them selectable), but no longer
provide vision on their own.
Wall Towers have their vision increased slightly to make it larger than
their attack range and to compensate for it.

Patch by: Nescio
Accepted By: borg-, genava55, wraitii
Differential Revision: https://code.wildfiregames.com/D2505
This was SVN commit r23934.
2020-08-05 09:36:23 +00:00
wraitii 395a10beb0 Fix compilation error on arch introduced by 5473393e30
CLogger.h uses std::deque but doesn't include the required header file.
This fails since 5473393e30 on Arch Linux

Reported by: navigo_ps91
Reviewed By: irishninja
Differential Revision: https://code.wildfiregames.com/D2928
This was SVN commit r23933.
2020-08-05 09:25:24 +00:00
wraitii 1dd01f2ca8 Tweak soldier footprints
Switch cavalry / elephant footprints to a 2:1 ratio.

Accepted By: wraitii, genava55
Differential Revision: https://code.wildfiregames.com/D2496
This was SVN commit r23932.
2020-08-04 14:24:34 +00:00
wraitii a0ee4f35a8 Remove territory influence from arch, monument, pillar
Patch by: Nescio
Accepted By: borg-, genava55, wraitii
Differential Revision: https://code.wildfiregames.com/D2504
This was SVN commit r23931.
2020-08-04 13:48:09 +00:00
wraitii ce9307c1a9 Streamline animal footprints.
Define them in specific templates as animals generally have specific
actors.
Use values in 0.5 steps and pick them appropriately for each actor.

Patch by: Nescio
Accepted By: wraitii, genava55
Differential Revision: https://code.wildfiregames.com/D2721
This was SVN commit r23930.
2020-08-04 13:42:49 +00:00
wraitii 84d92ecfaf Disable artillery towers and bolt towers in-game.
Introduced by 21106e011f and d4db7d2e0b respectively, these templates
were introduced without taking gameplay considerations into account, and
players disliked them.
De-activate them from regular play until a better solution can be found.

Test Plan: Check for completeness and correctness. Agree unbuildable is
an improvement over brokenness.

Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2495
This was SVN commit r23928.
2020-08-03 14:11:16 +00:00
Stan ea725cc289 Fix text input max_length attribute. fixes 5593f573f4
Reviewed by: @wraitii
Fixes #5266
Differential Revision: https://code.wildfiregames.com/D2377
This was SVN commit r23927.
2020-08-03 12:39:25 +00:00
wraitii 01118c1196 Fix issues relating to SDL and wxWidgets interaction in Atlas.
This fixes the transfer of key inputs from WxWidgets to SDL, making it
possible to type in the in-game GUI from Atlas.

Also fixes whitespace issues in some Atlas files.

The following improvements are OSX specific:
- fixes an SDL assertion related to unused subsystems in Atlas.
- Remove the 'osxguiapplication' override. This fixes the editor
starting up in the background and not accepting input when launched from
in-game.
- To prevent an issue with sdl/wxwidgets conflict when running from
inside the game, actually boot a new instance (see #2427)


Reported by: wik (Many thanks for your investigations)
Tested by: trompetin17, Stan
Fixes #2427
Fixes #2846

Differential Revision: https://code.wildfiregames.com/D2788
This was SVN commit r23926.
2020-08-03 12:23:16 +00:00
wraitii 375c319639 Improve ship pickup.
Improve unitAI: don't move if the requester can reach us and we are
close enough. This avoids an issue where ships moved more than necessary
when picking up many units.
Also improve requester UnitAI -> retry pickup if the target entity is
Idle.
Improve unitMotion: periodically recompute paths in "known bad path"
mode to adapt to moving targets.
Expose UnitMotion reachability to scripts and other code.

This adds a test map for some common and some tricky pickup cases, using
triggers.

Based on a patch by: causative
Reviewed By: Freagarach
Fixes #3472

Differential Revision: https://code.wildfiregames.com/D665
This was SVN commit r23925.
2020-08-03 12:02:24 +00:00
Freagarach 88dc6d8e1e Do not let every entity with UnitAI listen to "OnGlobalConstructionFinished".
All entities with UnitAI wastefully listened to global
ConstructionFinished messages. Now the message is only sent to assigned
builders.

Differential Revision: D2697
Reviewed by: @wraitii.
This was SVN commit r23924.
2020-08-03 10:13:54 +00:00
Freagarach 7bf1bf3f66 Alphabetize entity limits and statistics classes.
This makes it less likely to add double entries. Also corrects
indentation in the `<StatisticsTracker>`-node.

Patch by: @Nescio.
Differential revision: D2834
This was SVN commit r23923.
2020-08-03 09:25:22 +00:00
wraitii a6e41c545e Allow women citizen to lay the same foundations as citizen soldiers.
Women could already build/repair such buildings, they simply could not
be used to place foundations.
This reduces micro and removes a minor annoyance.

Accepted By: Nescio, borg-, badosu, itms
Differential Revision: https://code.wildfiregames.com/D2911
This was SVN commit r23921.
2020-08-02 12:43:14 +00:00
wraitii d0ff48bc7a Fix gathering infinite loop when the gatherer is out of the world.
Promoted units move out of the world but keep their current orders,
which can trigger invalid states.
As cleanup, handle this case in GATHER.FINDINGNEWTARGET

A more general fix seems possible by putting the UnitAI in a default
state.

Reported by: psypherium
Reviewed By: Angen
Fixes #5788

Differential Revision: https://code.wildfiregames.com/D2920
This was SVN commit r23920.
2020-08-02 11:40:46 +00:00
wraitii 21cdcf44bc Fix segfault when sending a very large net chat message.
This crash occured on the receiver machine, making it effectively a
remote crash attack.

Reported by: Riddler66
Based on a patch by: elexis
Fixes #5726

Differential Revision: https://code.wildfiregames.com/D2629
This was SVN commit r23918.
2020-08-01 15:25:13 +00:00
wraitii 5473393e30 Add an interface for Reinforcement Learning.
Implement a simple HTTP server to start games, receive the gamestate and
pass commands to the simulation.
This is mainly intended for training reinforcement learning agents in 0
AD. As such, a python client and a small example are included.

This option can be enabled using the -rl-interface flag.

Patch by: irishninja
Reviewed By: wraitii, Itms
Fixes #5548

Differential Revision: https://code.wildfiregames.com/D2199
This was SVN commit r23917.
2020-08-01 10:52:59 +00:00
wraitii 164af0742a Use new FastMoving class instead of Cavalry in AI/petra.
This class is an AI hint that such units are to be treated as moving
fast, e.g. war dogs, or cavalry.
This makes it easier to introduce camels and chariots correctly.

Further work is required to make the AI unit choices less hardcoded.

Patch by: Nescio
Reviewed By: Angen, wraitii
Differential Revision: https://code.wildfiregames.com/D2251
This was SVN commit r23916.
2020-08-01 10:35:44 +00:00
wraitii 17e6d8b24b Delete paired wall technologies.
“Rubble Materials” and “Geometric Masonry”, paired techs, could be
researched by most civs. They had limited use, were incoherent with
civ-specific art, and were researchable at wall-towers, at which points
techs that affect walls make less sense.

As such, they are deleted.

Patch by: Nescio
Accepted By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2880
This was SVN commit r23915.
2020-08-01 10:32:35 +00:00
s0600204 ff08e383a0 Resolve issue with palisade health in Structure Tree
The "health" of the palisade wallset was not being displayed correctly
in the
Structure Tree for any civ that didn't have the same resultant civbonus
effect
as the first civ shown when the 'Tree was opened.

The issue was caused by caching the parsed form of an entity template
when it is
first requested, then using that for *every* civ.

This wouldn't matter if every civ had completely different entities from
every
other civ, and no civ had civbonus technologies that affect shared
entities.

However, in "vanilla" 0 A.D., the templates of the palisade wallset, and
those
of the sheep, pig, and goat trainables, are shared between multiple
civs. And
the athen, brit, gaul, mace, and spart civs all have civbonus
technologies that
affect structure health.

(And as for mods, who knows...)

The solution provided here is to cache parsed entities by civ, like we
already
do with technologies.


Issue raised by @Nescio in b2842e8021

This was SVN commit r23913.
2020-07-31 00:14:31 +00:00
Stan bb0f680e42 Fix missing coma in bbb83d2c08.
This was SVN commit r23912.
2020-07-30 06:07:24 +00:00
Stan ab7cf4c3bf Remove stretching from the 5x8 and 5x9 decals
Patch by: @wowgetoffyourcellphone
This was SVN commit r23911.
2020-07-29 20:59:02 +00:00
wraitii 1d7c382e9a Fix warning with disabled templates in 70c71bff0f.
The code assumed that a player was being passed when it wasn't.

Reported by: Angen
Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D2904
This was SVN commit r23910.
2020-07-29 09:45:42 +00:00
Stan 2946a06239 Add missing gravel and normal files from previous commit
This was SVN commit r23909.
2020-07-28 23:49:25 +00:00
Stan 5461865eff New dirt and gravel decal textures.
Patch by: @wowgetoffyourcellphone
Textures created by Lennart Demeshttps://cc0textures.com/ and adapted by
wowgetoffyourcellphone

This was SVN commit r23908.
2020-07-28 21:07:07 +00:00
Stan 09332fe5ab Fixes the broken animation "attack_slaughter" of the camelry archer actors
Patch by: @Mr.lie
Differential Revision: https://code.wildfiregames.com/D2909
This was SVN commit r23907.
2020-07-28 20:31:56 +00:00
Stan bbb83d2c08 Fixes the broken animation of the persian champion_cavalry_archer
Patch by: @Mr.lie
Differential Revision: https://code.wildfiregames.com/D2907
This was SVN commit r23906.
2020-07-28 20:23:54 +00:00
bb 8f946aa3d9 Split Audio and Map credits from Art.
Fix some lineendings

Differential Revision: D2912
Patch By: Nescio
This was SVN commit r23905.
2020-07-27 15:19:19 +00:00
Stan bd48a45aad Add more animations to the atlas drop-down list and delete non-existent animations
Patch by: @Mr.lie
Differential Revision: https://code.wildfiregames.com/D2906
This was SVN commit r23904.
2020-07-27 07:36:38 +00:00
Stan 828fdf7096 Fix the "pick" tool being in the incorrect hand.
Patch by: @Mr.lie
Differential Revision: https://code.wildfiregames.com/D2903
This was SVN commit r23903.
2020-07-27 07:35:20 +00:00
Angen f0f0d6eed7 Allow selectable component to overwrite shape of displayed selection from footprint
Removing strict binding of selection to footprint by adding optional
choice similar in footprint. If present, that one will be used, else it
will fallback to footprint size.
Allowing to use any selection shape without affecting gameplay, because
foorprint is used for projectile hit detection.

Differential revision: https://code.wildfiregames.com/D2844
Reviewed by: wraitii
This was SVN commit r23900.
2020-07-26 18:26:20 +00:00
Angen f074096cf3 Use average rotation of members when giving formation controller into the world
Differential revision: https://code.wildfiregames.com/D2890
Reviewed by: wraitii
Comments by: Freagarach
This was SVN commit r23899.
2020-07-26 18:22:26 +00:00
wraitii 6201574fc0 Fix Citizen cavalry axemen attack and clean up melee cav templates.
Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2888
This was SVN commit r23897.
2020-07-25 09:23:08 +00:00
wraitii 8af88dfc58 Civilisation .json style corrections
Patch by: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2222
This was SVN commit r23896.
2020-07-25 09:17:20 +00:00
wraitii 41572245cf Unify infantry walking speed / vision.
Ranged units have a base walk multiplier of 1.2, melee of 1.0. Pikemen
are slightly slower.

Heros have 100 vision range, infantry have 80.

Approved by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2884
This was SVN commit r23895.
2020-07-25 08:47:25 +00:00
wraitii 14cc16fbdc Fix various tooltip/text oversights.
This patch fixes some oversights missed in recent commits:
* `pers.json` entry in D2532/d1d4a1d6b9.
* `brit.json` entry in D2533/c04a1ebac3.
* Delete two auras rendered obsolete in D2686/c1d71abe0b.
* Tooltip and `mace.json` entry in D2867/9eff418cb5.
* `maur.json` entry in D2821/133d163689.
* `sele.json` entry in D2858/95cc3937bd.
* Indentation, tooltip, and `{civ}.json` entries in D2839/32615ae6be.
* Indentation, tooltip, and `{civ}.json` entries of Hellenistic
Metropolis technology.
* Purged some non-existent things in various `{civ.json}` files.
* Added a history string and updated the technology tooltip for the
Immortals.
* Fixed Cart walls civ bonus tooltip.

Patch by: Nescio
Reviewed By: borg-
Differential Revision: https://code.wildfiregames.com/D2885
This was SVN commit r23894.
2020-07-25 08:35:40 +00:00
wraitii e804da16fd Update Briton war dog.
The war dog was OP in the early game, and useless in the late game.

Patch by: borg-
Comments by: Nescio
Approved by: badosu, Lionkanzen, Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2879
This was SVN commit r23893.
2020-07-25 08:30:13 +00:00
wraitii 45a10a16dc Tweak the Spartan "Agoge" tech, affect champions only.
The agoge did not concern perioikoi, thus should not affect the citizen
soldiers.

Spartan hoplites are supposed to be the strongest infantry in the game,
this makes them again more effective than Macedonian Silver Shields.

Patch by: borg-
Accepted by: Nescio
Differential Revision: https://code.wildfiregames.com/D2846
This was SVN commit r23892.
2020-07-25 08:17:26 +00:00
wraitii 66c147f06e Buff "archery tradition" tech.
The health reduction was too drastic and made this tech unbalanced. It
is removed, in favour of slightly smaller buffs and a lower cost.

Patch by: borg-
Comments by: Nescio
Reviewed By: wraitii, Nescio
Differential Revision: https://code.wildfiregames.com/D2876
This was SVN commit r23891.
2020-07-25 08:10:20 +00:00
wraitii 4641890ad1 Enable Macedonian gastraphetēs (crossbowmen) at the siege workshop.
Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2901
This was SVN commit r23890.
2020-07-25 08:04:05 +00:00
wraitii 1475360ebe Reduce palisade health and repair ratio.
Patch by: Nescio
Approved by: borg-, LionKanzen, wraitii
Differential Revision: https://code.wildfiregames.com/D2803
This was SVN commit r23889.
2020-07-25 07:59:28 +00:00
wraitii 1a6f155780 Disable Persian Hall & Ishtar gate as buildable structures.
The Kardakes mercenaries, trainable at the Persian Hall, are
historically problematic. Few sources exist on Kardakes troops, but they
seem to have been rather heavy infantry, and likely not mercenaries. As
such, they would be rather redundant with the Immortal.
The elephants are attested, and might be reintroduced later.

Further, the Ishtar Gate is Neo-Babylonian and predates the 0 A.D.
timeline. As such, given its limited use, it is removed as a buildable
structure.

Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2742
This was SVN commit r23888.
2020-07-25 07:54:46 +00:00
wraitii fc50efd7eb Train champion chariots at the Persian fortress.
This unit is historically well attested, such as the Battle of Cunaxa or
the Battle of Gaugamela.
This unit is currently added at the fortress, though another pass for
chariots in general is needed.

Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2683
This was SVN commit r23887.
2020-07-25 07:28:23 +00:00
wraitii 031f2221fa Update gate cost to be proportional to wall costs & not cost stone.
Patch by: Nescio
Comments by: Feldfeld
Reviewed By: borg-
Differential Revision: https://code.wildfiregames.com/D2687
This was SVN commit r23886.
2020-07-25 07:16:30 +00:00
wraitii eb0d89e220 Delete unused function left behind in e9361705ae
e9361705ae cleaned up our config setup, but left behind isOverriden,
triggering a compilation warning.

Reported by: Imarok
This was SVN commit r23885.
2020-07-25 07:05:36 +00:00
vladislavbelov 1368f87590 Fixes actor seed for deleted entities in Atlas.
This was SVN commit r23882.
2020-07-24 19:13:09 +00:00
Stan 8190dd9054 Fix Atlas crash introduced by aeaba3c14c
Reviewed by: @Angen @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2898
This was SVN commit r23881.
2020-07-24 18:53:03 +00:00
vladislavbelov 57bbd774f6 Makes FXAA working only for GLSL and disabled for ARB.
Also adds option dependency. FXAA was introduced in 113b1c49b9.

Patch By: OptimusShepard
Differential Revision: https://code.wildfiregames.com/D2780
This was SVN commit r23880.
2020-07-24 18:48:18 +00:00
Stan bff1481b32 Allow the interval to be changed in the templates for the Resource Trickle component.
Reviewed by: @Freagarach
Fixes #5632
Differential Revision: https://code.wildfiregames.com/D2794
This was SVN commit r23879.
2020-07-24 18:39:51 +00:00
Freagarach bf87c2e686 Split attack range and vision range queries.
This splits the "LOS"-query from the "Attack"-query. The LOS-query is
only enabled for skittish animals for now and entities without cmpAttack
don't try to set up an Attack-query anymore.

Differential Revision: D2824
Reviewed by: @bb.
This was SVN commit r23877.
2020-07-24 06:07:27 +00:00
Freagarach 663eb0eba0 Javelinist -> Javelineer.
Changes user facing Javelinist (athlete) to Javelineer (soldier).

Differential Revision: D2591
Patch by: @Nescio.
Reviewed by: @Freagarach, @Gallaecio, @wraitii.
This was SVN commit r23876.
2020-07-23 16:50:49 +00:00
bb 2769424407 Cleanup of Capturable component
Comments By: wraitii, Stan, Freagarach
Differential Revision: D2826
This was SVN commit r23875.
2020-07-23 13:46:56 +00:00
bb db90b7add8 Defeat players on conquestStructures nomad who don't build anything.
Differential Revision: D1469
Reviewed By: Angen
Comments By: temple, elexis
Reported By: petherfile, hannibal barca
fixes: #3749

This was SVN commit r23874.
2020-07-23 13:40:04 +00:00
Freagarach edb956424e Allow world population capacity.
This allows to specify a world population capacity that is divided
evenly amongst living players.

Differential Revision: D2426
Reviewed by: @Angen
This was SVN commit r23873.
2020-07-23 09:00:34 +00:00
Imarok 69ff754148 x → × in game speeds
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2895
This was SVN commit r23871.
2020-07-22 16:27:48 +00:00
Imarok d5fbba314a [gui] replace hyphen-minus with em-dash in credits
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2820
This was SVN commit r23870.
2020-07-22 16:24:29 +00:00
bb 8dca7f221c Add all (visible) classes found by P217 in Identity.js
Remove a useless class from palisade_fort (already a visible class)

This was SVN commit r23869.
2020-07-22 14:26:17 +00:00
wraitii 84a3f36537 Tweak champion cost to make the viable again.
Overall costs are reduced by around 25%, keeping a high Metal cost, and
they are made uniform across champions as a baseline.
Loot is adjusted.

Patch by: borg-
Accepted By: badosu, Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2816
This was SVN commit r23868.
2020-07-22 09:42:18 +00:00
wraitii f489ab3a16 Abort formation-walking on any message from UnitMotion.
Units in formation can occasionally request many short paths (and thus
introduce crippling lag) if their offset is obstructed.
This particularly happen when the formation is idle, since the offset
then always remains obstructed.

To prevent this, it is OK to immediately stop pathing on any motion
message (obstructed, failure, success). This does not break formation
movement since messages are only sent when the formation controller is
not moving (this finishes what was started in 0535eb9b92).

Ideally, this hack could be removed if the short-pathfinder was quick
enough / units were better at aborting.

Fixes concern raised by Freagarach on a7da40ac2f.

Refs #5624 in that the max-short-path range is the source of the lag.

Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2871
This was SVN commit r23867.
2020-07-22 09:31:08 +00:00
bb 2ef3fd7a77 Clean up market classes:
template_structure_economic_market.xml → Market
template_structure_military_dock.xml → Dock
<Market/TradeType> node → Trade
requirement for bartering: BarterMarket → Barter

Change Petra accordingly


Also changing:
    Renamed the Gates class to Gate, LongWall to WallLong (cf.
WallTower), and StoneWall to Wall, to match their template file names.
Adjusted AI code, technologies, and templates accordingly.
    Entity build restrictions:
        renamed Apadana to Palace;
        replaced UniqueStructure with IshtarGate and TempleOfVesta.
        added Council to the (unbuildable) spart_gerousia.xml, since
it's functionally identical to athen_prytaneion.xml.
    Introduced the following classes:
        Council, IshtarGate, Library, TempleOfVesta, and Theater, to
match their build restrictions.
        WallMedium and WallShort, to complement the already existing
WallLong and WallTower classes.
        Stoa, TempleOfMars, and TriumphalArch, for completeness.
    Made the ArmyCamp, Colony, Gate, Lighthouse, Naval, Palace,
Palisade, SiegeWall, and StoneWall classes visible.
    Deleted the now unused Apadana, Kennel, SpecialBuilding classes.
    Removed the Village class from outposts and palisades, because those
are not supposed to count towards the phase technology requirements.
        Slightly rephrased the phase technology requirements tooltips.
    Corrected the <GenericName> of the various palisade files.
    Updated Structure tooltips from D2578 that have not already been
committed elsewhere.

Patch By: Nescio
Differenital Revision: D2892

This was SVN commit r23865.
2020-07-21 19:45:30 +00:00
bb e428678b7e Don't assume health is both plural and singular in all languages.
see 47d5422e64

This was SVN commit r23864.
2020-07-21 16:37:43 +00:00
bb 47d5422e64 Heal HP → Health, Rate → Interval
Patch By: Nescio
Differential Revision: D2842
This was SVN commit r23863.
2020-07-21 16:28:29 +00:00
wraitii 98108be43e Fix GetTechModifiedProperty mistake in 70c71bff0f & allow multiple token modifiers.
String-values in modifications fail if the modifications do not apply,
as they end up in the "multiply/add" path, following D270 / 70c71bff0f.

Also allow multiple token modifiers, so that multiple tokens may be
added for example. This becomes order-dependent but the positive
outweighs the negative.

Reported By: wowgetoffyourcellphone
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2894
This was SVN commit r23862.
2020-07-21 08:15:59 +00:00
Freagarach 28e6c936e7 Fix oversights from 215c503e30.
- Re-alphabetise wall templates.
- Inactivate obstruction of turret when occupying a turret position.

Differential Revision: D2896.
Reviewed by: @Nescio, @wraitii.
This was SVN commit r23861.
2020-07-21 06:09:19 +00:00
vladislavbelov 3ed9df0d6c Allow map to recenter during resize in Atlas. Fixes #1109.
Patch By: Clockwork-Muse
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D825
This was SVN commit r23859.
2020-07-21 02:08:50 +00:00
Angen 25e8b38ba8 Fix message on allied victory with no active players
When starting a game with exactly one player that instantly wins the
game (consequest victory) and after that ceasefire running out will
trigger first the correct victory chat message, then a broken and
undefined have won the game chat message, initiated from the
ceasefiremanager.

Check for allies emptyness and do not send it if no players are active,
what means they all have been defeated or won.

Differential Revision: https://code.wildfiregames.com/D2891
Fixes: #5675

This was SVN commit r23857.
2020-07-20 17:10:08 +00:00
Freagarach 215c503e30 Move the ability to hold a turret to a separate file.
The logic concerning visible garrison points (i.e. turrets) is moved
from `GarrisonHolder` to a separate file.
This is logical because garrisoned != turreted, so this allows for
turrets that cannot be garrisoned (refs. D1958).
Also references #3488.

Differential Revision: D2367
Reviewed by: @wraitii
This was SVN commit r23856.
2020-07-20 10:51:14 +00:00
Angen e07f12bea6 Clean up tower classes and related changes.
Classes:
The Defensive class is made visible (cf. Civic, Economic, Military).
The Fortress class is made visible (because of build restrictions).
The Tower class defined in template_structure_defensive_tower.xml is now
visible.
The unused GarrisonTower class is removed.
The DefenseTower class is deprecated in favour of one unique class in
each of the *_tower.xml children templates:
*_artillery.xml → ArtilleryTower
*_bolt.xml → BoltTower
*_sentry.xml → SentryTower
*_stone.xml → StoneTower
template_structure_defensive_wall_tower.xml does not inherit from
*_tower and therefore has a WallTower class instead of a Tower class.
Updated the Identity.js file accordingly.
Updated the Petra AI files accordingly (DefenseTower → Tower).
Tower build restrictions are changed to simply Tower.
Technologies:
tower_armour.json affects all towers, but not outposts (unchanged).
tower_decay.json and tower_vision.json affect only outposts (unchanged).
tower_crenellations.json, tower_murderholes.json, tower_range.json, and
tower_watch.json affect now only the Sentry and Stone towers, instead of
all towers. This alters gameplay for the Artillery and Bolt tower, but
those shouldn't have been benefitting from arrow tower technologies
anyway.
Standardized the tooltips per the style guide.
Updated the <Identity/Tooltip> in the tower templates.
Inserted <BatchTimeModifier>1.0</BatchTimeModifier> in
template_structure.xml, where the <ProductionQueue> is defined, and
removed the <BatchTimeModifier> from templates that can't train any
units.

Patch by: Nescio
Reviewed by: Angen
Differential Revision: https://code.wildfiregames.com/D2549
This was SVN commit r23853.
2020-07-19 11:45:00 +00:00
Angen 772bb7ea69 Fix tests after eec47157ad
sorry

This was SVN commit r23852.
2020-07-19 11:01:22 +00:00
Angen edac6cecf1 Keep rotation when leaving formation
This prevents units to rotate when leaving formation as they already
have correct rotation.
Differential Revision: https://code.wildfiregames.com/D2889
This was SVN commit r23851.
2020-07-19 10:49:18 +00:00
Angen eec47157ad Set previous behaviour for SetFacePointAfterMove.
Implement get method in cmpUnitMotion.
Use it in UnitAI.

This was SVN commit r23850.
2020-07-19 10:42:45 +00:00
bb a9d1d16d5f Allow garrison and attack to be queued order in entityCollection
Differential Revision: D2823
Reviewed By: Angen
This was SVN commit r23849.
2020-07-19 10:41:30 +00:00
Stan aeaba3c14c Use victory conditions json's in Atlas
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2393
This was SVN commit r23847.
2020-07-18 17:39:59 +00:00
wraitii 5e2f76f461 Fix preselection action breakage in 4bed678194.
`target` did not always exist, thus raising errors when patrolling or
guarding.

Fixes concern raised by @Freagarach at 4bed678194

Reported By: Freagarach
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2883
This was SVN commit r23846.
2020-07-17 10:27:11 +00:00
Imarok cbdabe4b5a Show summary graphs for teams
Fixes: #4552
Differential Revision: https://code.wildfiregames.com/D1877
This was SVN commit r23845.
2020-07-17 09:54:53 +00:00
Imarok 4f617b7c25 Add where and how to contribute to README.txt
Reviewed by: wraitii
Text by: bb
Differential Revision: https://code.wildfiregames.com/D2833
This was SVN commit r23844.
2020-07-17 09:11:38 +00:00
wraitii 70c71bff0f Allow Modifiers to affect tokens.
This adds a new mode to modifications called "tokens" which allows
clever token parsing.
Technologies, auras and modifiers in general can use this to switch out,
add or delete tokens dynamically.

Currently implemented are production and builder queue tokens.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D270
This was SVN commit r23843.
2020-07-17 08:23:45 +00:00
Imarok 370a669b84 Fix opening the summary as Gaia
Reviewed by: Angen
Fixes: #5782
Differential Revision: https://code.wildfiregames.com/D2836
This was SVN commit r23841.
2020-07-16 21:10:43 +00:00
wraitii 32615ae6be Remove the build time malus from Greek civ bonus.
The 'Hellenic Architecture' bonus for Greek civilisations increased
health and capture points slightly, but also build time.
Because it is active from the start, it ended up being a large economic
debuff that made these civilisations less competitive.

The build-time increase is removed so "Hellenic Architecture" is now a
pure bonus.

Patch by: Feldfeld
Accepted By: wraitii, borg-
Differential Revision: https://code.wildfiregames.com/D2839
This was SVN commit r23840.
2020-07-16 08:11:00 +00:00
wraitii c64fa6017c Allow Rome to build palisades.
Rome was unable to build palisades (presumably as it had unique access
to the somewhat comparable Siege Walls).
This however made Rome unable to build walls in Village Phase, and
restricting access to palisades makes little historical sense.

Patch by: Nescio
Accepted By: ValihrAnt, borg-, Lionkanzen
Differential Revision: https://code.wildfiregames.com/D2741
This was SVN commit r23839.
2020-07-15 12:23:56 +00:00
wraitii 95cc3937bd Make the Seleucid reform/traditional split affect infantry only.
Seleucid armies used cavalry alongside pikemen, making the unit
versatile.
Depending on other balancing changes, this may be revisited later.

Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2858
This was SVN commit r23838.
2020-07-15 12:19:53 +00:00
wraitii 133d163689 Tweak military structures build time and cost.
Reduces build time of most buildings (except Barracks), and standardize
costs better across civs.
Furthermore, tooltips are updated and <Identity> nodes ordered as listed
in Identity.js.

Patch by: Nescio
Accepted by: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2821
This was SVN commit r23837.
2020-07-15 12:14:13 +00:00
Stan 9eff418cb5 [gameplay-a24] Reduce the cost of the silver shield technology and increase the research time to match the other civ phase tech.
Patch by: @borg-
Reviewed by: @Nescio
Comments by: @badosu

Differential Revision: https://code.wildfiregames.com/D2867
This was SVN commit r23836.
2020-07-15 09:17:17 +00:00
Stan ad83349820 Rename maurya hero
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2795
This was SVN commit r23834.
2020-07-14 15:49:56 +00:00
Stan 150f333019 Delete duplicate kush_pyramid actor
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2813
This was SVN commit r23833.
2020-07-14 10:41:54 +00:00
wraitii 3eb03bd1e1 New Gaul team bonus: reduce blacksmith tech cost.
The Gauls were part of well-connected trade networks in ancient times.
Their exports mainly centered on slaves, mercenary, and military
equipment.
As such, a team bonus reducing blacksmith costs makes much more sense
than one reducing technology research time (particularly since the
historical justification for the existing team bonus was... thin).

Patch by: Nescio
Approved by: borg-, ValihrAnt, wraitii
Differential Revision: https://code.wildfiregames.com/D2669
This was SVN commit r23832.
2020-07-14 08:53:05 +00:00
wraitii 1f2286305d Rework PreferredClasses to target either Human or Human/Siege.
'Hack' melee units had a preference towards Siege units. This made them
awkward to use in some fights.
PreferredClasses is not intended to remove Micro from the player's hand
but to prevent units from attacking unlikely targets (e.g. ships for
land units).

As such, this reworks PreferredClasses so that:
- Ranged & Spearmen/Pikemen (which deal Pierce damage) target Human
units, against which they are reasonably effective.
- Other units target either Human or Siege units with no particular
preference (Unit+!Ship).

This further specifies the preferred classes for all base templates for
easier modification, since extending this list (ordered by priority) is
tricky.

Patch by: borg-
Reviewed By: Nescio, wraitii
Differential Revision: https://code.wildfiregames.com/D2851
This was SVN commit r23831.
2020-07-14 08:39:31 +00:00
wraitii 4bed678194 Handle 'orderone' hotkey for constructing buildings and walls
This was missing in 62f07098ea.

Based on a patch by: luiko
Also reported by: serveurix
Tested by: Freagarach
Fixes #5750

Differential Revision: https://code.wildfiregames.com/D2172
This was SVN commit r23830.
2020-07-14 08:04:48 +00:00
wraitii 2eecb0f508 Give Macedonians a champion swordsman.
This is a major buff to their anti-ram capabilities and thus to their
viability in general.

The historical background for this unit is an elite corps of Thracians
under Philip V of Macedon.

Patch by: Nescio
Approved by: borg-, badosu, wraitii
Differential Revision: https://code.wildfiregames.com/D2872
This was SVN commit r23829.
2020-07-14 07:55:36 +00:00
wraitii 4ed99d1b3d Fix missing pmp in b637fdbae9 (unit motion test map)
The PMP was not necessary so a default terrain can be used instead.

This was SVN commit r23828.
2020-07-14 07:37:09 +00:00
wraitii c1d71abe0b Tweak wonder/pyramid cost and remove healing aura from wonders.
Wonders cost food previously, which is not in line with their look or
other buildings.
Their healing aura is removed to make the slightly easier to capture.

Kushites pyramids are adjusted slightly, and the monumental architecture
tech moved to the CC to match the Persian.

Patch by: Nescio
Accepted By: borg-, Feldfeld
Differential Revision: https://code.wildfiregames.com/D2686
This was SVN commit r23824.
2020-07-12 16:03:50 +00:00
wraitii b97f1cadc5 Give Mauryan a 30% bonus to elephant build time.
Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2862
This was SVN commit r23823.
2020-07-12 09:44:38 +00:00
wraitii e4e5b6c72e Fix trailing commas in JSON following e007caf642
This was SVN commit r23822.
2020-07-12 09:36:21 +00:00
Angen 6f1d17c954 Stop failing if mod is broken and display invalid mods in downloader [Mod Io]
If one mod is not signed or broken in any other way, mod.io downloader
fails and does not display any mod.
The problem with unsigned mod is that its metadata are empty.

That means one cannot break mod io downloader with mods having invalid
data.

mark mod as invalid and display in list as disabled and display reason
instead description to not spam ugly error messages on screen as this is
not error by the game but of the moder
report failed signatures back to list of mods
fail if property is not set using strict mode when getting from js
check in js for undefined values

Allow to filter only valid mods.

Differential Revision: https://code.wildfiregames.com/D2114
Reviewed by: @Itms
Fixes: #5459

This was SVN commit r23821.
2020-07-12 09:25:03 +00:00
wraitii 01fdf01b5b Increase citizen soldier capture attack strength.
Attack strengths for citizen soldiers is increased, making it easier to
capture in the early game.
Hero capture points reduced to align them with their attack multiplier.

Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2847
This was SVN commit r23820.
2020-07-12 09:21:28 +00:00
wraitii a1e812a3ea Tweak Macedonian champ infantry to have more attack, not more armour.
Patch by; borg-

Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D2868
This was SVN commit r23819.
2020-07-12 09:17:07 +00:00
wraitii e007caf642 Move train time increase for advanced/elite to the upgrade tech.
Techs which enabled training advanced/elite mercenaries directly also
increased the train time of those units.
It is more consistent and more maintainable to increase the train time
in the advanced/elite tech.
This does not affect promoting units since those are not trained.

Also rename and use a consistent order.

Patch by: Nescio
Reviewed By: borg-, wraitii
Differential Revision: https://code.wildfiregames.com/D2865
This was SVN commit r23818.
2020-07-12 09:14:44 +00:00
s0600204 d43293f885 Skip unresearchable techs when deriving production queues in Structure Tree
Reported on the forums, the Structure Tree was displaying certain
technologies
when the chosen civ could not actually research them.

The Template Viewer was unaffected.

Reported by: Hidan
https://wildfiregames.com/forum/index.php?/topic/28491-archery-tradition-for-all-factions/

This was SVN commit r23816.
2020-07-11 19:47:19 +00:00
Itms 9f4e398585 Fix rooting mistake in CGame::ReallyStartGame, detected by Bellaz89, fixes #5776.
Differential Revision: https://code.wildfiregames.com/D2869
Accepted By: Bellaz89
This was SVN commit r23815.
2020-07-11 14:24:09 +00:00
s0600204 a4bc787ddc Don't have the Structure Tree fill up the entire screen
For those lucky enough to have screens with a high enough resolution to
display
a chosen civilisation's tree in its entirety, the Structure Tree page
now
determines the minimum space necessary to do so, and sizes itself
accordingly.
(e.g. The page no longer scales to fill the entire screen.)

For those on lower resolution screens, the page now takes up slightly
less space
vertically.

This was SVN commit r23813.
2020-07-11 02:50:32 +00:00
Stan ec3b3a9556 Fix some issues with bows noticed by Mr. Lie
Thread:
https://wildfiregames.com/forum/index.php?/topic/28481-some-animations-are-broken-gathering-and-other/page/2/&tab=comments#comment-400622

This was SVN commit r23812.
2020-07-10 17:35:59 +00:00
Stan d4b567ca85 Fix broken templates following 33042ad23d while retaining the same functionnality
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2864
This was SVN commit r23810.
2020-07-08 11:21:10 +00:00
s0600204 b2842e8021 Rewrite Structure Tree and Template Viewer to use OOP principles
Commenters: elexis, Stan, Angen
Refs.: #5387
Differential Revision: https://code.wildfiregames.com/D2734
This was SVN commit r23808.
2020-07-07 19:11:36 +00:00
vladislavbelov 365dbd91fc Fixes terrain index type (causing a warning) introduced in 1e1ce27eba.
This was SVN commit r23807.
2020-07-07 16:51:20 +00:00
wraitii a7da40ac2f Fix formations reshaping incorrectly & related issues.
Formation were reshaping in cases where they should not (such as when
the controller is waiting on members).
This made them look very odd for some orders.

This also cleans up held positions for formations somewhat.

Also:
- ed54ad3486 fixed units not facing correctly after a formation-walk.
The fix is correct, but we can actually make it slightly more
self-contained by moving everything in `leave`. Also clarify comments.
- This fixes some very broken code in 4ca448a686 in
FORMATIONMEMBER.WALKING.MovementUpdate. It never errored because
formation controllers weren't moved out of the world before.

Reviewed By: Angen
Fixes #5443

Differential Revision: https://code.wildfiregames.com/D2763
This was SVN commit r23806.
2020-07-07 10:24:58 +00:00
Stan 33042ad23d [gameplay-a24] differentiate African and Indian war elephants because of their sizes.
maur, pers, sele champion elephants +10% resource costs, training time,
health, and attack damage;
cart, kush, ptol champion elephants −10% resource costs, training time,
health, and attack damage.

Patch by: @Nescio
Accepted by: @Feldfeld, @borg-
Differential Revision: https://code.wildfiregames.com/D2861
This was SVN commit r23804.
2020-07-04 18:15:05 +00:00
Stan 586b045d09 Deprecate rotary mill, and instead introduce a special technology (town phase, workers +15% grain gather rate) for the Gauls, to reflect the fact they invented a harvesting machine in the Iron Age.
Patch by: @Nescio
Accepted by: @scythetwirler, @borg-
This was SVN commit r23803.
2020-07-04 14:11:17 +00:00
Angen 5e57e35c0a [gameplay-a24] Allow to train mercenaries from embassy by any civilisation
As a result, any player that captures an embassy (including Blemmy camp
or Nuba village) can train these mercenaries there, while preventing
them from building structures they shouldn't have access to.

Differential Revision: https://code.wildfiregames.com/D2536
Patch by: @Nescio
Reviewed by: @Angen
Agreed by: @ValihrAnt, @borg-
This was SVN commit r23802.
2020-07-04 13:10:27 +00:00
Angen a7894f05b8 [gameplay-a24] Lower the repeat rate of spear cavalry
Lower repeat rate of spear cavalry so it does not look like attacking in
slow motion and lower attack damage as well to compensate speeding up
attack.

Differential Revision: https://code.wildfiregames.com/D1365
Patch by: @temple
Reviewed by: @wraitii, @Angen
Agreed by: @ValihrAnt, @Lionkanzen
Comments by: @badosu
This was SVN commit r23801.
2020-07-04 12:43:55 +00:00
Stan 8e19745bba Decrease penalty -50% to -30% when promoting to advanced and elite.
Decrease the health gain to 10%. (20% health + 1 armour);
Increase the crush damage for axemen as well (Previously they only got a
penalty)

Patch by: @borg-
Reviewed by: @Nescio, @Feldfeld, @badosu
Differential Revision: https://code.wildfiregames.com/D2792
This was SVN commit r23800.
2020-07-04 11:05:05 +00:00
Stan 98285aa429 Replace various equivalent phrases (show/hide, enable/disable, open/close, hide/show) with the word “toggle”,
Replace two slashes (“/”) with “or” and another with “and” to reduce
ambiguity
Replace “Enter/Return” with “Enter (Return)”

Patch by: @Nescio
Reviewed by: @Gallaecio, @Stan
Differential Revision: https://code.wildfiregames.com/D2570
This was SVN commit r23799.
2020-07-04 10:30:58 +00:00
Stan 55dc5ed987 Increase cost of "upgrade mercenaries rank" tech to make it more like the other armor techs
Authored by: @borg,
Reviewed by: @badosu, @Nescio, @FeldFeld
Differential Revision: https://code.wildfiregames.com/D2835
This was SVN commit r23798.
2020-07-04 10:14:30 +00:00
Itms 56d3aa40fe Fix conversion of UTF8 strings between the scripts and the engine.
SpiderMonkey uses UTF16 internally, and only provides APIs for that
encoding, so stop hacking UTF8 strings: properly convert them to and
from UTF16 when passing them through SM.

Patch By: wraitii
Differential Revision: https://code.wildfiregames.com/D2838
This was SVN commit r23795.
2020-06-30 10:46:06 +00:00
Itms dc65912043 Fix building on GCC 10, fixes #5709, #5756.
Patch By: pcpa and wraitii
Tested By: Nescio, andy5995 and others
Differential Revision: https://code.wildfiregames.com/D2745
This was SVN commit r23794.
2020-06-30 10:24:00 +00:00
wraitii 108efc9291 Allow building Kushite mercenary camps in neutral territory.
This gives Kushites more interesting gameplay options, and is consistant
with other mercenary camps.
Kushite mercenaries lived outside of the core Kushite territory, thus
giving a historical ground to this change.


Accepted by: ValihrAnt, borg-, scythetwirler, Angen, badosu, sundiata
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D2534
This was SVN commit r23793.
2020-06-28 09:55:09 +00:00
Stan c8402563ce Add garrison flags to all the merchant ships.
Refs: #4581

This was SVN commit r23792.
2020-06-26 23:08:12 +00:00
Imarok 0252ec16d8 Remove inappropriate quote about women
This is based on this PR: https://github.com/0ad/0ad/pull/28.

Reviewed by: Stan
Differential Revision: https://code.wildfiregames.com/D2832
This was SVN commit r23790.
2020-06-24 21:15:46 +00:00
bb e188066006 Absorb duplicated summary tab code to the tab_buttons gui
refs 8ae67ed15f/9ae7c4d810
Comments By: elexis, Stan, Freagarach
Tested By: Freagarach
Reviewed By: Imarok
Differential Revision: D1206
This was SVN commit r23789.
2020-06-23 20:15:36 +00:00
Stan cdc2f4cf57 Fix an issue with checkrefs.pl introduced in c04a1ebac3/https://code.wildfiregames.com/D2533. Checkrefs should support duplicated tags
Reported by: @Itms, checkrefs.pl
This was SVN commit r23788.
2020-06-23 18:06:32 +00:00
Itms aabab15324 Detect the need for libexecinfo in premake. This is mostly useful for musl Linux.
Patch By: nephele
Differential Revision: https://code.wildfiregames.com/D2671
This was SVN commit r23787.
2020-06-23 15:06:57 +00:00
Itms b437af833d Stop downloading boost from sourceforge on macOS, as it is not the official source anymore, and it is not very reliable for big files.
Reviewed By: Krinkle, wraitii
Differential Revision: https://code.wildfiregames.com/D2766
This was SVN commit r23786.
2020-06-23 14:42:54 +00:00
bb 9680d08b96 Remove unused bonuses schema from deathDamage
refs 16b452cf91

Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2831
This was SVN commit r23785.
2020-06-22 20:12:10 +00:00
Imarok 853e8c0f1e CVector2D: Fix members may not be initialized warnings
Differential Revision: https://code.wildfiregames.com/D2825
This was SVN commit r23784.
2020-06-21 18:21:31 +00:00
bb bdadb2080a Cleanup summary selection
Fixes some issues from 8ae67ed15f
Reviewed By: Freagarach
Noticed By: elexis
Differential Revision: https://code.wildfiregames.com/D1205
This was SVN commit r23783.
2020-06-20 21:26:20 +00:00
Stan 332b997ca6 Make javelineers easier to catch by cavalry, by reducing their speed slightly
Reviewed by: @borg-, @scythetwirler, @ValhirAnt
Differential Revision: https://code.wildfiregames.com/D2628
This was SVN commit r23782.
2020-06-19 06:31:50 +00:00
Stan c04a1ebac3 Remove the briton kennel as it's not historically correct.
War dogs are limited to a total of 20 instead of a five kennels times
ten dogs each, to compensate for the fact they no longer have special
requirements.

Patch by: @Nescio
Reviewed by: @borg-, @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/25620-kennel-issues/&tab=comments#comment-372159

Differential Revision: https://code.wildfiregames.com/D2533
This was SVN commit r23781.
2020-06-19 06:28:39 +00:00
s0600204 dd5c7edea3 Introduce axeman templates
Introduces axeman parent templates, used to differentiate axemen from
swordsmen
(which they had been "under the hood" up until now), and update entity
templates
and maps where applicable.

Artwork (actors, icons) is not touched here - see D2688 for that.


Patch by: Nescio
Reviewed By: s0600204
Differential Revision: https://code.wildfiregames.com/D1355
This was SVN commit r23780.
2020-06-18 21:36:16 +00:00
bb 1f68e4d740 De-uglyfy introductory tutorial's Launchattack function
Store components when used several times
Check all components for existance when used
Use ProcessCommand instead of injection order directly in unitAI

This was SVN commit r23779.
2020-06-18 16:24:59 +00:00
Stan 2101556946 Fix flying shields reported by Mr. Lie,
Thread:
https://wildfiregames.com/forum/index.php?/topic/28361-something-curious-with-actor-celtsmerchant_ship/&tab=comments#comment-399067

This was SVN commit r23778.
2020-06-15 20:04:23 +00:00
wraitii ec4f51d928 Fix --without-pch build following ffd2219200
Differential Revision: https://code.wildfiregames.com/D2819
This was SVN commit r23775.
2020-06-14 20:51:21 +00:00
wraitii 6b2b071ad5 Move LOS to a los helper header and cleanup Grid.h includes.
Changing Grid.h should recompile faster, as it is now included in fewer
TUs.

Differential Revision: https://code.wildfiregames.com/D2784
This was SVN commit r23774.
2020-06-14 20:39:03 +00:00
wraitii ffd2219200 Don't overwrite JS error reporting by calling JS_ReportError.
Upstream spidermonkey supports JSNative error reporting by returning an
explicit failure code. This provides a full stacktrace. Calling
JS_ReportError, removed upstream, removes that stacktrace.

Instead, we should simply LOGERROR.

Based on a patch by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2627
This was SVN commit r23773.
2020-06-14 10:34:49 +00:00
wraitii e8b3fe81cc build-osx-libs: Update GnuTLS to 3.6.13 (unbreak macOS 10.15)
This includes a workaround that should be removed when it is fixed
upstream (LDFLAGS=).
It disables guile support, since we do not need it and it fails to
compile too.

Patch by: Krinkle
Reviewed By: wraitii
Fixes #5729

Differential Revision: https://code.wildfiregames.com/D2716
This was SVN commit r23772.
2020-06-14 10:30:14 +00:00
wraitii 4b1a4ef4cf Rework ScriptInterface EnumeratePropertyNames to support non-enumerable properties.
This lets it support the JSClass syntax, introduced for components in
5fb88172a2/D2492, which required a workaround before.
As cleanup, remove the prefix logic which was too specific to be in
ScriptInterface, and use an upstream-compatible API that also does more
of what we want.

Based on a patch by: elexis
Differential Revision: https://code.wildfiregames.com/D2644
This was SVN commit r23771.
2020-06-14 09:49:32 +00:00
wraitii bea7a65389 Delete unused technologies.
Many were 'pair' technologies, originally removed from the game in
13b229d503.

Patch by: Nescio
Reviewed by: wraitii
Fixes #3800

Differential Revision: https://code.wildfiregames.com/D1775
This was SVN commit r23770.
2020-06-14 09:08:53 +00:00
wraitii 939002f0dc RangeManager: Grid for 2D array, enum cleanups.
Range manager has several `std::vector` for fixed-size arrays and 2D
grids. By using proper data structures, the code readability is
improved.
This also moves around the LosVisibility enum.

Comments by: Stan`, nani
Differential Revision: https://code.wildfiregames.com/D2770
This was SVN commit r23769.
2020-06-13 09:05:40 +00:00
vladislavbelov 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
vladislavbelov 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
vladislavbelov 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
wraitii 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
Stan 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
Stan 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
wraitii 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
vladislavbelov 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
vladislavbelov 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
Stan 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
Stan 8339c6da79 Fix heroes not attacking on elephants
This was SVN commit r23740.
2020-06-05 21:28:18 +00:00
Stan 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
wraitii 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
wraitii 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
Stan 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
wraitii 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
wraitii 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
wraitii 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
Stan 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
Stan 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
Imarok 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
wraitii 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
Stan 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
wraitii 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
Stan 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
wraitii 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
wraitii 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
wraitii 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
wraitii 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
Stan 131590927f Remove the old, broken colosseum and the version that was made for Delenda Est introduced in 83680b0dee which was completely unused and did not provide actors. They belong to 0 A.D: Empire Besieged.
This was SVN commit r23707.
2020-05-29 14:11:26 +00:00
Stan ebd9786268 Add missing cpp files in last commit refs D2503
This was SVN commit r23704.
2020-05-28 18:18:00 +00:00
Stan cdade0af30 Reorganize selection textures by size instead of by shapes. Optimize templates to reduce duplication
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2503
This was SVN commit r23703.
2020-05-28 18:05:05 +00:00
bb 5cfce692e7 Implement keyDown event
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.
2020-05-26 21:47:03 +00:00
wraitii 892f97743b Fix some cases of units getting stuck.
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.
2020-05-25 20:13:35 +00:00
wraitii d68b3bb098 Do not send Attacked message on entities that have no attack effects receiver
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.
2020-05-25 19:14:46 +00:00
Stan 28f591ad1e Add slaughter animations to most units.
Discussed briefly with @fatherbushido
Thread:
https://wildfiregames.com/forum/index.php?/topic/27974-slaughter-attack-in-actors-templates/&tab=comments#comment-394851

Differential Revision: https://code.wildfiregames.com/D2708
This was SVN commit r23697.
2020-05-25 10:07:20 +00:00
Angen 9f6d44feb8 Remove some variables from serialisation and update this.animations name to reflect what it actually holds [Formations.js]
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.
2020-05-23 13:03:34 +00:00
Angen 21e3eedd2f Fix computation of clusters and var->let
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/D2761
Fixes: #5761

This was SVN commit r23693.
2020-05-23 12:53:11 +00:00
Angen c8e6c05334 Fix gcc warning reported by Imarok after 204e17206b
Introduced in 204e17206b.
Gcc gives warning about missing parenthesis so this patch is adding
them, not changing result of expression.
Fix proposed by Imarok in P206 after report on irc
http://irclogs.wildfiregames.com/2020-05/2020-05-22-QuakeNet-%230ad-dev.log.

Differential Revision: https://code.wildfiregames.com/D2762
Reviewed by: elexis
This was SVN commit r23692.
2020-05-23 12:21:49 +00:00
Angen 204e17206b Update plural_forms.cpp by tinygettext to reflect needs of translators
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.
2020-05-22 20:06:40 +00:00
s0600204 9034335d22 Correct WallPiece schema help comments
(Fairly sure I've got them right this time.)

Refs: #2944, D900, da35f63279

This was SVN commit r23687.
2020-05-21 19:11:00 +00:00
Itms 6e6c401ee8 Check the library version instead of the mtime of the already-built guard file in build-osx-libs.sh
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.
2020-05-21 15:28:38 +00:00
elexis 57636140b5 Fix typo (certifiacte -> certificate) imported from gloox in 0e2adda813, reported by pilino1234 on transifex, relayed via Angen on Phabricator.
This was SVN commit r23685.
2020-05-21 10:15:26 +00:00
s0600204 da35f63279 Add help comments to WallPiece component schema
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.
2020-05-21 04:34:13 +00:00
bb b8be438472 Invert a case in 585f9e76a5
This was SVN commit r23683.
2020-05-20 19:47:40 +00:00
bb 585f9e76a5 Create unitAI function to match a target's speed.
Patch By: Freagarach
Differential Revision: D2731
This was SVN commit r23682.
2020-05-20 19:39:36 +00:00
wraitii c1ddc0c4b9 Internationalise Damage Types and Status Effects using (optional) JSON files.
.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.
2020-05-20 17:26:37 +00:00
wraitii 441f17cbeb Fix EntitiesNearPoint range query
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.
2020-05-20 17:03:33 +00:00
Angen d113a94d4d Add missing .(dot) in tooltip in maur_defense_tower.xml
Reported by GunChleoc on transifex.
Introduced in 14bd613288

This was SVN commit r23679.
2020-05-20 16:50:40 +00:00
bb 3f3a699b9e Allow timers to update their interval.
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2666
This was SVN commit r23678.
2020-05-19 15:42:57 +00:00
Itms c9d9b7be83 macOS build fixes and Jenkins pipelines.
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.
2020-05-17 14:12:53 +00:00
Itms 782a77f106 Allow using system premake5 (with the flag --with-system-premake5) when running update-workspaces.sh, refs #1518.
Differential Revision: https://code.wildfiregames.com/D2519
This was SVN commit r23675.
2020-05-17 11:41:58 +00:00
Stan 4eac7b6958 Rename the Seleucid citizen pikeman to ϕαλαγγίτης phalangitēs / phalangite
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.
2020-05-16 21:14:52 +00:00
Stan 5f38609350 Cleanup Timer.js
Reviewed by: @bb
Comments by: @elexis, @Freagarach, @Polakrity
Differential Revision: https://code.wildfiregames.com/D1776
This was SVN commit r23673.
2020-05-16 17:41:07 +00:00
wackyserious 2f5c4999fe Add missing file reported in: https://wildfiregames.com/forum/index.php?/topic/28160-error-after-revision-23670/
This was SVN commit r23672.
2020-05-16 06:23:50 +00:00
s0600204 40f77d0f0f Rename civinfo page from "History" to "Civilization Overview"
Patch by: Nescio
Accepted by: s0600204
Differential Revision: https://code.wildfiregames.com/D2722
This was SVN commit r23671.
2020-05-15 21:27:35 +00:00
wackyserious 77f901266b Texture Update: Arab Javelineer and Nabatean Camel Archer
Thread:
https://wildfiregames.com/forum/index.php?/topic/25200-committed-arab-javelineer-and-nabatean-archer-unit-texture/

Reviewed by: Sundiata, Alexandermb and Nescio
This was SVN commit r23670.
2020-05-15 10:19:18 +00:00
wackyserious d6dcb558ca Texture Update: Seleucid Thorakites (by wowgetoffyourcellphone)
Thread:
https://wildfiregames.com/forum/index.php?/topic/28150-committed-seleucid-thorakites-unit-texture/

Reviewed by: Stan, Lion.kanzen and wackyserious
This was SVN commit r23669.
2020-05-15 09:25:42 +00:00
wackyserious f864aa5a15 Texture Update: New (and updated) Persian Unit Textures
-Sardian auxillary
-Sogdian archer (basic)
-Hyrcanian cavalry

Thread:
https://wildfiregames.com/forum/index.php?/topic/23634-committed-persian-unit-texture-upgrade/&do=findComment&comment=390782

Feedback by: Nescio
This was SVN commit r23668.
2020-05-15 08:51:22 +00:00
Alexandermb 1491837208 New macedonian aspis.
New roster and cleaner gorgon shield for spartan champion.

Reflective metal for basic athen shields.

This was SVN commit r23666.
2020-05-14 20:13:51 +00:00
bb b109a127e5 Add XPtrickle test after d392472d44, cleanup promotion test.
Patch By: Freagarach
Differentital Revision: https://code.wildfiregames.com/D2670

This was SVN commit r23665.
2020-05-14 15:07:33 +00:00
Alexandermb 9953e2ca85 Upload hele_crest_hair_06.xml actor wich wasn't uploaded on latest committ and replace hele_crest_thracian_hair_p3.xml actor on hair slot.
This was SVN commit r23664.
2020-05-13 14:01:32 +00:00
Alexandermb f6a77a9d7d Fix Seleucid thracian helmets crest to new one and delete unused crest's.
This was SVN commit r23663.
2020-05-12 20:40:09 +00:00
Alexandermb baf5af5a23 Seleucid shields cleaning and new thespian variants.
This was SVN commit r23662.
2020-05-12 19:32:58 +00:00
Stan f2d30ed94d Rename test_resources.js to test_Resources.js for consistency.
Reviewed by: @bb
Differential Revision: https://code.wildfiregames.com/D2730
This was SVN commit r23661.
2020-05-12 17:22:44 +00:00
Stan c08016d950 Optimize GetIdentityClasses in Templates.js
Add unit tests.

Reviewed by: @bb
Differential Revision: https://code.wildfiregames.com/D2404
This was SVN commit r23660.
2020-05-12 15:24:59 +00:00
Alexandermb b61b21afb7 Spartan Dokana shield.
Resize of a helmet/cart_helmet_01_bronze.png

Fix aspis_athen_m.xml variant name

This was SVN commit r23659.
2020-05-11 19:13:46 +00:00
Alexandermb de54570b12 Fix error on aspis_back mesh and delete unused actors
This was SVN commit r23658.
2020-05-11 17:14:35 +00:00
Stan d2d2f1ad2c Fix linting errors in UnitMotionFlying.
Reviewed by: @bb
Comments by: @Angen
Differential Revision: https://code.wildfiregames.com/D2457
This was SVN commit r23657.
2020-05-11 08:19:23 +00:00
bb 74459adfb0 Move canheal function from unitAI to heal component.
Add tests for this function

Patch mostly By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2403
This was SVN commit r23654.
2020-05-10 21:54:39 +00:00
Imarok 20ea4b1329 Enable preSelectedi actions on the minimap
Quickly tested by: Stan
Differential Revision: https://code.wildfiregames.com/D2728
This was SVN commit r23653.
2020-05-10 14:22:39 +00:00
Imarok 1ed64439ea IGUIObject ScriptEventi: optional return value for signalling if the event has been handled
Comments by: badosu, elexis
Differential Revision: https://code.wildfiregames.com/D2727
This was SVN commit r23652.
2020-05-10 14:01:00 +00:00
Imarok 8e916489d6 Allow "orderone"-hotkey for preselected actions.
Patch By: Freagarach
Refs #5750
Differential Revision: https://code.wildfiregames.com/D2729
This was SVN commit r23651.
2020-05-10 11:11:37 +00:00
Alexandermb 70dfac10ff Rename Athen lambda to Athen Alpha Following @wowgetoffyourcellphone suggestion for consistency.
Replace temporary quinquereme shields with carthage aspis while a shield
texture package is done for better performance.

This was SVN commit r23650.
2020-05-09 20:50:13 +00:00
Alexandermb 839af11abc Remove unused carthage shields.
This was SVN commit r23649.
2020-05-09 18:51:15 +00:00
Alexandermb 6a9fd32754 More unused actors cleaning and some corrections following last committ.
This was SVN commit r23648.
2020-05-09 18:47:17 +00:00
Alexandermb a6401d930b Replace themistocles shields variant to the Owl as it was before (Wrong variant being used, pegasus still waiting for cleaning till the pattern is found)
This was SVN commit r23647.
2020-05-09 18:28:21 +00:00
Alexandermb b9bb46e006 Shields texture folder cleaning and shield actors being unused due to new ones.
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.
2020-05-09 17:25:56 +00:00
Alexandermb 70cf017fe6 Correction of 4 aspis with the Lambda or "A" letter with a modern representation instead of a historically accurate one.
Commented by @Nescio

This was SVN commit r23645.
2020-05-09 15:45:41 +00:00
Stan da0f87458b Fix the build script failing to get ICU.
Use the github mirror instead,
Update from 59.1 to 59.2

Accepted by: @Itms
Patch by: @Krinkle
Differential Revision: https://code.wildfiregames.com/D2717
This was SVN commit r23644.
2020-05-09 10:34:34 +00:00
FeXoR d995dcebfa Reduce areas players can't place buildings on due to high inclination/bumpiness on random map Wild Lake.
Reported by OptimusShepard at https://code.wildfiregames.com/D1624

Tested by: FeXoR
This was SVN commit r23642.
2020-05-08 18:14:44 +00:00
vladislavbelov 1e1ce27eba Adds offsets to the terrain resize function and adds comments how the resizing works.
Original Patch By: Clockwork-Muse
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2724
This was SVN commit r23639.
2020-05-07 21:46:17 +00:00
Stan 5159fe3fa4 Add some new selection textures by Nescio
Refs: https://code.wildfiregames.com/D2503

This was SVN commit r23638.
2020-05-07 18:43:08 +00:00
Angen 093285bf35 Do not stack fleeing orders.
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.
2020-05-07 17:29:35 +00:00
Stan 5fcade9ffd Improved selection shapes by @Nescio.
Refs: https://code.wildfiregames.com/D2503

This was SVN commit r23636.
2020-05-07 17:22:59 +00:00
Angen d52328f520 Fix typo in 118ebc810c
This was SVN commit r23635.
2020-05-07 17:03:44 +00:00
Angen 990e3163d8 Do not store empty Garrison tag in map xml files after 8bfb449375
Differential Revision: https://code.wildfiregames.com/D2690
Patch by: Freagarach
Reported on forum:
https://wildfiregames.com/forum/index.php?/topic/27867-tag-in-the-map-xml-file/

8bfb449375 introduced Garrison tag to the xml map files.
In case GarrisonHolder was present, but held no entities, empty tag was
written. This is adding check for emptyness so that behaviour is
prevented.

This was SVN commit r23634.
2020-05-07 16:57:45 +00:00
Angen 118ebc810c Fix Capture points not initialised properly.
Differential Revision: https://code.wildfiregames.com/D2706
Fixes: #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.
2020-05-07 16:46:03 +00:00
Stan 027659b7f8 Fix a233b04c57 commit unintentional removal in unit_actions.js.
Noticed by: @Freagarach
This was SVN commit r23632.
2020-05-07 16:05:41 +00:00
Stan a233b04c57 New streamlined icons for the GUI. Add a back to work icon.
Fixes #2296
Fixes #4019
Thread:
https://wildfiregames.com/forum/index.php?/topic/27738-experimenting-with-icons/&tab=comments#comment-393054

This was SVN commit r23631.
2020-05-07 15:37:52 +00:00
Stan 423b3cbcaa Allow specific garrison points to receive only specific units, for instance catapults on ships, or having both visible garrison points for fortresses and garrisonning elephants.
Reviewed by: @Freagarach,
Comments by: @elexis, @Angen
Fixes #3488

This was SVN commit r23630.
2020-05-07 15:03:18 +00:00
Alexandermb 20c0f986b3 Adjust some animations of the elephant with a blender addon to make it look more smooth.
Fixed unsync on aspis cloak for swordsman due to idle animations being
24 FPS while the shield cloaks was 30 FPS

This was SVN commit r23628.
2020-05-05 19:06:54 +00:00
Alexandermb fd4e23ce29 Fix incorrect stretching on the aspis cloak while capturing and walking (hoplite)
This was SVN commit r23627.
2020-05-05 14:28:13 +00:00
Alexandermb 08c432d126 Fix missing stuff from the latest committ and delete unused variants.
@Stan Checkref

This was SVN commit r23626.
2020-05-05 13:44:22 +00:00
vladislavbelov a4341acaa6 Fixes macOS builds after 76909984b2 because of removed header.
This was SVN commit r23625.
2020-05-05 11:31:19 +00:00
vladislavbelov 76909984b2 Removes obsolete clipboard, replaces by platform-agnostic SDL2`s APIs. Refs D2476.
Patch By: linkmauve
Tested By: bb, elexis, Stan
This was SVN commit r23624.
2020-05-05 11:18:00 +00:00
Alexandermb f558dbbd6f Aspis update V2
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.
2020-05-05 03:02:16 +00:00
Stan 7c218ab079 New gaul wonder, pattern by @GunChleoc & Lion.Kanzen, statue by @Basshunter, template adjustements by @Nescio, historical resources by @Genava55
This was SVN commit r23621.
2020-05-03 19:35:50 +00:00
Angen b7db808b1f Disable attack as formation for anti_cavalry.xml following ac3c02b4d4 fixing 06e01ef944
Range check for members attacking as formation is broken. For more
details see
D2709 04aba0e41a and #4951.

This was SVN commit r23620.
2020-05-03 12:05:52 +00:00
Imarok 9306d84905 Show correct action cursor over minimap
Refs: #1847
Differential Revision: https://code.wildfiregames.com/D2718
This was SVN commit r23619.
2020-05-03 10:32:33 +00:00
vladislavbelov 2e6aecb210 Fixes FXAA for maps with default effects, FXAA was introduced in 113b1c49b9.
Tested By: OptimusShepard, Stan
Differential Revision: https://code.wildfiregames.com/D2712
This was SVN commit r23617.
2020-05-02 22:34:29 +00:00
Imarok 3d306f4760 Minimap → MiniMap and consistent return
Previous version reviewed by: Nescio
Differential Revision: https://code.wildfiregames.com/D2719
This was SVN commit r23616.
2020-05-02 21:04:19 +00:00
bb 3e315c0ef0 Tweak 2 heights missed in 934025b2fb
This was SVN commit r23615.
2020-05-02 17:02:46 +00:00
bb 8158fe7b23 Show 2 decimals for gather rates in gui.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2594
Extremely far away ref: #4099

This was SVN commit r23614.
2020-05-01 16:39:48 +00:00
Angen 23111ab427 Actually do not use sorting order for forced columnar formation
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.
2020-05-01 09:44:14 +00:00
bb 115215c627 Remove useless food.meat from some animal templates, since the parent already has it.
Patch By: Nescio
Differential Revision: D2714
This was SVN commit r23610.
2020-04-29 21:42:38 +00:00
bb 934025b2fb Resize walls.
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.
2020-04-29 21:21:49 +00:00
vladislavbelov 2489e57d58 Uses EPS to compare Camera quads after 50f70b7be3.
We don't need exact precision in that kind of calculations. Since we use
not fixed floating point numbers and use them only for visual stuff.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2713
This was SVN commit r23608.
2020-04-29 18:41:53 +00:00
bb 7357656df2 Anchor correct templates.
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.
2020-04-28 18:35:40 +00:00
vladislavbelov e0b183a54a Fixes FXAA on some platforms with broken GL drivers.
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.
2020-04-27 00:05:27 +00:00
Alexandermb bc4373b738 Scale up hippopotamus
This was SVN commit r23605.
2020-04-26 13:56:23 +00:00
Stan 789117ef17 Fix the hippopotamus template in 1ca8c78014. For some reason I forgot to apply it on mine.
Patch by: @Nescio
This was SVN commit r23604.
2020-04-26 06:45:21 +00:00
Stan 1ca8c78014 Hippopotamus model by @Micket, animations by @Alexandermb, textures by @Stan based on CC-BY-SA textures, see credits and thread for links.
Fixes: #1969

Comments by: @Nescio, @wowgetoffyourcellphone.
This was SVN commit r23603.
2020-04-25 21:34:24 +00:00
Angen 98d3b6cca0 Cache keys of g_UnitActions sorted instead of computing it every tick.
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.
2020-04-25 18:07:53 +00:00
bb 98098c821c Make units really remain if they have the remain death type. Let hunt have corpse deathtype, which creates the resource.
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2656
This was SVN commit r23601.
2020-04-25 16:41:05 +00:00
elexis ebf0591a8f Skip and warn about globalscripts and random map tests following 077c4f2576 and 0a6db43c83 when testing without public mod present or if the respective folders don't exist.
Differential Revision: https://code.wildfiregames.com/D2645
Reported By: ricotz
Reviewed By: Angen
Comments By: Stan, Freagarach
This was SVN commit r23598.
2020-04-23 12:06:56 +00:00
Alexandermb 9686ec1a33 Elephant new attacking melee animations And Infant elephant animations.
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.
2020-04-22 22:29:13 +00:00
Angen 4eda561d34 [PetraAI] - Only try to subtract resource gift from "waitingfortribute" if gift contains required resource.
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.
2020-04-22 18:19:38 +00:00
Angen 173d05588a Fix more cape attack animations
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.
2020-04-22 18:02:17 +00:00
Stan ccc34ecfb1 Improve the gaul tile normal map.
This was SVN commit r23593.
2020-04-21 21:51:37 +00:00
Stan 0ad79096bd Add a C++ interface for CCmpAttack.
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 af2abb8cbf
Fixes: #5129
Reviewed by: @Angen
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D2464
This was SVN commit r23592.
2020-04-21 21:44:05 +00:00
Stan 2c1f1ebe31 Fix a typo in variants that caused broken animation in the actor viewer with the champion iberian cavalry (The unit would not fallback to idle)
Introduced by 61b8a32ad5

Thread:
https://wildfiregames.com/forum/index.php?/topic/27969-iberian-champion-cavalry-actor-viewer-atlas/&tab=comments#comment-394522

This was SVN commit r23591.
2020-04-21 12:42:13 +00:00
Imarok ff7ab2fa8f Revert 0916ffbbb1
Summary: Having a mouse event and a hotkey for the same hardware key
turned out to be bad. If the mouse is above a gui element that handles
the middle mouse event and the middle mouse is released, this event will
be consumed by the gui handler of this gui element. Therefore the hotkey
handler does not know that the key was released. If we change that
behaviour typing in input fields would trigger hotkeys. So this seems
unsolvable without adding special handling for the middle mouse case,
which would be ugly.


Fixes: #5695

Differential Revision: https://code.wildfiregames.com/D2700
This was SVN commit r23589.
2020-04-19 12:29:40 +00:00
Angen 3ad1e47e7e Fix typo in startingStrategy.js
This was SVN commit r23588.
2020-04-19 12:07:26 +00:00
Angen c47496cf18 Cleanup ResearchTechnology function
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.
2020-04-15 21:26:25 +00:00
Stan 676bc42647 Fix issues with capes reported by @wowgetoffyourcellphone and @hidan
This was SVN commit r23586.
2020-04-15 11:57:04 +00:00
Angen 3d5b766687 Syntax cleanup of GuiInterface and test.
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.
2020-04-13 07:47:55 +00:00
Angen ff74a26865 Fix handling events with undefined message in _petrabot Serialization [Petra]
Check for undefined messages when Serializing events.

Differential Revision: https://code.wildfiregames.com/D2695
Reported by: DangerousI (
https://wildfiregames.com/forum/index.php?/topic/24727-javascript-error-petrabot-typeerror/)
Reviewed by: Freagarach
Tested by: gameboy
Fixes: #5282

This was SVN commit r23583.
2020-04-12 13:26:11 +00:00
Angen 46a9160d12 Use formation controller as target when formation reaches another formation
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.
2020-04-12 10:37:41 +00:00
Angen 448592b3c5 Colorize username in chat when user changes ready status or leaves match
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.
2020-04-12 10:19:20 +00:00
Angen 9a1052a93c [gameplay-a24] Structure selection groups
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.
2020-04-12 10:09:03 +00:00
Angen ded0598950 [gameplay-a24] give worker elephants an aura
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.
2020-04-12 09:58:48 +00:00
Stan e76742bb77 Improved icons by @wowgetoffyourcellphone.
Remove trailing zeroes.
Rename fauna_bear to fauna_bear_brown for consistency.
Delete a unused icon.

This was SVN commit r23578.
2020-04-11 23:34:37 +00:00
Stan 3d29f9ab66 Add missing foundation for the mausoleum.xml introduced in 2bf78288f4:
This was SVN commit r23577.
2020-04-11 23:03:10 +00:00
Stan f21bf3565e Fix incorrect animation for viridomarus
Discussed with: @Alexandermb

This was SVN commit r23576.
2020-04-11 16:32:48 +00:00
Stan 2bf78288f4 Add the mausoleum at Halicarnassus to the game as an eyecandy building.
Thread:
https://wildfiregames.com/forum/index.php?/topic/20820-macedonian-wonder/page/2/
Feedback by: @wowgetoffyourcellphone, @Nescio
This was SVN commit r23575.
2020-04-11 13:34:15 +00:00
Alexandermb 693a2dcd90 Adjust the UV mapping of the "elephant_african_forest.dae" Mesh
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.
2020-04-10 15:39:49 +00:00
Stan ee033b6268 Rename the Carthaginian “mausoleum” to “cenotaph”.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2694
This was SVN commit r23572.
2020-04-08 13:45:58 +00:00
Angen 8354d511dc Add formation CheckTarget-/MoveToTargetRange-functions.
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.
2020-04-07 17:35:25 +00:00
Angen 3bcc5ab0ab Selection groups for support units
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.
2020-04-07 17:28:10 +00:00
vladislavbelov accf7ade37 Add thread names on Linux (implements debug_SetThreadName), also add the thread name of the UPnP thread.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2479
This was SVN commit r23568.
2020-04-06 20:20:27 +00:00
Angen 36ea0b14cd React to target death properly when chasing
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.
2020-04-03 18:08:45 +00:00
Angen c968154934 Explicitly return "undefined" when requesting Splash data in Attack.js
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.
2020-04-01 18:17:48 +00:00
Itms 32a105d6f8 Update cppformat from v0.11.0 to v1.1.0, fixes #5646, refs #3190.
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.
2020-04-01 07:29:33 +00:00
Stan 5a4a935e3b Fix missing <group> tag in 36f9648ba7
Noticed by: @Angen
This was SVN commit r23560.
2020-03-27 20:32:00 +00:00
Angen 54f9848ad7 [gameplay-a24] Standardize structure loot to 20%
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.
2020-03-27 20:14:22 +00:00
Stan 36f9648ba7 Remove deprecated variants from Brit structures actors.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2633
This was SVN commit r23558.
2020-03-27 20:03:36 +00:00
Angen d8ddfd73b4 Remove unnecessary arguments in Pack.js
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.
2020-03-27 20:00:39 +00:00
Angen 6cfb4e5df8 Standardizes formating style of aura json files
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.
2020-03-27 19:54:53 +00:00
Stan 5063adb30f Move Persian cavalry to the persian folder.
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.
2020-03-27 08:29:39 +00:00
Stan 7d6238692c Move iberian cavalry swordsman actors to the iberian folder.
Patch by: @Nescio
Accepted by: @Alexandermb, @Stan
Differential Revision:  https://code.wildfiregames.com/D2636
This was SVN commit r23552.
2020-03-25 23:05:50 +00:00
Alexandermb 6c0f2ac579 Adjust helmet mesh to avoid clipping and reduce unnecesary vertex.
Added double face's on cheecks due to helmet shape for avoid
transparency.

This was SVN commit r23551.
2020-03-25 19:37:40 +00:00
Alexandermb 37c59909dc Fix some issues mentioned by @Nescio in the next thread:
https://wildfiregames.com/forum/index.php?/topic/27756-unit-actor-mistakes/&tab=comments#comment-393370

This was SVN commit r23550.
2020-03-25 19:36:52 +00:00
Stan 4757d0bbe0 Use chariot unit instead of foot soldier for Amanirenas
Patch by: @Nescio
Reviewed by: @Stockfish0ad, ValihrAnt
Suggested by: @Sundiata
Thread:
https://wildfiregames.com/forum/index.php?/topic/21602-the-kingdom-of-kush-a-proper-introduction-illustrated/page/37/&tab=comments#comment-392079

Differential Revision: https://code.wildfiregames.com/D2622
This was SVN commit r23549.
2020-03-25 15:50:54 +00:00
Stan 2725279bf9 Display Civic Center before houses
Patch by: @Nescio
Reviewed by: @ValihrAnt, @Stockfish0ad
Differential Revision: https://code.wildfiregames.com/D2580
This was SVN commit r23548.
2020-03-25 11:42:45 +00:00
Angen c13faea0f3 [gameplay-a24] Reduce Blemmye and Nuba camp building time
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.
2020-03-23 18:49:15 +00:00
Alexandermb 99b2f4ebfd Fix of trader, catafalque and packed siege engines horses being unsync with horse assets.
This was SVN commit r23545.
2020-03-22 21:25:31 +00:00
Stan 5a9fd3e7eb Enable archery tradition for kush. It is historically correct and will buff Kushites a little bit.
Patch by: @Nescio
Reviewed by: @Feldfeld
Differential Revision: https://code.wildfiregames.com/D2022
This was SVN commit r23544.
2020-03-22 09:56:54 +00:00
Angen 04660d594b [gameplay-a24] Balance ranged infantry citizen soldiers
Buffs archers (+0.7 Pierce)
Nerfs slingers. (-0.3 Pierce,-0.1 Crush,+0.5 Spread)

Differential Revision: https://code.wildfiregames.com/D2612
Patch by: ValihrAnt
Reviewed by: elexis
Comments by: badosu, Feldfeld
This was SVN commit r23543.
2020-03-21 22:03:10 +00:00
Stan 7aa6cd4215 New bear model with animations.
Model by @Stan and @Alexandermb
Animations by @Alexandermb
Textures by @Stan

Thread:
https://wildfiregames.com/forum/index.php?/topic/23595-task-bear/

Fixes #1981

This was SVN commit r23542.
2020-03-21 17:00:31 +00:00
Angen d392472d44 Experience trickle
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.
2020-03-21 15:54:45 +00:00
Angen f5589fe1a9 Check for UnitMotion component [UnitAI]
This was SVN commit r23540.
2020-03-20 20:12:09 +00:00
Stan c351a48351 Fix cape going out of sync when approaching resources.
This was SVN commit r23538.
2020-03-18 15:29:39 +00:00
Stan b9e06fc449 Remove the obelisk as it is not historically accurate.
Patch by: @Nescio

Differential Revision: https://code.wildfiregames.com/D2653
This was SVN commit r23537.
2020-03-18 10:36:32 +00:00
Angen ba8acb1bf2 Remove duplication in AttackPlan [Petra]
Move duplicating code to functions.
Cleaner, nicer, easier to extend.

Differential Revision: https://code.wildfiregames.com/D2655
This was SVN commit r23536.
2020-03-17 19:30:15 +00:00
Stan b6cb89bf8c Fix incorrect color tone for gather-meat icon
This was SVN commit r23535.
2020-03-17 18:47:55 +00:00
Stan d8511dd7a0 Delete unused GUI textures.
This was SVN commit r23534.
2020-03-17 18:11:01 +00:00
Stan c2afb5cdb6 Fix warnings with VS2015 introduced in 800bf0da24
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2394
This was SVN commit r23531.
2020-03-15 16:13:51 +00:00
Stan a251e6cf8c - Use @Lordgood's new obelisks for the Ptol civic center, and the military_colony
- Rename and move the current ptolemy military_colony settlement obelisk
- Update the Egypt (3v3) map

This was SVN commit r23530.
2020-03-15 16:01:44 +00:00
Angen 8bfb449375 Support garrisoned enitites defined in map files.
This is adding support to handle garrisoned entities defined in map
files by game engine and atlas allowing future extension for atlas ui
and solving recreation of entites on init in D1958. Also solving
deepfreeze described in D2562.

Differential Revision; https://code.wildfiregames.com/D2597
Ticket: #3008
Patch by: Freagarach
Comments by: elexis
This was SVN commit r23529.
2020-03-15 13:54:50 +00:00
Stan 0a7649318b New Poplar trees.
Patch by: @BigTiger
This was SVN commit r23527.
2020-03-08 22:12:13 +00:00
Stan c5e163f8bb Improve Gaul and Brit specific names.
Thread:
https://wildfiregames.com/forum/index.php?/topic/25284-specific-name-review-units/page/2/&tab=comments#comment-392452

Patch by: @Genava55, @Nescio
Differential Revision: https://code.wildfiregames.com/D2641
This was SVN commit r23526.
2020-03-08 10:33:31 +00:00
Stan b56c750290 Replaces the 3 (three, a digit) with a ȝ (yogh, a letter) and the ‘ and ’ (quotation marks) with a ʿ (ayin, a letter) in the Kushite specific names, because it looks better, and for consistency.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2626
This was SVN commit r23525.
2020-03-08 10:30:16 +00:00
Stan 936d1adaef Rename wall_med to wall_medium for consistency.
Fix some of the variant names.
Fix useless AO suffix as already contained in folders see:
wiki:ArtFileNamingConventions
Add some mime types and some EOL properties.
Based on a patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2554
This was SVN commit r23524.
2020-03-08 10:19:45 +00:00
Stan 86f15892b6 Remove elephant prop from pers hall actor for consistency and better immersion.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2635
This was SVN commit r23523.
2020-03-07 14:53:51 +00:00
Stan 7af9934885 Delete unused duplicate elephant icon
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2588
This was SVN commit r23522.
2020-03-07 14:46:10 +00:00
Angen 6fb01b2d5d Allow to cancel trade route setup
Allow to cancel trade route setup when only origin market is set.
Reported in D2285.

Differential Revision: https://code.wildfiregames.com/D2643
Reviewed by: Freagarach
Reported by: Freagarach
Comments by: elexis
This was SVN commit r23521.
2020-03-07 11:35:25 +00:00
Stan 8be20790b5 Check for missing selection textures and missing range overlay textures
Refs: D2618

This was SVN commit r23520.
2020-03-07 11:06:51 +00:00
Angen be38792477 Support friendly fire for projectile attacks.
Allow templates to define if friendlyfire is enabled for projectiles.

Differential Revision: https://code.wildfiregames.com/D1973
Patch by: Freagarach
Reviewed by: wraitii, Angen
This was SVN commit r23519.
2020-03-07 10:39:05 +00:00
Angen fed4f954b6 Add cursor icon for canceling trade route setup
Created by @Stan
Needed for D2643

This was SVN commit r23517.
2020-03-01 08:48:15 +00:00
elexis ff55548333 Fix map always being set to circular in 34138a7764 / D2483.
Reported By: gameboy, Angen
Tested By: Angen
Forum: https://wildfiregames.com/forum/index.php?/topic/27524-warning/

This was SVN commit r23515.
2020-02-27 11:05:32 +00:00
Stan 5fb88172a2 Allow buildings to autobuild themselves.
Reviewed by: @Angen
Comments by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D2492
This was SVN commit r23514.
2020-02-25 21:29:07 +00:00
Stan df0561988c Fix a texture bug noticed by @Angen.
Thread:
https://wildfiregames.com/forum/index.php?/topic/27665-artic-wolf-texture-mapping/&tab=comments#comment-392624

This was SVN commit r23513.
2020-02-24 20:01:30 +00:00
Angen 0b8aa7eb5a Fix GetTerritoryPercentage when changing number of players
Check for player being out of bounds after m_TerritoryCellCounts may be
recomputed.

Differential Revision: https://code.wildfiregames.com/D2046
Reviewed by: @Stan
This was SVN commit r23510.
2020-02-23 18:24:31 +00:00
Imarok b4da3388ec Should have waited for the bears
refs D1752
refs 0916ffbbb1

This was SVN commit r23507.
2020-02-17 19:23:42 +00:00
Imarok 0c917a2a52 Fix button caption and enable in modmod
Differential Revision: https://code.wildfiregames.com/D1623
This was SVN commit r23506.
2020-02-17 18:22:52 +00:00
Imarok 0916ffbbb1 Add GUI events for middle mouse click
Summary: Add gui events for middle mouse click

Differential Revision: https://code.wildfiregames.com/D1752
This was SVN commit r23505.
2020-02-17 18:16:58 +00:00
bb f12feba62d Correct military colony footprint/obstruction
Patch By: Nescio
Differential Revision: D2639
This was SVN commit r23504.
2020-02-17 18:00:32 +00:00
Stan 0c7e8e75cb Remove ground texture from brit and cart gate actors as it doesn't fit all the terrains and none of the gates have them.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2634
This was SVN commit r23502.
2020-02-15 10:35:05 +00:00
Angen 72beb1326f Fix missing cmpTechnologyManager check in Commands.js
Check for cmpTechnologyManager existence to avoid calling function on
null when upgrading entity requires some technology to be researched.

Differential Revision: https://code.wildfiregames.com/D2632
Fixes: #5668
Patch by: @Ampaex
This was SVN commit r23500.
2020-02-14 08:09:16 +00:00
Stan bfab378b85 Fix missing transparency introduced in f9b0d5e365.
Noticed by: @elexis
This was SVN commit r23498.
2020-02-13 21:15:05 +00:00
Angen 623d4088e8 UnitAI cleanup [GATHER]
delete not needed variable
var -> let
rename nearby variables to reflect what they are referencing

Differential Revision: https://code.wildfiregames.com/D1940
Comments by: Stan, Polakrity
This was SVN commit r23497.
2020-02-13 20:24:51 +00:00
Angen 0535eb9b92 Fix formationmember not leaving walking state if offset cannot be reached
Fail movement for formationmember when cannot find path to destination
and formationcontroller is not moving so formationmember will enter idle
state or follow next command relying on member stopping movement first.

Introduced in a1dc9cadd8.

Differentail Revision: https://code.wildfiregames.com/D2438

This was SVN commit r23496.
2020-02-13 19:44:03 +00:00
Angen a3a5b2fd08 Simplify conditions in SetAnimation
Introduced in d3f57744d9.
There are 2 mane cases when entity cannot play animation.
1st there are not bones
2nd animation is not valid

These conditions are merged into one.

Differential Revision: https://code.wildfiregames.com/D2416
Reviewed by: @Stan
This was SVN commit r23495.
2020-02-13 19:24:08 +00:00
Stan 8707763eb2 Fix placement of the ptolemaic short wall.
Noticed by: @Nescio
Refs: D2502

This was SVN commit r23494.
2020-02-12 22:32:54 +00:00
bb 909dae4ec1 Removing trailing 0's and leading +'s from operators in templates.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2609
This was SVN commit r23493.
2020-02-11 20:07:18 +00:00
bb 053b3c424a Correct watermarks aspect ratio
Patch By: Nescio
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2589
This was SVN commit r23492.
2020-02-11 08:28:01 +00:00
elexis 0dff6940f7 Implement a FixedVector2D::CompareLengthSquared function to provide a more performant alternative to CompareLength.
Avoids computing the square of the compared value every call.

Differential Revision: https://code.wildfiregames.com/D2058
Reviewed By: Vladislav
This was SVN commit r23489.
2020-02-09 21:00:43 +00:00
Alexandermb 49710ee5e8 Replace Wrong visual actor being used in mace_siege_oxybeles_packed.xml
This was SVN commit r23488.
2020-02-09 14:13:37 +00:00
Stan 8dd369ca04 Correct the contents of the kush_hero_harsiotef.xml template, which used to be simply a copy of kush_hero_nastasen.xml
Standardize the Kushite hero specific names, as
Insert Harsiotef in the Kushite sandbox map
Patch by: @Nescio
Discussed with:  @Sundiata
Thread:
https://wildfiregames.com/forum/index.php?/topic/21602-the-kingdom-of-kush-a-proper-introduction-illustrated/page/38/&tab=comments#comment-392146
Differential Revision: https://code.wildfiregames.com/D2624
This was SVN commit r23487.
2020-02-07 21:25:25 +00:00
vladislavbelov 113b1c49b9 Adds anti-aliasing option with FXAA algorithm.
Differential Revision: https://code.wildfiregames.com/D2537
This was SVN commit r23484.
2020-02-05 21:53:10 +00:00
Stan b76fd22c57 New icon for Nastasen.
Art by: @Sundiata
Thread:https://wildfiregames.com/forum/index.php?/topic/21602-the-kingdom-of-kush-a-proper-introduction-illustrated/page/37/&tab=comments#comment-392054

This was SVN commit r23482.
2020-02-05 17:14:21 +00:00
vladislavbelov 00989a6560 Uses fixed-function pipeline functions only in FFP mode.
Differential Revision: https://code.wildfiregames.com/D2619
This was SVN commit r23481.
2020-02-05 14:00:52 +00:00
vladislavbelov 36883f2832 Renames RenderTerrain to RenderTerrainFixed to follow its implementation.
RenderTerrainShader was added in d295dacb9b.

This was SVN commit r23479.
2020-02-04 23:16:30 +00:00
Angen b5e5a8b382 Fix eee to ee in Terms_and_Conditions
Introduced in 209bab0255

Differential Revision: https://code.wildfiregames.com/D2617
Patch by: @Nescio
This was SVN commit r23478.
2020-02-04 20:09:24 +00:00
elexis 912dda50d6 Option to allow having the same entity in multiple control groups.
Differential Revision: https://code.wildfiregames.com/D2176
Patch By: Freagarach
This was SVN commit r23476.
2020-02-02 17:17:16 +00:00
Angen 0f9dd324c2 Fix cape approaching variants related to idle animation and fix incorrect animation names
Introduced in a84a896672

This was SVN commit r23475.
2020-02-01 14:22:52 +00:00
Angen a6159e4ac6 Lower number of setdefaultanimation calls in gathering state
Move call to SetDefaultAnimationVariant to leave function upon leaving
GATHERING state instead for every one substate leave.

Differential Revision: https://code.wildfiregames.com/D2565
This was SVN commit r23474.
2020-02-01 13:46:23 +00:00
elexis 045c3c9d5f Gamesetup setting for map specific team placement, fixes #4110, refs #4838.
Differential Revision: https://code.wildfiregames.com/D2607
This was SVN commit r23473.
2020-01-31 21:25:47 +00:00
elexis c4f6f6cd8d Fix autocomplete of Landscape/Daytime in af15d5972d/D2564 as well.
This was SVN commit r23472.
2020-01-31 21:02:39 +00:00
Angen 39bfd15aca Fix checks for range existence following 6bc99c47e1
Function introduced in 6bc99c47e1, GetRange can return undefined when
required component does not exist. Fixing two oversights, when check is
needed.

Differential Revision: https://code.wildfiregames.com/D2608
Fixes: #5666

This was SVN commit r23471.
2020-01-31 20:00:06 +00:00
elexis 8def60082d Fix missing translate calls and typo in Gamesetup Landscape/Daytime implementation af15d5972d/D2564.
This was SVN commit r23470.
2020-01-31 18:49:00 +00:00
Angen 5d167d4bf9 Use correct player id when querying interfaces in guiinterface
Fix cases when passing gaia player in data parameter will result in
ignoring this passed value noticable mainly when using cheat "controll
all units".

Reported by: gameboy
(https://wildfiregames.com/forum/index.php?/topic/27538-%E3%80%90fixed%E3%80%91upgrade-error%EF%BC%81/)
Differential Revision: https://code.wildfiregames.com/D2606
Comments by: elexis
This was SVN commit r23468.
2020-01-30 21:36:01 +00:00
Angen 083a5947e6 Do not create range query with no enemies
Do not create range query with no enemies as that triggers warning in
range manager.
This situation occurs when player has no enemies so empty list is
returned.

Fixing CCmpRangeManager: No owners in query for entity 0 warning

refs 38b2e37a61

Differential Revision: https://code.wildfiregames.com/D2601
Fixes: #5666
Reviewed by: @Freagarach
This was SVN commit r23467.
2020-01-30 21:13:42 +00:00
Angen 074dff2c91 Rephrase formation disabled tooltip after 9c2e9d7893
I failed to keep tooltip constancy in 9c2e9d7893 done in e381fa393a as I
did not recheck tooltip changes when revisiting D1462 after longer time.

Differential Revision: https://code.wildfiregames.com/D2602
Reviewed by: @Nescio
This was SVN commit r23466.
2020-01-30 21:09:36 +00:00
Angen 6bc99c47e1 Unify GetRange calls in UnitAI.
This patch unifies the different GetRange calls to one function in
UnitAI. Split from D1958 and makes further changes to be done easier at
one place.

Differential Revision: https://code.wildfiregames.com/D2328
Patch by: @Freagarach
This was SVN commit r23465.
2020-01-30 21:05:59 +00:00
vladislavbelov b42ebe99f5 Fixes commented block introduced in ecc7d2913e.
Noticed By: Stan
This was SVN commit r23463.
2020-01-29 23:44:14 +00:00
vladislavbelov ecc7d2913e Moves GL error check after SwapBuffers to decrease a possible synchronization during rendering process.
Comments By: Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2600
This was SVN commit r23462.
2020-01-29 22:03:44 +00:00
elexis 1fdcb80850 Buff loom to double female citizen HP.
Differential Revision: https://code.wildfiregames.com/D2587
Patch By: ValihrAnt
This was SVN commit r23461.
2020-01-29 18:57:30 +00:00
elexis 5fe58d80fd Some more random random map script unit tests and ASSERT functions, refs #4827.
Differential Revision: https://code.wildfiregames.com/D2603
This was SVN commit r23460.
2020-01-29 18:52:48 +00:00
vladislavbelov 8ea416b125 Adds an option to enable/disable building snapping by a hotkey.
Comments By: elexis, bb
Differential Revision: https://code.wildfiregames.com/D2546
This was SVN commit r23459.
2020-01-29 17:41:39 +00:00
vladislavbelov 936cf78ac1 Adds tests for terrain resize, it helps to describe the exact behavior of height preserving.
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D2604
This was SVN commit r23457.
2020-01-29 16:01:25 +00:00
elexis 0a6db43c83 Support random map script tests, fixes #4827.
Differential Revision: https://code.wildfiregames.com/D2085
Comments By: wraitii
This was SVN commit r23455.
2020-01-29 00:30:07 +00:00
Angen 67a4c18c74 Disband formation instead destroying
Fix missed line change in 9c2e9d7893 when rebasing D1462

This was SVN commit r23454.
2020-01-28 19:31:04 +00:00
elexis f98cbb290a Support GUI script includes in included XML files to further decoupling of GUI page contents, refs #5387.
Differential Revision: https://code.wildfiregames.com/D2599
Comment By: Stan, Vladislav
This was SVN commit r23452.
2020-01-28 01:06:34 +00:00
Stan dbdd1dc01b Fix a typo and a duplicated prop noticed by @elexis and checkrefs.pl. Remove a duplicated sail prop.
This was SVN commit r23451.
2020-01-27 22:50:38 +00:00
Angen 9c2e9d7893 Enforce formation required member count
Disband formation with less memebers than required.
Do not allow one member in formation.
Show only formations entities actually are allowed to form. (do not show
wedge for infantry)

Differential Revision: https://code.wildfiregames.com/D1462
Fixes: #5119
Comments by: elexis, bb, temple, Stan, Freagarach
This was SVN commit r23450.
2020-01-27 17:49:06 +00:00
Angen 17c9950cee Fix entities not retaining repair order after target transforms
Update this.repairTarget in UnitAI when target renames.
Transfer builders among renamed entities.

Differential Revision: https://code.wildfiregames.com/D2360
Patch by: @Freagarach
Comments by: Stan, elexis
This was SVN commit r23449.
2020-01-27 17:14:30 +00:00
Angen 82a5ab6d19 Allow status effect to apply modifiers and fix 2333b1814e
Status effect can apply modifier to the entity (armour strength, walking
speed, ...)
This is also hiding status effect icons by default in selection detail.
Fixing smaller related bugs.

Differential Revision: https://code.wildfiregames.com/D2281
Patch by: @Freagarach
Comments by: Stan, wraitii
This was SVN commit r23448.
2020-01-27 16:51:25 +00:00
vladislavbelov 95b13cda13 Adds const to Material and CShaderProgram::Binding methods, removes a redundant variable from ModelRenderer
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2598
This was SVN commit r23445.
2020-01-26 21:32:12 +00:00
Stan 968a208ac0 Remove transparency from horses bodies.
This was SVN commit r23444.
2020-01-26 17:01:56 +00:00
Stan 8954dbd110 Update the siege engines to not use transparency where not necessary.
This was SVN commit r23443.
2020-01-26 17:00:55 +00:00
Stan 1bcc38242d Update roman civic center to use less transparency.
This was SVN commit r23442.
2020-01-26 16:59:02 +00:00
Stan 9abe10c42a Remove some transparency from helmets.
This was SVN commit r23441.
2020-01-26 16:57:36 +00:00
Stan 993dd3a958 Update persian merchant ship mesh to reduce the amount of transparency.
This was SVN commit r23440.
2020-01-26 16:56:39 +00:00
Stan ba0eef2003 Remove basic_trans from greaves to improve performance.
This was SVN commit r23439.
2020-01-26 16:53:48 +00:00
elexis c3a263f1d7 Fix Danubius triggerscript warnings when playing with DisabledTreasures following 6113edd746, reported by mord and nani.
Differential Revision: https://code.wildfiregames.com/D1690
Reviewed By: bb
This was SVN commit r23438.
2020-01-26 16:29:52 +00:00
elexis ccea97670e CSlider inherits IGUIButtonBehavior to gains button sounds, press/release events, duplication removal, continuation of sliding if the object is not hovered while the button is still pressed, refs #2593, c016a74309/D325, 359df88f1a/D1622.
Use the events to fix jittering of the gamesetup slider in
multiplayermode, refs 352d4ea78f/D2571.

Differential Revision: https://code.wildfiregames.com/D2592
Reviewed By: nani
Comments By: Vladislav
This was SVN commit r23435.
2020-01-24 00:56:51 +00:00
elexis 8e3f6439db Gamestup option to select the time the sea level starts to rise on Extinct Volcano (and other maps thay may want to use it), refs #4838.
Differential Revision: https://code.wildfiregames.com/D2593
This was SVN commit r23434.
2020-01-23 15:58:35 +00:00
bb 33365b6392 Remove trailing 0's from Armour items in templates
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2280
This was SVN commit r23432.
2020-01-22 22:23:16 +00:00
bb 0cf8d207fb Merge kushites champion infantry attack bonusses
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2262
This was SVN commit r23431.
2020-01-22 22:13:43 +00:00
elexis 352d4ea78f Gamesetup slider support, use it for Ceasefire, RelicCount, RelicDuration, WonderDuration.
Use Math.round until the slider GUI object type supports fixed step
sizes, refs D406.

Differential Revision: https://code.wildfiregames.com/D2571
Comments By: Vladislav (irc), nani (PM), bb (irc), Stan
This was SVN commit r23430.
2020-01-22 21:37:14 +00:00
elexis c50a621cea Disable Quicksave during multiplayer, since the feature is not implemented and triggering it can crash the turnmanager.
Differential Revision: https://code.wildfiregames.com/D2584
Comments By: Stan
This was SVN commit r23429.
2020-01-22 14:05:17 +00:00
Stan ed0a3f4290 Fix two incorrect icons.
Noticed by: @Nescio
Refs: 702d92ec86

This was SVN commit r23428.
2020-01-20 22:58:36 +00:00
Stan f9b0d5e365 Use a non transparent material to improve performance.
This was SVN commit r23427.
2020-01-20 22:13:27 +00:00
vladislavbelov 365e6c58e8 Removes unused gfx::GetMonitorSize function
GetMonitorSize was added in 5b5726ed4d. Its usage wasn't added. We don't
need to have the custom implementation of the function, since SDL2 can
do this. Also it doesn't make sense to get the default monitor size in
multi-monitor environments since the application window might be located
on each of them.

Patch By: linkmauve
This was SVN commit r23426.
2020-01-20 21:54:31 +00:00
vladislavbelov 421124d486 Removes unused MemorySizeMiB. Refs D2476.
We don't need to account #2145 anymore, since we dropped SDL1. SDL2
doesn't have SDL_GetVideoInfo. We might use OpenGL extensions like
GL_ATI_meminfo, GLX_MESA_query_renderer or GL_NVX_gpu_memory_info.
But they aren't spreaded very well. Also VRAM size isn't so useful for
us, since OpenGL driver can swap memory pages when it needs to.

Patch By: linkmauve
This was SVN commit r23425.
2020-01-20 21:24:09 +00:00
vladislavbelov 32b52f9f67 Saves sidebar/bottombar width/height between Atlas sessions
Tested By: Nescio, Stan
Differential Revision: https://code.wildfiregames.com/D2583
This was SVN commit r23424.
2020-01-20 20:58:17 +00:00
vladislavbelov d3328f9358 Adds non-strict search to the Atlas entity list
Tested By: Nescio, elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2542
This was SVN commit r23423.
2020-01-20 20:42:54 +00:00
Stan 702d92ec86 Delete duplicate and deprecated unit icons.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2586
This was SVN commit r23422.
2020-01-20 18:37:05 +00:00
Stan d584d2dcde Update hero icons and names
→ sets a generic icon (the golden laurel wreath) in
template_unit_hero.xml
→ removes icons from hero templates that used one belonging to another
hero
→ corrects hero icons, generic names, and specific names where necessary

Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2582
This was SVN commit r23421.
2020-01-20 14:02:32 +00:00
elexis 02f39840c2 Show an error message instead of triggering a debug breakpoint if a GUI page attempts to include a directory or file from an invalid path.
Differential Revision: https://code.wildfiregames.com/D2363
Patch By: nani
This was SVN commit r23420.
2020-01-20 09:58:03 +00:00
elexis 5ca68a38ef Rewrite Gamesetup AIConfig page to use class syntax, decouple settings and move it to the Gamesetup subfolder context, refs #5322, #5387.
This establishes a code architecture where only one class and only one
page is responsible per AI setting,
removes the hardcodings from the XML and JS file,
allowing future patches and mods to insert, remove and edit independent
AI settings without having to overwrite the existing code.

Differential Revision: https://code.wildfiregames.com/D2577
See also 0550315161/D2581 and comments linked there.

This was SVN commit r23419.
2020-01-20 09:29:43 +00:00
Angen d33f1c7321 Remove not needed checks and code for VS2015 [VS2013 -> VS2015]
Some pragma warnings are not more needed for VS2015 compilation this
removes them.
Removing some specific code for older version than VS2015.
Forcing build to fail if compiling with VS older than VS2015.

Differential Revision: https://code.wildfiregames.com/D1396
Reviewed by: @Itms
This was SVN commit r23416.
2020-01-19 12:43:41 +00:00
elexis 63d8d579d7 Options page dropdown support for per-value hovered tooltips.
Differential Revision: https://code.wildfiregames.com/D2576
Preparation for: D2546
Accepted By: Vladislav
This was SVN commit r23414.
2020-01-18 20:40:33 +00:00
elexis 0550315161 Gamesetup subpages support.
Split SetupWindow from GameSetupPage class.
Create Gamesetup/Pages subfolder, starting with the existing
GameSetupPage and LoadingPage.
Run the subpage in the same GUI script context instead of separate
pages.
Planned subpages are AIConfigPage (refs D2577), MapBrowser (D1703), hero
selection dialog, civ selection (refs #3987), starting resources,
population capacity (refs #4379, #812...).

This allows:
- subpages to benefit from direct access and reuse of the gamesetup
controlers, (f.e. gameSettingsControl, playerAssignmentsControl,
mapCache, netMessages, ...), deduplication.
- subpages to handle events and control gamesettings even if the
according subpage is closed (for example deleting AIBehavior if there is
no AI assigned).
- to keep gamesettings decoupled, i.e. exactly one class per setting
(for this example avoiding that both GameSetupPage/AIConfigButton and
AIConfigPage/AIBehavior control the AIBehavior setting value.).

Differential Revision: https://code.wildfiregames.com/D2581
Comments By: Vladislav
(http://irclogs.wildfiregames.com/2020-01/2020-01-18-QuakeNet-%230ad-dev.log),
nani (PM)

This was SVN commit r23413.
2020-01-18 19:42:58 +00:00
vladislavbelov 7c72cb7bb9 Reports SDL builtin and runtime versions and video backend in hwdetect report.
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2485
This was SVN commit r23412.
2020-01-18 16:45:50 +00:00
vladislavbelov 1750b0b34c Fixes GLES mode builds on Mesa and running on Intel Iris drivers.
Patch By: linkmauve
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2448
This was SVN commit r23410.
2020-01-17 21:13:51 +00:00
Angen 220f1be652 Allow to garrison animals.
Implementing decision to let animals garrison taken on irc
http://irclogs.wildfiregames.com/2013-12/2013-12-03-QuakeNet-%230ad-dev.log
relevant for ticket #1907.

Differential Revision: https://code.wildfiregames.com/D1961
Patch by: @Freagarach
This was SVN commit r23409.
2020-01-17 09:40:34 +00:00
Angen 163d710952 Update auras when a formation member renames
Reported on forum:
https://wildfiregames.com/forum/index.php?/topic/25196-when-unit-levels-up-he-loses-armor-bonus-from-athens-hero/

Relevant diff: https://code.wildfiregames.com/D997

Differential Revision: https://code.wildfiregames.com/D1727
Patch by: @Freagarach
This was SVN commit r23408.
2020-01-17 09:32:52 +00:00
vladislavbelov df314f2974 Refactors Preprocessor testing and adds more tests
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D2574
This was SVN commit r23405.
2020-01-16 00:02:22 +00:00
Stan 215447a761 Upgrade the Ogre GLSL Preprocessor
Add #elif support and some fixes.

Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D2456
This was SVN commit r23404.
2020-01-15 18:20:36 +00:00
elexis eafd44cfc5 Remove counterproductive lowercasing of GUI ScriptEvent names, refs #127.
a8f48ff7e0 introduced XeroXMB lowercasing of element and attribute names
as a feature.
cf9d8b9797, 4d390f501c, dda6268466 added bugfixes and TODOs because of
that.
f76d0ffdc6, 44fe226dd2 removed the XeroXMB lowercase feature.
This patch removes the lowercasing GUI bugfixes that don't fix any bug
anymore while increasing code complexity and lowering performance
(string copies).

Do not send mouse coordinates objects for events that do not relate to
the mouse.

Store event names in static const members to:
(1) improve performance, ensuring that the CStr is not reconstructed
every call,
(2) obtain compile errors when misspelling event names,
(3) allow reuse of the strings in inherited and friend classes.

Differential Revision: https://code.wildfiregames.com/D2445
Comments by Matei, Philip on 2006-03-11-QuakeNet-#wfg-Meeting-0126.log
and 2006-06-24-QuakeNet-#wfg-Meeting-0139.log

This was SVN commit r23403.
2020-01-15 16:00:37 +00:00
Stan fedcc2f0f1 Delete two unused old icons.
Refs: P194

This was SVN commit r23402.
2020-01-15 15:46:53 +00:00
elexis f5808baac8 Don't continue to process pending netmessages in the gamesetup_mp page after having switched to the session page already.
If there was a player rejoining, a "start" and a "playerassignments"
message pending for that player, the playerassignments message would not
update the assignments of the session page, but the one of the obsolete
gamesetup_mp page, thus triggering "unknown player" messages for that
player during the session.
This seems to only happen when two players rejoin simultaneously and
with very rare timing / race condition, and thus was not reproducible
without modifying the code.
Issue since b454ccca79.

Differential Revision: https://code.wildfiregames.com/D2559
Should fix #5660.

This was SVN commit r23401.
2020-01-15 13:34:07 +00:00
elexis f82fd8ed5c Fix lineendings.
This was SVN commit r23400.
2020-01-15 13:24:17 +00:00
elexis b59257a53f Nerf citizen javelinist team bonuses, because they allowed too quick reinforcements and economy boom.
Differential Revision: https://code.wildfiregames.com/D2392
Patch By: ValihrAnt
This was SVN commit r23399.
2020-01-15 12:06:21 +00:00
elexis cca241c322 Fix some oversights in the gamesetup class rewrite 34138a7764/D2483 and one in the landscape gamesetup option D2564/af15d5972d.
* Relic count setting didn't work at all, reported by gameboy.
* GameSettingsPanel columnWidth wasn't lowered when using 1024*768,
necessary when all victory conditions are enabled (two columns),
reported by bb.
* Landscape setting didn't work with the random random map, reported by
bb.
* SavegameDetails used an obsolete function name.

This was SVN commit r23398.
2020-01-15 11:51:42 +00:00
Gallaecio 193e607677 gui/manual/intro.txt interpunction
This patch is split from D2305. It does the following:
* replace programmer's quotes () in text with proper opening and closing
quotation marks ()
* start sentences with a capital
*  →
* remove an incorrect colon ()
* use imperative

Author: Nescio

Reviewed By: Gallaecio, Freagarach
Differential Revision: https://code.wildfiregames.com/D2560
This was SVN commit r23397.
2020-01-15 09:42:28 +00:00
vladislavbelov 49415f8716 Splits debug display of frustums for an easier debugging of a culling and shadows
This was SVN commit r23395.
2020-01-14 23:51:29 +00:00
Stan dc56447328 Optimize resource trickle by not running timers when not necessary.
Reviewed by: @bb
Comments by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D2400
This was SVN commit r23394.
2020-01-14 21:48:32 +00:00
bb a852bffeaa Standardize modmod buttons width
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2569
This was SVN commit r23393.
2020-01-14 21:02:48 +00:00
elexis af15d5972d Landscape and Daytime gamesetup options for the Unknown, Danubius and Polar Sea, refs #4838.
Allow gamesetup options other than biome to determine the map peview
image, refs #4962, 8adc6d8e93.
Add previews for the 12 Unknown, 2 Danubius and 2 Polar Sea variations.
Concludes deduplication of the Unknown (0d0bc32736), Unknown Land
(25682da568) and Unknown Nomad (7f8adcf8cb), refs #4317.

Differential Revision: https://code.wildfiregames.com/D2564
This was SVN commit r23392.
2020-01-14 07:02:40 +00:00
elexis 0307a642fe Fix gamesetup infinite loop when selecting a falsy (sandbox) AI difficulty following 34138a7764/D2483.
Correctly hide tips panel upon window resize.
Reported by Stan.

This was SVN commit r23391.
2020-01-14 05:46:37 +00:00
Stan c926b53917 Optimize some props by not using transparency.
Noticed by: @vladislavbelov
This was SVN commit r23390.
2020-01-13 23:26:43 +00:00
Stan c942189aac Optimize some helmets by not using transparency when not necessary. EOL
Noticed by: @vladislavbelov
This was SVN commit r23389.
2020-01-13 23:25:56 +00:00
Stan 69258604cc Optimize some structures, by not using transparency when not necessary. EOL
Noticed by: @vladislavbelov
This was SVN commit r23388.
2020-01-13 23:24:55 +00:00
bb 79cbb95d12 Move the credits button on main menu
Patch By: Nescio
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2430
This was SVN commit r23387.
2020-01-13 18:33:03 +00:00
Itms b0b2f0701d Credit Inari in the credits instead of the commit message of dbb69285a5.
This was SVN commit r23385.
2020-01-13 07:47:30 +00:00
Itms dbb69285a5 Set source and executable character sets to UTF-8 on Windows, removes a platform discrepancy, fixes #5094.
Patch By: Inari
Tested By: Angen
Differential Revision: https://code.wildfiregames.com/D1411
This was SVN commit r23383.
2020-01-12 20:19:56 +00:00
Itms 601892a2bb Officially drop support for Visual Studio 2013, which stopped working after 3a839517ce, fixes #5379.
This was SVN commit r23382.
2020-01-12 20:04:22 +00:00
Alexandermb ae6c6bdbeb Fix head rotation not being properly exported in the resource approaching animation.
This was SVN commit r23379.
2020-01-12 14:33:56 +00:00
Angen 19f4e3ef28 Let splash radius be affected by modifications and rename GetSplashDamage to GetSplashData.
Differential Revision: https://code.wildfiregames.com/D2370
Patch by: @Freagarach
Comments by: Stan
This was SVN commit r23378.
2020-01-12 13:37:14 +00:00
Angen a84a896672 Use specific walking variants when approaching gathering
Switch to citizen walking with working tools when approaching some
resource to gather from.
It is nice visual change, it removes visual switching between soldier
and citizen when gathering resources.

Differential Revision: https://code.wildfiregames.com/D2518
Related forum posts:
https://wildfiregames.com/forum/index.php?/topic/26012-committed-animations/page/28/

This was SVN commit r23377.
2020-01-12 13:21:09 +00:00
elexis 34138a7764 Gamesetup class rewrite, fixes #5322, refs #5387.
* Decouples settings logically which in turn allows fixing many problems
arising from previous coupling.
* Fixes the persist-match-settings feature, refs #2963, refs #3049.
* Improves performance of the matchsetup by rebuilding GUI objects only
when necessary.

Provides groundwork for:
* UI to control per-player handicap, such as StartingResources,
PopulationCap, StartingTechnologies, DisabledTechnologies,
DisabledTemplates, ..., refs #812.
* Map specific settings (onMapChange event), refs #4838.
* Chat notifications announcing which settings changed, refs D1195,
* Multiple controllers setting up the game (since setting types can
check for permissions in onUpdateGameAttributes without the need for a
new data model or a second gamesetup data network message type), refs
#3806, subsequently dedicated server, refs #3556.
* MapBrowser (MapCache, MapTypes, onUpdateGameAttributes interface),
refs D1703 and D1777,
* Multiplayer saved games (decoupling and setting dependent unique
logic), refs #1088.
Refs
https://wildfiregames.com/forum/index.php?/topic/20787-paid-development-2016/
https://wildfiregames.com/forum/index.php?/topic/20789-paid-development-2016/

Enable maps to restrict setting values:
* If a map specifies an AI or Civs for a playerslot, the controller
can't assign a player/other AI or Civ to that slot, refs #3049, #3013.

Fix per player StartingResources, PopulationCap, StartingTechnologies,
DisabledTechnologies, DisabledTemplates following 9177683653, refs #812,
fixes #4504. Use this for DisabledTechnologies on Polar Sea.

Persist user settings for Skirmish maps:
* All user chosen settings are persisted when changing the selected map
or maptype,
  except where the selected map overwrites the setting value and
  except for Scenario maps which still use the default value where the
map doesn't specify the setting value.

* Tickets relating to that Skirmish mapchange user setting persistance:
 - Selecting a map doesn't change the selected civilizations, fixes
#3120 (together with 7cf83f19fd removing map specified Civs).
 - Selecting a map type doesn't reset the selected settings, fixes
#5372.
 - Selecting a map doesn't change the selected victory conditions,
unless the map specifies those, refs #4661, #3209. (Atlas still writes
VictoryConditions to every map.)
 - Consume the player color palette from Skirmish maps, refs 4996d28110
/ #1580. Preserve the selected playercolors when switching the
Skirmish/Random map by chosing the most similar colors if the map comes
with a different palette.

Rated games:
* Hide and disable Rated game setting unless there are exactly two
players, fixes #3950, supersedes D2117.
* Display conspicuous warning if the game is rated, so players are
perfectly aware.

Autostarted games:
* Allow using the gamesetup page to autostart matches with arbitrary
maps, not only this one tutorial, as reported in D194 and 15e2b42525,
refs D11.

Networking:
* Keep gamesetup page open after disconnect, allowing players to read
chat messages indicating why the host stopped the server, fixes #4114.
* The message subscription system allows new and mod settings to run
custom logic on arbitrary setting changes (most importantly on map
change).
  This removes hardcoded logic restrictions from the gamesetup option
unification rewrite in b4e5858f6d/D322, refs #3994,
  such as the hardcoding of setting references in selectMap to biomes
from f2550705d3/D852 and the difficulty from 9daa7520ef/D1189,
RelicDuration, WonderDuration, LastManStanding, RegicideGarrison,
TriggerScripts, CircularMap, Garrison, DisabledTemplates.

Checkboxes:
* Display values of disabled checkboxes with Yes/No labels, fixes D2349,
reviewed by nani.

Clean g_GameAttributes of invalid values and gamesetup GUI temporaries,
refs #3049, #3883:
* Delete useless values:
 - VictoryScripts, because they are redundant with TriggerScripts,
introduced in 8915037631.
 - mapType which was written twice to g_GameAttributes following
9177683653
 - Description, Keywords, Preview since that doesn't impact simulation
and can be loaded from the MapCache
 - mapFilter, mapPath, SupportedBiomes, SupportedTriggerDifficulties
since they are only used in the gamesetup
* Delete conditional values if the condition is not met:
 - AIDiff, AIBehavior if there is no AI in that slot
 - Nomad and Size if the maptype is not Random
 - Biome, TriggerDifficulty if the map doesn't support that
 - WonderDuration, RegicideGarrison, RelicCount, RelicDuration if the
according VictoryConditions are not enabled
 - LastManStanding if TeamsLocked
 - Rating if there are more than 2 players

MapCache:
* Refactor to MapCache class, store maps of all types and use it in the
replaymenu, lobby and session as well.

SettingTabsPanel:
* Remove hardcodings and coupling of the SettingTabsPanel with
biomes/difficulties/chat UI from D1027/ac7b5ce861.

GamesetupPage.xml:
* Restructure the page to use hierarchical object organization
(topPanel, centerPanel, centerLeftPanel, bottomPanel, centerCenterPanel,
centerRightPanel, bottomLeftPanel, bottomRightPanel), allowing to
deduplicate object position margins and size math and ease navigation.

New defaults:
* Check LockedTeams default in multiplayer (not only rated games).
* Persist the rated game setting instead of defaulting to true when
restarting a match, which often lead to unintentional rated games when
rehosting.
* 60 FPS in menus since they are animated

Autocomplete sorting fixed (playernames should be completed first).
Refactoring encompasses the one proposed in Polakrity and bb D1651.

Differential Revision: https://code.wildfiregames.com/D2483
Tested by: nani
Discussed with:
* nani for blackbox testing, code architecture, performance and
MapBrowser in PMs on 2019-12-19, 2019-12-31, 2020-01-06
* Angen for the simulation diff on
http://irclogs.wildfiregames.com/2020-01/2020-01-03-QuakeNet-%230ad-dev.log
* bb on SettingsTabPanel on
http://irclogs.wildfiregames.com/2020-01/2020-01-05-QuakeNet-%230ad-dev.log
* Imarok on data model and revised multi-controller plans for #3806 on
http://irclogs.wildfiregames.com/2020-01/2020-01-07-QuakeNet-%230ad-dev.log
Emojis by: asterix, Imarok, fpre, nani, Krinkle, Stan, Angen, Freagarach
This was SVN commit r23374.
2020-01-11 20:14:17 +00:00
Alexandermb 6159797710 Fix spear being reverse while attacking for ptolemies spearman
This was SVN commit r23373.
2020-01-11 18:54:21 +00:00
Alexandermb 5854ca30d1 Fix a duplicated attack animation in the spearman variants.
This was SVN commit r23372.
2020-01-11 18:52:29 +00:00
Alexandermb c659bfd195 Tool idle animations, and improvement of cape movement on walking with tools.
Note:

Hoe works both for shovel and Hoe.
Axe works both for pickaxe and woodcutters axe

This was SVN commit r23371.
2020-01-11 18:31:23 +00:00
vladislavbelov b6300eb417 Reorder rendering passes to decrease a possible driver synchronization
Hack inside the ShadowMap was added in b889826a3d and became outdated in
1866c2d3b7.

Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2541
This was SVN commit r23370.
2020-01-11 15:25:05 +00:00
Alexandermb c0185c0970 Modify specular maps of rome cardiopylax and hellenic cuirass in order to get a more bronze - like gloss
This was SVN commit r23369.
2020-01-11 14:22:06 +00:00
Gallaecio 63cbcf2eb5 reduce excessive capitalization in game options
Title case is meant for titles, headers, entity names, classes, keys,
and button captions (see
https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Capitalization ).
In the game options about every entry (two exceptions) in the lists is
capitalized, which is both unnecessary and excessive. This patch removes
title case from the listed items, reserving it for the section headers.

Before: {F1154299}
After: {F1154298}

Patch By: Nescio
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2437
This was SVN commit r23368.
2020-01-11 12:08:28 +00:00
Gallaecio 58b116fb4a main menu item tooltip corrections.
Minor corrections to several tooltips in the pre-game main menu.

Patch By: Nescio
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2428
This was SVN commit r23367.
2020-01-11 12:00:14 +00:00
Gallaecio 9b9410c923 [gui] building → structure
This patch corrects occurrences of “building” into “structure”.
Whilst “constructing a building” is proper English, it is important to
refer to one and the same thing with a single term, to avoid potential
misunderstandings (see
https://trac.wildfiregames.com/wiki/EnglishStyleGuide ), thence
“building a structure”, because the unit action is “build” and the
entity is a “structure” (see `simulation/templates/`).

Patch By: Nescio
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2429
This was SVN commit r23366.
2020-01-11 10:58:43 +00:00
vladislavbelov bbcd9b34cc Removes obsolete sys_cursor. Refs D2557.
sys_cursor was introduced in 7e1bcd5159 and partially in 5299dcad86.
Usage of sys_cursor was completely removed in 9a2d0f803e. At the moment
we use SDL and GL cursors.

Patch By: linkmauve
Comments By: Stan
This was SVN commit r23364.
2020-01-10 23:45:40 +00:00
vladislavbelov 604ec667f3 Removes possible copying of CStr in CTerrainTextureEntry and adds const where possible.
The copy returning was introduced in 7577d224a6.

This was SVN commit r23363.
2020-01-10 22:36:22 +00:00
vladislavbelov 39986f80e1 Adds const to PathfinderPassability where possible.
This was SVN commit r23362.
2020-01-10 20:37:59 +00:00
vladislavbelov c3ded34cf7 Improves performance of Atlas terrain elevation by updating the only changed terrain.
Reviewed By: Itms
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2557
This was SVN commit r23361.
2020-01-10 19:54:35 +00:00
elexis 7567f56c71 Fix wrong Single-player main menu item tooltip and some indentation from adf448db4d, as reported by Freagarach, apply 3968760129/D2312 to that string.
This was SVN commit r23360.
2020-01-10 19:17:46 +00:00
Angen d12e5a9df0 Do not allow to override formation animation variants chosen when walking and define remaining combat variants
Fixing oversight from e7ab2c9b3f. Switching to columnar formation,
adding or removing formation members does not reset animation variant
passed by last order.

Also adding remaining combat variants for formationwalk.

Differential Revision: https://code.wildfiregames.com/D2556
This was SVN commit r23359.
2020-01-10 10:03:15 +00:00
Angen 900573e01c Fix missing phalanx animations
Fix missing phalanx animations following a8f7668bc6 because not
correctly added in e4f38b4b5d required because of 7cf6244110.

Differential Revision: https://code.wildfiregames.com/D2555
This was SVN commit r23358.
2020-01-10 09:33:24 +00:00
Angen ae341353d8 Fix units not reentering FORMATIONMEMBER.IDLE when no orders left
In 4ca448a686 : Make sure that formation members that end up in
INDIVIDUAL.IDLE go back to FORMATION.IDLE for sanity and for better
housekeeping

Differential Revision: https://code.wildfiregames.com/D2558
This was SVN commit r23357.
2020-01-10 09:31:22 +00:00
Alexandermb 34db988888 Remove front step from melee attacking animations making them more natural.
The front step or the quick "close-up" the infantry does while attacking
was a guide i've used while animating following the old attacking
animations, however this doesn't feel natural before and neither does
now. This animations follows the same attacking animation whitout
getting closer to attack in order to keep the visual mesh in the root of
the actor or the selection circle.

This avoid unnecesary clipping when attacking buildings.

This was SVN commit r23355.
2020-01-10 00:40:28 +00:00
Alexandermb f6f84d657f Adjust female mesh:
Reduced shoulders height to make them look more femenine.
Adjusted Female_Dress mesh UV for have a proper Texture alingment in the
lower dress.

This was SVN commit r23354.
2020-01-10 00:26:52 +00:00
Angen bd58e3ba1d Set last carried resource after promotion/transformation
Set last carried resource when transforming gatherer as that information
is needed to set correct animation variant.

Missing since 7499b23991 (was still relevant in that time for
"RETURNRESOURCE.APPROACHING")

Differential revision: https://code.wildfiregames.com/D2471
This was SVN commit r23353.
2020-01-09 21:21:38 +00:00
Angen e7ab2c9b3f Support order defined animation variants for formation
Allows to pass variant name when moving units to formation used by
UnitAi when formation is moving. That variant will be passed as
parameter of order FormationWalk so formationmember can set requested
variant.

This passed variant will be ignored if formation defines own variant
based on position of member.

When none of above is true, that means nor formation nor order defines
variant, member will fallback to default variant in order to show
carried resources if has some what makes it more consistant with
animation variants used in individual state.

Differential Revision: https://code.wildfiregames.com/D2550
This was SVN commit r23352.
2020-01-09 20:53:13 +00:00
Stan 2a363df67d Standardize fortress actor names. EOL to native.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2553
This was SVN commit r23351.
2020-01-09 13:37:16 +00:00
Stan 2f3d862dae Update material settings to match basic_trans_parallax_spec.xml
This was SVN commit r23350.
2020-01-09 11:53:23 +00:00
Stan 5d2dd16126 Optimize some shields and shield props by not using basic_trans saving in some cases a few hundreds of polygons.
This was SVN commit r23349.
2020-01-09 10:50:51 +00:00
Stan 840375818e Optimize weapons meshes by not using basic_trans when not necessary.
This was SVN commit r23348.
2020-01-09 09:46:58 +00:00
Stan bc43a1a66e moved generic parent template
moved (four) specific structures
corrected ai file(s) accordingly
corrected appropiate map files (five scenarios and one skirmish)
moved one sound
moved an icon
moved the remaining art files for consistency.

Based on a patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2543
This was SVN commit r23347.
2020-01-09 08:56:29 +00:00
Angen ed54ad3486 Do not face point after movement for formation walk
After formation member ends walking, he tries to face target point.
However that eliminates rotation set by SetInPosition from formation
component. Partly fixed in 9d0b4db973 with setting correct rotation in
idle state, but one could still notice that there is glitch when unit
does quick turn to target point and then back. However that solution
would be still required if logic in SetInPosition would not be changed
to always set correct rotation. Another alternative would be to unset
unit at position with every walking order but that would have the same
effect and this is just more performance friendly to not splice member
from position every time.

Notice that information from inPosition is currently not used, so that
change in it is not braking anything.

This was SVN commit r23346.
2020-01-08 21:37:19 +00:00
Angen 46ea62f717 Remove formation speed multipliers introduced in 06e01ef944 based on 56b8fe31fd
This was SVN commit r23345.
2020-01-08 17:07:14 +00:00
Stan 9cd6ebed41 Fix space in seleucid temple pediment. This is against the art naming conventions, and it breaks Phabricator
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2544
This was SVN commit r23344.
2020-01-07 20:45:04 +00:00
Alexandermb d52e995deb Fix camel blanket issue while gathering meat.
Reported by @Stan

This was SVN commit r23343.
2020-01-07 20:38:14 +00:00
elexis 4a719e92aa Fix maps with StartingTechnologies (Carthaginian Demo map) following 8de5c26540/D1024, refs #4589, D2483.
Remove invalid and default gamesettings from Sahyadri Buttes (5) map
from 0286bd2245, same as 1f65e3df66, 7cf83f19fd.

This was SVN commit r23342.
2020-01-07 14:41:13 +00:00
elexis 626822e2ce Fix aiconfig dialog errors in multiplayer mode following b120404141, refs #3911 when reducing playercount and following 86c151ebaa/D1684 when unassigning the AI, reported by smiley and Freagarach.
Differential Revision: https://code.wildfiregames.com/D2538
This was SVN commit r23341.
2020-01-07 13:30:09 +00:00
Stan 385377820b athen_gymnasion.xml → athen_gymnasium.xml
Add some special maps for the old hellenes/gymnasium.xml actor.
Comments by: @Angen
Based on a patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2208
This was SVN commit r23340.
2020-01-07 10:14:00 +00:00
Stan 3b6e933c2b Correct sword prop for six units
Change the weapon of gaul infantry swordmen to (Celtic) csword, because
all other Celtic swordsmen (cavalry, champions, heroes, ptol
mercenaries) use it already and the spatha is a Roman cavalry sword;
Change the weapon of athen cavalry swordsmen to falcata
(kopis/makhaira), a chopping sword, because ancient sources (e.g.
Xenophon) emphasize cavalry used that, not a xiphos (similar to gladius
or akinakes), a short stabbing sword, unsuitable for horsemen.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2033
This was SVN commit r23339.
2020-01-06 21:23:37 +00:00
Stan a4ad73430e Improve generic and specific names of healers.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2155
This was SVN commit r23338.
2020-01-06 20:45:34 +00:00
Stan 154987ede9 gui/credits/*.json white space corrections
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2516
This was SVN commit r23337.
2020-01-06 14:40:13 +00:00
Stan f1bd2a40e0 Add Genava55 to the credits as discussed here https://wildfiregames.com/forum/index.php?/topic/25184-task-current-issues-with-celtic-units-and-guideline-for-the-next/page/6/&tab=comments#comment-390751.
This was SVN commit r23336.
2020-01-06 11:20:41 +00:00
vladislavbelov 8e48e1b17e Adds optional fixed shadows without swimming effect
Fixed shadows have fixed rendering distance. Also they don't have a
swimming (blinking) effect on camera movement/rotation.

Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2465
This was SVN commit r23333.
2020-01-05 22:44:39 +00:00
wackyserious e7caa135e0 Texture Update: New Iberian Unit Textures
Thread:
https://wildfiregames.com/forum/index.php?/topic/27446-committed-iberian-unit-textures/&tab=comments#comment-390689

Reviewed by: Lordgood, Alexandermb, Sundiata and Lion.kanzen
This was SVN commit r23332.
2020-01-05 15:00:02 +00:00
vladislavbelov a8f241da5d Adds snapping to edges for buildings
Allows to place buildings a bit faster and more perfectly aligned. Also
it helps to find a nearest placeable position in some cases.

Reviewed By: elexis
Comments By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D2079
This was SVN commit r23330.
2020-01-05 01:08:05 +00:00
elexis cf7635f57b Remove JSInterface_Lobby IsRankedGame function duplicitous with g_GameAttributes.settings.RatingEnabled && !g_IsReplay, refs #3550, D2483.
This was SVN commit r23329.
2020-01-04 17:10:12 +00:00
elexis b9dc24d5ec Fix cart_tower_bolt, ptol_tower_bolt civs broken since d4db7d2e0b.
This was SVN commit r23328.
2020-01-04 16:02:17 +00:00
wackyserious e2ac957ddc Texture Update: Linothorax variants (Thespian, Italian and Greek)
Also tweaked some Carthaginian actor files.

Thread:
​https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-general-thread/page/10/&tab=comments#comment-390422

Reviewed by: Art Department, Sundiata and other community members.
This was SVN commit r23327.
2020-01-04 12:03:23 +00:00
Angen 8bf7ab3c8d Fix texture name in carthaginian infantry_swordsman_e
Introduced in 8cf5a9eac4.

Differential Revision: https://code.wildfiregames.com/D2527
Reviewed by: Stan
This was SVN commit r23326.
2020-01-03 14:19:16 +00:00
elexis df109bd246 Fix XmppClient upon registration or entering wrong password following 2cccd9825d/D2412.
Differential Revision: https://code.wildfiregames.com/D2482
Tested on: clang 9.0.1, Jenkins/VS2015, Jenkins/gcc6

This was SVN commit r23323.
2020-01-02 22:14:14 +00:00
Angen 616a6db6b3 Fix style, Cc and slightly refactor ProductionQueue
Fix redeclarations of variables
Fix variable shadowing
Remove duplicated cmpPlayer
Move querying of the same components out of loop
Change if (foo.length > 0)  to if (foo.length)
Change if (foo == 0) to if(!foo)
Fix remaining var -> let
Remove white space from empty object { } to {}
Restyle more complicated objects

Differential Revision: https://code.wildfiregames.com/D2470
Comments by: elexis, Stan, nani
This was SVN commit r23322.
2020-01-02 20:29:07 +00:00
vladislavbelov 8abc7c051b Include Pyrogenesis.h and os_path.h where needed
These two headers were missing in various places, preventing build in
some cases.

Patch By: linkmauve
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2481
This was SVN commit r23321.
2020-01-02 18:07:40 +00:00
elexis f96f0ec78e Throw JS exceptions instead of C++ breakpoints if lobby JS code calls a JSInterface_Lobby function under an invalid circumstance.
Differential Revision: https://code.wildfiregames.com/D2526
Tested on: clang 9.0.1, Jenkins/gcc6, Jenkins/VS2015, Jenkins/macOS

This was SVN commit r23319.
2020-01-01 21:49:13 +00:00
LordGood e4bb7f7fb7 Forgot the new tag
This was SVN commit r23318.
2020-01-01 10:50:35 +00:00
LordGood 0286bd2245 Sahyadri Buttes map and wind sway added to areca palm
This was SVN commit r23317.
2020-01-01 10:47:10 +00:00
wackyserious 64ea9868b8 Texture Update: Athenian Marines, Hellenic Thureophoroi and Theban Sacred Band
Thread:
https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-general-thread/page/10/&tab=comments#comment-390422

Reviewed by: Lordgood and Lion.kanzen and several community members.
This was SVN commit r23315.
2020-01-01 02:08:17 +00:00
Angen 5ad75fa580 Precompiled logic update [Windows build]
Nuke HAVE_PCH and use only one macro for PCH logic.
This macro is enabled (=1) or disabled (=0) based on --without-pch and
no_pch parameters in premake5
Visual studio does not more override this logic

Differential Revision: https://code.wildfiregames.com/D1380
Reviewed by: @Itms
This was SVN commit r23314.
2019-12-31 13:58:48 +00:00
elexis 1f65e3df66 Remove default civs and invalid gamesettings from Obedska Bog and Obedska Bog Night as in 7cf83f19fd following d3ce9b05b2, de5d5f39c4.
Fix chicken trapped in Iberian starting walls.
Fix lineednings.

This was SVN commit r23310.
2019-12-29 19:29:07 +00:00
Stan 821935cb7d Remove some unused files noticed by @Vladislav and the checkrefs.pl script with --unused-files
This was SVN commit r23309.
2019-12-29 18:32:30 +00:00
Stan 14318bf206 Rename a png file pretending to be a DDS file. Add EOL Native property to the XML file.
Noticed by: @Itms
This was SVN commit r23308.
2019-12-29 18:24:41 +00:00
Alexandermb 1e6a888c11 Add missing attack_capture variants on some heros as conversed with @faterbushido
This was SVN commit r23307.
2019-12-29 16:37:36 +00:00
Alexandermb 2bf3bef76e Fix trader variants as well as replace saddle prop point with rider.
Thread:
https://wildfiregames.com/forum/index.php?/topic/27415-error-message-appears!/&tab=comments#comment-390385

This was SVN commit r23306.
2019-12-29 16:34:13 +00:00
Itms cc7071c691 Upgrade NVTT to version 2.1.1, fixes #4549.
Windows binaries built with toolset v140_xp.
Tested under Windows, Linux and macOS.
Includes a patch for building on musl Linux, contributed by voroskoi,
containing code by leper.
Use the opportunity to set native line endings in the NVTT bundle.

The NVTT DLL was the last one built with VS 2010, refs #5379, #5527.

Differential Revision: https://code.wildfiregames.com/D2475
This was SVN commit r23305.
2019-12-29 11:21:33 +00:00
Itms fcac07213f Update libsodium to 1.0.18, built on Windows with toolset v140_xp.
Also fixes the download address in the macOS libraries script.

Tested on Windows and macOS.

This was SVN commit r23302.
2019-12-28 18:12:43 +00:00
Alexandermb 8b560d2380 Some walking with tool's animations.
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-committed-animations/page/32/&tab=comments#comment-390317

This was SVN commit r23301.
2019-12-28 14:58:30 +00:00
Angen 792e51b3dd [UnitAI] Fix return value on "enter" according to FSM logic
When entity is in "enter" phase of state and it was called SetNextState,
code have to return true in order to abort current state to work
properly ( else return false ).

Differential Revision: https://code.wildfiregames.com/D1943
This was SVN commit r23300.
2019-12-28 13:43:18 +00:00
Alexandermb d7bf234ad7 Fix some wrong folders with latest two committs.
This was SVN commit r23299.
2019-12-28 13:16:07 +00:00
Angen 67514fb9ce Automatically cancel packing or unpacking based on given order
Cancel packing when next command requires unpacked state and cancel
unpacking when next command requires packed state.

Fixing unit refusing to move because keeps unpacking to attack targets
in range.

Partially Fixes: #4015, #5328
Differential Revision: https://code.wildfiregames.com/D1520
Patch by: @causative
Comments by: elexis, Freagarach, Stan
This was SVN commit r23298.
2019-12-28 11:40:24 +00:00
Angen 3051c90955 Inform player that second market is too close to setup trade route
Display tooltip with disabled action and icon to player with
information, that markets are too close to setup trade route.

Differential Revision: https://code.wildfiregames.com/D2285
Reviewed by: @Freagarach
Comments by: elexis, Stan, Imarok, nani
This was SVN commit r23297.
2019-12-28 11:15:05 +00:00
Alexandermb acf524790c Camel update.
Overal enhancement of the camel mesh and animations.

New animations for the camel riders allowing for more camel cavalry unit
types (Swordsman, Spearman, Javelinist, Archer, Lancer. Shield and No
Shield Variants).

New death animation.

New idle animations.

Better motion for the running, walking, trotting animation.

New melee attacking animations for the camel.

Improvement of the rein for a more performance friendly actor.

This was SVN commit r23296.
2019-12-28 03:49:18 +00:00
Alexandermb 4c96e5e23b Replace mace oxybeles visual actor with the new one.
Replace "athenians" folder to "hellenes" in
siege_heavy_artillery_packed.xml

This was SVN commit r23295.
2019-12-28 02:52:48 +00:00
Alexandermb 3b422ede91 Upload missing variants from 8cf5a9eac4
Reported by @Stan

This was SVN commit r23294.
2019-12-28 02:51:04 +00:00
Angen a8f7668bc6 Add missing phalanx animation for carthaginian spearmen
Differentail Revision: https://code.wildfiregames.com/D2514
Reviewed by: @Stan
This was SVN commit r23293.
2019-12-27 20:24:02 +00:00
Stan 503f0f280b Add missing group tag in b8690f7c54
This was SVN commit r23292.
2019-12-27 16:24:04 +00:00
Stan 886b750fe9 Remove 462 polygons (4126 > 3664) on the Persian fishing ship by not using basic_trans.xml.
This was SVN commit r23291.
2019-12-27 16:14:46 +00:00
Stan b8690f7c54 Cleanup field actors. Remove basic_trans to default instead, and don't load more textures than needed.
This was SVN commit r23290.
2019-12-27 16:04:48 +00:00
Angen c9c8a47018 [AI] Small cleanup in defenseManager
Make comments to start with capital letter and ends with dot.
Remove not needed continue call.
Merge if condition

Differential Revision: https://code.wildfiregames.com/D2001
Reviewed by: @Stan
This was SVN commit r23289.
2019-12-27 14:03:32 +00:00
Angen 072f48651b Add disabled cursor icon for trade route
Needed for D2285
Created by @Stan

This was SVN commit r23288.
2019-12-27 10:37:27 +00:00
Alexandermb 8cf5a9eac4 Siege Artillery rework.
Thread:
https://wildfiregames.com/forum/index.php?/topic/27286-task-siege-artillery-rework/#comments

Visual improvement of siege artillery stone/bolt throwers such as:

Lithobolos.
Oxybeles.
Scorpio.
Polybolos.
Ballista.

New models, New animations, New actors.

This was SVN commit r23285.
2019-12-27 01:02:49 +00:00
LordGood d3ce9b05b2 Night version of Obedska bog, with stan's new fireflies
This was SVN commit r23284.
2019-12-26 21:47:00 +00:00
Angen b1a78ce285 Treat min range in the same manner as max range when computing goal
Problem description:
When unit gets command to move to the range exactly X units from some
point/entity, what means minRange == maxRange, that triggers computing
goal when distance < minRange with result distance(goal, target) >
maxRange, because minRange computation uses clearance even when is
treating target as circle.

Solution:
Do not use clearance when treating target as circle, so computation when
distance < minimum range is done in same way as computation when
distance > maximum range and so computed goal has correct position.

Reported on forum:
https://wildfiregames.com/forum/index.php?/topic/27384-strange-landing-on-the-island-and-unable-to-attack/
Differential Revision: https://code.wildfiregames.com/D2512
Tested by: gameboy
This was SVN commit r23283.
2019-12-26 21:03:15 +00:00
LordGood de5d5f39c4 New Skirmish map Obedska Bog.
This was SVN commit r23282.
2019-12-26 12:30:13 +00:00
Stan d8785cd477 Reorders the exceptions in the following files for consistency [EDIT]:
art.json
    history.json
    programming.json

and also renames:

    Hannibal_Baraq → Hannibal_Barca
    Lordgood → LordGood
    stanislas69 → Stan
Patch by: @Nescio
Comments by: @Freagarach, @Itms
Differential Revision: https://code.wildfiregames.com/D2427
This was SVN commit r23281.
2019-12-24 16:29:59 +00:00
wackyserious 4fb6346063 Texture Update: Athenian and Roman unit textures
Threads:
https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-general-thread/
https://wildfiregames.com/forum/index.php?/topic/27371-task-iphicrates-unit-texture/
https://wildfiregames.com/forum/index.php?/topic/25533-committed-roman-infantry-new-texture/

Reviewed by: Art Department, Sundiata and Community members
Note: templates/units/rome_infantry_swordsman_slave.xml is included in
this commit.

This was SVN commit r23280.
2019-12-24 09:26:55 +00:00
elexis 7cf83f19fd Clean Skirmish maps of default and invalid gamesetting values.
* The gamesetup class rewrite in D2483 will enable Skirmish and Random
maps to fix AIs and Civs by specifying them.
  Hence remove them from all maps that don't intend to fix them (i.e.
all except Egypt 3v3).
* Remove default values (and the few irrelevant non-default values) so
that the player-chosen settings may be persisted between Skirmish map
selection changes, refs #3120, D2483.
* Remove invalid settings: mapType, AISeed and random map settings
Script, Size, Seed, Nomad, BaseHeight, BaseTerrain, refs b8216a9164,
75c24843b2.
* Remove StartingCamera values since they are useless, refs #4839,
D1098.
* Add the "new" keyword to Atlas Valleys and Vesuvius from c4f530be28,
so they appear in the "new" filter.
* Unhide Barcania (3)

This was SVN commit r23279.
2019-12-24 04:38:01 +00:00
LordGood c4f530be28 Atlas Valleys and Vesuvius skirmish maps
This was SVN commit r23278.
2019-12-23 12:08:56 +00:00
vladislavbelov dd1678287d Marks unused arguments in macOS implementation of try_gui_display_error
This was SVN commit r23275.
2019-12-21 14:31:47 +00:00
vladislavbelov b276c9b76f Enable hardware S3TC on GLES too by using GL_EXT_texture_compression_s3tc
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2489
This was SVN commit r23274.
2019-12-21 12:12:38 +00:00
vladislavbelov e269466f51 Splits CameraController and adds ICameraController interface
Comments By: Stan
Differential Revision: https://code.wildfiregames.com/D2478
This was SVN commit r23272.
2019-12-21 00:44:18 +00:00
vladislavbelov 091f3167e0 Use raise() instead of kill() for debug_break()
Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2480
This was SVN commit r23271.
2019-12-21 00:30:34 +00:00
vladislavbelov d6d6cb0696 Refactors ownership of SOverlayTexturedLine in CCmpRangeOverlayRenderer
Differential Revision: https://code.wildfiregames.com/D2463
This was SVN commit r23270.
2019-12-20 22:33:50 +00:00
Angen eb3b7f089e Fix mod list filter
Fixing problem with filters reported in 64bfa089af.

Use filtered version of mods for manipulation in javascript instead non
filtered one.
Fixing following problems when filter is applied:
not enabling selected mod
displaying wrong tooltip
getting out of bounds error when using keyboard arrows to select
next/previous mod

This is also disabling possibility to sort enabled mods manually when
filters are applied. See comment in moveCurrItem for more details.

Differential Revision: https://code.wildfiregames.com/D1944
This was SVN commit r23269.
2019-12-20 20:19:21 +00:00
Angen 21070a4592 Fix second tasked garrison holder to pickup not reacting properly
Move some pickup logic to Approaching state from parent Garrison state
to react to state changes among childrens of Garrison state properly.

Reported by: causative
Patch by: causative, Freagarach
Fixes: #5557
Differential Revision: https://code.wildfiregames.com/D2174
This was SVN commit r23268.
2019-12-20 20:05:19 +00:00
Angen d931ea183e Fix promoted entities not retaining order queue after cc1ea7cca0.
cc1ea7cca0 changed order in which cheer order is given and old orders
copied. That lead to replacing all orders with cheering order.

Patch by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2358
This was SVN commit r23267.
2019-12-20 19:53:59 +00:00
vladislavbelov 0406509823 Merges two camera JS interface functions into the single one.
Differential Revision: https://code.wildfiregames.com/D2467
This was SVN commit r23264.
2019-12-19 23:41:20 +00:00
vladislavbelov e1cf1e16b9 Unbind the correct texture slot in SkyManager
Wrong binding pair was introduced in 779a33ee30.

Patch By: linkmauve
Differential Revision: https://code.wildfiregames.com/D2487
This was SVN commit r23263.
2019-12-19 21:41:01 +00:00
Imarok 4171d62d1b Workaround for L3 cache detection of Ryzen 3000
This code is planned to get refactored or removed anyway, so just do a
cheap workaround.

Reviewed by: Imarok
Fixes: #4360
Differential Revision: https://code.wildfiregames.com/D2353
This was SVN commit r23262.
2019-12-19 16:52:47 +00:00
Imarok 72fc4105e2 Linting: Remove "no-lone-blocks" rule for ESLint
Lone blocks can help reading the code.

Patch by: Krinkle
Refs #5524
Differential Revision: https://code.wildfiregames.com/D2452
This was SVN commit r23261.
2019-12-19 16:38:30 +00:00
Imarok dd891f6193 Fix User Reporter worker thread always using a full CPU-Thread
Summary:
This bug was introduced in 62dd922bc0.
Fixed by not using the predicate of the `wait` command.
It was wrong and even if it was right it wouldn't be really usefull.

Reviewed by: Angen
Fixes: #5620

Differential Revision: https://code.wildfiregames.com/D2373
This was SVN commit r23259.
2019-12-18 17:19:56 +00:00
Stan 244bffa61b Remove some unused old helper images as they shouldn't be packaged.
This was SVN commit r23258.
2019-12-17 18:09:25 +00:00
Stan 4e6eead260 Remove a unused png file which is now out of date following the new helmets update by @Alexandermb
This was SVN commit r23257.
2019-12-17 16:07:25 +00:00
Stan 02759a90f9 Fix khopesh_norm.png being huge.
This was SVN commit r23256.
2019-12-17 16:00:12 +00:00
Stan 9b99eb46a0 Remove an unused billboard.
This was SVN commit r23255.
2019-12-17 15:56:51 +00:00
Stan 49f0a8c95b Remove transparency from metal mines with no alpha in textures. It saves one drawcall per object and around 300 polys per mesh. Add missing materials. Add native EOL fixes indent.
This was SVN commit r23254.
2019-12-17 13:54:19 +00:00
Stan 400c90c67d Remove transparency in fauna actors that do not need it. Add a no_trans_spec.xml material. + Native eol and some ident fix.
Noticed by: @vladislavbelov
This was SVN commit r23253.
2019-12-17 12:02:23 +00:00
wackyserious 8959ba2110 Texture Update: Carthaginian Units (Second part)
Thread:
​https://wildfiregames.com/forum/index.php?/topic/22630-committed-carthaginian-unit-textures/page/5/#comments

Reviewed by: Lordgood, Stan, Alexandermb, Sudiata, Genava55 and others
This was SVN commit r23252.
2019-12-17 08:48:42 +00:00
Itms 3af575abd0 Update the Jenkins scripts to match the current state, which uses Jenkins pipelines, Docker for reproductible build environments, and ZFS for space efficiency and robust incremental patching. refs #4419, refs #4312.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1910
This was SVN commit r23250.
2019-12-16 21:52:42 +00:00
Itms f5c142fde8 Put the Windows patch testing Jenkins pipeline, written by Angen, under source control.
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1946
This was SVN commit r23249.
2019-12-16 21:35:16 +00:00
Angen 9d0b4db973 Fix formation members not getting rotation correctly when IDLE
Set formation member rotation to the same angle as formation has when
member stays idle.

Differential Revision: https://code.wildfiregames.com/D2469
This was SVN commit r23248.
2019-12-16 20:38:10 +00:00
vladislavbelov b5bac2a2a2 Fixes overlay renderer on fixed render path, it was introduced in 14bfbbf9d4.
This was SVN commit r23247.
2019-12-16 18:45:03 +00:00
wackyserious 8640282220 Texture Update: Carthaginian Units
Thread:
https://wildfiregames.com/forum/index.php?/topic/22630-committed-carthaginian-unit-textures/page/5/#comments

Reviewed by: Lordgood, Stan, Alexandermb, Sudiata, Genava55 and others
This was SVN commit r23246.
2019-12-16 13:41:54 +00:00
Stan 0a584de3ce Correct the AI names in the maur.json civ file:
Aśoka was listed twice; kept the common English name Ashoka the
Great and removed Ashokavardhan
    Acharya was not a Maurya, therefore removed
    Bindusara was Chandragupta's son and Aśoka's father, therefore
listed second
    Corrected s into sh (ś) where necessary

Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2157
This was SVN commit r23245.
2019-12-16 11:42:24 +00:00
Stan 0540f5ebc6 Correct Greek specific names of structures.
Patch by: @Nescio
Translation by: @Nescio and "The European Castalia Society"
(@Anaxandridas ho Skandiates' team)

Thread:
https://wildfiregames.com/forum/index.php?/topic/25268-specific-name-review-structures/

Differential Revision: https://code.wildfiregames.com/D2228
This was SVN commit r23244.
2019-12-16 11:30:05 +00:00
Stan 14118a0835 Indicate vowel length in amphitheatre specific name.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2473
This was SVN commit r23243.
2019-12-16 11:16:52 +00:00
vladislavbelov b2665437fc Allow calling timer_DisplayClientTotals multiple times.
According to the `timer_DisplayClientTotals` comment 953d2621dd broke
correctness of `clients` after the function call.

Patch By: echotangoecho
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D812
This was SVN commit r23240.
2019-12-14 22:49:44 +00:00
Stan 6ada1d015d Allow modders to play an animation when objects with production queues are researching techs.
Reviewed by: @Angen
Comments by: @Krinkle, @bb
Thread:
https://wildfiregames.com/forum/index.php?/topic/27329-visual-feedback-for-researching/&tab=comments#comment-389598

Differential Revision: https://code.wildfiregames.com/D2459
This was SVN commit r23239.
2019-12-14 20:49:04 +00:00
Angen 5d777d4d64 Move hardcoded gain per garrisoned trader on ship to template
It removes hardcoded value from Trader.js to templates.
This change allows to have merchant ships among civilisations or one
civilisation itself which would give different bonus when garrisoned
traders.
Supports modifications to that value with technologies and auras.

Differential Revision: https://code.wildfiregames.com/D2106
This was SVN commit r23238.
2019-12-14 20:30:56 +00:00
Angen d0403bd3a8 Apply modifications to template values based on entity owner instead watching player
When observer selects some building he can see possible units to be
trained. Data about that templates are returned with id of observer what
means no technologies or bonuses for selected player have been applied
to the template. So observer does not see correct information in
tooltip.

Differential Revision: https://code.wildfiregames.com/D2054
Fixes: #5109
Tested by: Nescio
This was SVN commit r23237.
2019-12-14 20:10:32 +00:00
Angen 425fb6d93a Fix units not reentering FORMATIONMEMBER.IDLE when they are promoted or stopped
When unit is idle in formation and promoted, it enters INDIVIDUAL.IDLE
incorrectly.
When unit is moving as part of formation and formation is ordered to
stop, unit enters INDIVIDUAL.IDLE but should keep FORMATIONMEMBER.IDLE.

Differential Revision: https://code.wildfiregames.com/D2468
This was SVN commit r23236.
2019-12-14 15:47:26 +00:00
Angen df524c31d1 Do not allow minimum size drop to 0 because of population scale [Petra attack plan]
Petra reached maxed population and started spamming attack requests.
Reported at forum
https://wildfiregames.com/forum/index.php?/topic/27319-ai-chat-spamming/.

Cause of problem was that with given population scaling and current
rounding minimal requested size of units dropped to 0.
What leaded to allow to start without units because minimum count have
been reached.

This change requires at least one unit if minimum size is not 0 before
adjustment by pop scaling , what we need to not block attacks with
heroes or healers for example.

Now in case Petra is not able to produce units, aborts plan correctly.

Differential Revision: https://code.wildfiregames.com/D2462
This was SVN commit r23235.
2019-12-14 15:44:22 +00:00
vladislavbelov 2fa18b1503 Replaces direct Camera member usage by appropriate method call (m_Orientation > GetOrientation()).
This was SVN commit r23234.
2019-12-14 12:56:47 +00:00
Angen a7b7486dea Set correct animation variant for formation member when starts to move
Formation variants for members are not set correctly once they move
because their ranks changes but variants do not get updated.

This was SVN commit r23233.
2019-12-14 10:10:26 +00:00
Alexandermb 67a17a7a9d Fix healer "healing_m.dae" animation being unsync first and last frame.
Reported by @elexis in ca901415c7

This was SVN commit r23232.
2019-12-13 14:36:18 +00:00
vladislavbelov df329d1b81 Optimise out of frustum rendering of texture overlays.
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1847
This was SVN commit r23229.
2019-12-10 23:13:37 +00:00
vladislavbelov 6110d108c1 Removes hard-coded clip planes from water shader.
Differential Revision: https://code.wildfiregames.com/D2443
This was SVN commit r23228.
2019-12-10 21:39:09 +00:00
Stan 9391756294 Add a more explicit message when requested animation rig does not match rigged model.
Reviewed By: @Angen
Discussed With: @Alexandermb

Differential Revision: https://code.wildfiregames.com/D2447
This was SVN commit r23225.
2019-12-08 19:50:36 +00:00
Stan 2b9e125ee5 Fix missing arrow on top of the action-remove-guard.png icon.
This was SVN commit r23224.
2019-12-08 19:04:35 +00:00
Angen 3a79451638 ComputeMotionParameters correctly when formation member is added or removed
As noticed by @bb in
https://code.wildfiregames.com/D1727?id=7276#inline-38148 and found
issue in 4ee4f16793#inline-4563 ComputeMotionParameters is not called
correctly.

One problem is when merging twinformations, addMembers does not update
speed, so if one formation contains slowest unit and it is merged to
formation which does not, merged formation will move faster than it
should, the same problem applies if unit is added calling function from
outside of component.

Another problem is when from formation is removed slowest unit and has
rearrange set to false. Having speed computation after rearrange check
means formation is not going to move faster if slowest member is removed
by player or killed (but it will if player recreates formation manually)

Differential Revision: https://code.wildfiregames.com/D2449
This was SVN commit r23223.
2019-12-08 13:59:33 +00:00
Angen 4b8c82bbcb Allow to play different sound when building new structure and when repairing existing structure
Entities have different sound entries for build and repair orders in
templates but currently only one is used.
This patch is using build order for foundations and repair order for
anything else.
Also playing correctly order_build when placing new construction.

Differential Revision: https://code.wildfiregames.com/D2276
Fixes: #5374
Reviewed by: @Freagarach
This was SVN commit r23221.
2019-12-07 18:42:26 +00:00
Angen 0fa06de9b6 Refactor ColorActivateFastImpl function
Refactor function from 6fbce9c355, making it shorter, cleaner and easier
to read.


Differential Revision: https://code.wildfiregames.com/D2415
This was SVN commit r23220.
2019-12-07 18:17:08 +00:00
Angen f4562b87b6 Remove duplication of code from WaterManager
Use already defined function ReloadWaterNormalTextures with the same
code.
Fixes the TODO from 2d7d5b446d / aab15123f1

Differential Revision: https://code.wildfiregames.com/D2413
Reviewed By: @vladislavbelov
This was SVN commit r23219.
2019-12-07 15:32:47 +00:00
Angen 51bdba7045 Show progress bar when upgrading entities
9230c107c5 allows to apply animations on entity which is upgrading. This
is adding progress bar for upgrading entities.
Suggested by @wowgetoffyourcellphone in D2371#101856

Patch by: @Freagarach
Differentail Revision: https://code.wildfiregames.com/D2442

This was SVN commit r23218.
2019-12-07 13:40:40 +00:00
Angen 86acba17f0 Fix formation-walking infinite loop introduced in b807c39e6a
b807c39e6a Introduced a infinite loop in which formation members keep
receiving the order to formation walk to their proper position. This was
due to this.formationOffset is not deleted when member gets in offset
position, what means he recieved motion update and it was not because of
failure.

Patch by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D2424
This was SVN commit r23217.
2019-12-07 13:21:08 +00:00
Angen b10b193020 Fix idle unit not attacking nearest unit.
In 945d1ba2e6 checking for new targets have been moved to timer to be
executed in next turn, but los range updates were not changed, that
introduced side-effect, that was overlooked.
If unit in IDLE gets los range update, so potential target enters its
range, it will try to attack it. It is ok, if unit took into account all
units around before that, what in case timer have not been executed yet,
did not happen.

Fixing issue by introducing checks for unit being really idle.

Reported on forum:
https://wildfiregames.com/forum/index.php?/topic/27214-borg-expansion-pack-mod-implementation-in-0ad-alpha-24-release/&do=findComment&comment=387987

Patch by: @Freagarach
Differential Revision: https://code.wildfiregames.com/D2422
This was SVN commit r23216.
2019-12-07 13:01:42 +00:00
Stan aef0c3c13a Move Ogre3D GLSL Preprocessor to a third_party folder and restore its original name. Also restore the Wrapper name to reflect what it's wrapping and move it to renderer.
Reviewed by: @Angen
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D2338
This was SVN commit r23215.
2019-12-07 11:48:03 +00:00
Itms 57abe7a644 Fix the Atlas build in the Windows autobuilder pipeline, refs #5574.
Use the opportunity to fix some whitespace and to make the file name
consistent with Jenkins.

Patch by: Angen
Differential Revision: https://code.wildfiregames.com/D2021
This was SVN commit r23213.
2019-12-07 08:54:32 +00:00
Alexandermb c11fc6c0fc Add a missing group tag in ptolemies/camelry_archer_b_m.xml
Mentioned by @angen on 1fd64f0712

This was SVN commit r23210.
2019-12-06 19:28:47 +00:00
Alexandermb 1fd64f0712 Fix incorrect variant on camels based on the reports of 61b8a32ad5 Unrelated but mentioned there.
This was SVN commit r23209.
2019-12-06 18:04:13 +00:00
Angen a3941e8cca Fix UnitmotionFlying and implement CMessageMotionUpdate::FromJSVal
In 32e8ed51aa have been changed message from MotionChanged to
MotionUpdate and CMessageMotionUpdate::FromJSVal was not implemented to
reflect changes in message structure.
As a result UnitMotionFlying tries to send MotionChanged message which
not only was renamed, but sending it from js is not supported anymore.
Also reported at this thread:
https://wildfiregames.com/forum/index.php?/topic/27294-cheats-error/

Differential Revision: https://code.wildfiregames.com/D2450
Tested by: @gameboy
Tested on: Jenkins/vs2015, Jenkins/gcc6
Fixes: #5626

This was SVN commit r23208.
2019-12-06 17:36:25 +00:00
Stan 53d00a63bb Fix boar running animation broken in 9229ed6c42
Patch by: @Vido
This was SVN commit r23206.
2019-12-05 12:10:34 +00:00
Angen f1b07b2ff4 Remove forgot return from refactoring in 8446b92f1b
This was SVN commit r23205.
2019-12-04 18:42:01 +00:00
Stan 9119728bfc Fix boar walking animation broken in 9229ed6c42
Patch by: @Vido
This was SVN commit r23204.
2019-12-04 11:25:11 +00:00
Alexandermb e9179f0df8 Fix latest warnings mentioned by @Stan with checkref
This was SVN commit r23202.
2019-11-29 13:45:07 +00:00
Alexandermb f4fe197d04 Ops this didn't belong here.
This was SVN commit r23200.
2019-11-29 03:00:50 +00:00
Alexandermb 5f5f0af6f4 Sync horse trader death.
Fix Concern raised in P23195

Cart helmets not committed before.

This was SVN commit r23199.
2019-11-29 01:57:59 +00:00
Alexandermb 3b7b04d001 Replace "horse_base" with "base"
Avoiding redundance with name since folder already represents the whole
horse props

This was SVN commit r23198.
2019-11-28 22:16:26 +00:00
Alexandermb 0c7c70c5b9 Remove an empty space on some capes.
Standarize pers neckguard for work with all cavalry variants.

Fix a wrong variant in persian cavalry archer

Fix a wrong animation in archer variants.

This was SVN commit r23197.
2019-11-28 22:14:19 +00:00
Alexandermb b984590095 Remove Unused Capes
Following 61b8a32ad5

This was SVN commit r23196.
2019-11-28 21:51:56 +00:00
Alexandermb 61b8a32ad5 Horse actors and variants cleaning.
New animations:

New Walking animation.
New Death animation.
New Attacking animation.
New Idle animation.
New Promotion animation.
New riders animations.

Remove unnecesary duplicated files.

Standarize capes for easier usage.

This patch allows horses to use multiple walking animations whitout
duplicating props such hair or blankets.

This was SVN commit r23195.
2019-11-28 21:38:21 +00:00
elexis 1453c51cb6 Fix warning about attempted empty batch train occurring if g_BatchTrainingEntityAllowedCount % batchedSize == 0, refs #1432, #4059, 7e21db08d5, 2735494a92, 2e3ac4cf20, fixes #5602, reported by nani, reproduced by faction02.
This was SVN commit r23192.
2019-11-25 20:59:21 +00:00
elexis 5d2c20beb0 Replace boost::unordered_map, boost::unordered_set with std::unordered_map, std::unordered_set to establish consistency.
Replace boost::hash_combine with a lib/hash.h hash_combine performing
the same statement.
Replace inconspicuous global boost hash_value specializations with
std::hash specializations.
No performance difference was observed in three simple MeshManager
measurements.

Remove unused TAG_MASK and h_tag in h_mgr.cpp following 0748c5a75e.
Replace typedef with using keyword and sort header includes.

Differential Revision: https://code.wildfiregames.com/D2441
Tested on: clang  9.0.0, gcc 9.2.0, Jenkins/vs2015, Jenkins/gcc6

This was SVN commit r23191.
2019-11-25 14:30:25 +00:00
Stan acbfd21992 Remove cape redundant props.
Authored by: @Angen
Reviewed by: @Stan
Differential Revision: https://code.wildfiregames.com/D2434
This was SVN commit r23187.
2019-11-24 16:37:37 +00:00
Stan ec12025304 Add an orange firefly particle actor.
This was SVN commit r23186.
2019-11-24 16:31:11 +00:00
Stan 9230c107c5 Allow artists to add upgrade animations.
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D2371
This was SVN commit r23185.
2019-11-24 11:34:57 +00:00
elexis 52f282a7e1 Move CGUI constructor to the top of its file following 5cc814759f.
Move object type definitions to own file, since CGUI doesn't use the
GUIObject types otherwise and for similarity with GUISettingTypes,
making it slightly easier to maintain and read.

Differential Revision: https://code.wildfiregames.com/D2439
Tested on: clang 9.0.0, Jenkins/vs2015, Jenkins/gcc6

This was SVN commit r23184.
2019-11-24 10:26:48 +00:00
LordGood 427b975fdf Simplified double tower garrison classes with Freagarach's suggestion
This was SVN commit r23183.
2019-11-24 09:21:17 +00:00
elexis c8a00adfd2 Add Balancing credits, refs #5444.
This allows merging community balancing patches without giving them
false or no credit.

Differential Revision: https://code.wildfiregames.com/D2436
Comments By: Stan
This was SVN commit r23182.
2019-11-23 15:45:12 +00:00
elexis da4c733c8c Add some missing historic credits, refs #5444.
Excerpt from Differential Revision https://code.wildfiregames.com/D2436
Comments By: Stan
This was SVN commit r23181.
2019-11-23 15:37:31 +00:00
elexis 4ff0320980 Split credits for "miscellaneous" categories into a Community and a History credits sections.
Use whitespace in accordance with global CodingConventions for these
files while at it.

This was SVN commit r23180.
2019-11-23 15:02:43 +00:00
LordGood 14bd613288 Amphitheater name fix, Gladiator commit and amphitheater integration, Maurya double towers, ptolemaic sentry tower actor update
maurya towers
https://wildfiregames.com/forum/index.php?/topic/27156-artillery-towers/page/2/&tab=comments#comment-388537

This was SVN commit r23179.
2019-11-23 13:26:05 +00:00
Stan 89f6205d94 Rename a dds file to use the proper extension.
Noticed by: @linkmauve when trying to compress the textures to save
space.

This was SVN commit r23178.
2019-11-23 10:03:14 +00:00
Gallaecio f7c639a79e remove "Goods" from trade window stings
Summary: Resources should be referred to as “Resources”, not as “Goods”.
This patch updates the Barter & Trade window to reflect that.

Test Plan: Check for mistakes and omissions.

Reviewers: O8 JS GUI, Gallaecio

Reviewed By: Gallaecio
Subscribers: elexis, Krinkle, bb, O8 JS GUI

Differential Revision: https://code.wildfiregames.com/D2306
This was SVN commit r23177.
2019-11-23 08:26:05 +00:00
Gallaecio 3968760129 Single Player → single-player
Summary:
Single-player is proper English, single player and singleplayer are less
correct.
(Contrary to multiplayer, which doesn't have a hyphen or space.)

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Freagarach, elexis, O8 JS GUI

Differential Revision: https://code.wildfiregames.com/D2312
This was SVN commit r23176.
2019-11-23 08:10:36 +00:00
elexis 27a949a1ea Rename Lobby.js to LobbyHandler.js to avoid filename conflict with lobby.js on case insensitive filesystems/APIs following 2cccd9825d/D2412, reported by Stan.
This was SVN commit r23173.
2019-11-21 18:22:37 +00:00
elexis 2cccd9825d Rewrite lobby page to use class semantics, add more gamedetails labels, improve performance using batch processing and caching and gain possibility for game creation/player-join/leave events, refs #5387.
Game selection details features:
* Display victory conditions following their sending but missing display
following bffe917914, refs 7b0f6f530c.
* Display the host of the match and the game name in the selected game
details following 61261d14fc, refs D1666.
* Display mods if the mods differ (without having to attempt to join the
game prior) following eca956a513.

Performance features:
* Implement batch message processing in the XmppClient to rebuild GUI
objects only once when receiving backlog or returning from a match.
* Implement Game class to cache gamelist, filter and sorting values, as
they rarely change but are accessed often.
* Cache sprintf objects.

Security fixes:
* Add escapeText in lobby/ to avoid players breaking the lobby for every
participant, supersedes D720, comments by bb.
* Do not hide broadcasted unrecognized chat commands that mods used as
leaking private channels, fixes #5615.

Defect fixes:
* Fix XmppClient.cpp storing unused historic message types resulting in
memory waste and unintentional replay of for instance
disconnect/announcements messages following both e8dfde9ba6/D819 and
6bf74902a7/D2265, refs #3306.
* Fix XmppClient.cpp victoryCondition -> victoryConditions gamesetup.js
change from 6d54ab4c1f/D1240.
* Fix leaderboard/profile page cancel hotkey closing the lobby dialog as
well and removes cancel hotkey note from lobby_panels.xml from
960f2d7c31/D817 since the described issue was fixed by f9b529f2fb/D1701.
* Fix lobby playing menu sound in a running game after having closed the
lobby dialog following introduction in 960f2d7c31/D817.
* Fix GUI on nick change by updating g_Username.
* Update profile panel only with data matching the player requested.

Hack erasure:
* Object semantics make it cheap to add state and cache values, storing
literals in properties while removing globals, adding events while
decoupling components and gaining moddability.
* Erase comments and translation comments stating that this would be
IRC!!, supersedes D1136.
* Introduce Status chat message type to supersede "/special" chat
command + "isSpecial" property from bffe917914 (formerly g_specialKey
e6840f5fca) deluxe hack.
* Introduce System chat message type to supersede system errors
disguising as chat from a mock user called "system".

Code cleanups:
* Move code from XML to JS.
* Move size values from JS to XML, especially following 960f2d7c31/D817
and 7752219cef/D1051.
* Rename "user" to "player".
* Fix lobby/ eslint warnings, refs D2261.
* Remove message.nick emptiness check from 0940db3fc0/D835, since
XEP-0045 dictates that it is non-empty.
* Add translated string for deleted subjects.
* Add TODOs for some evident COList issues, refs #5638.

Differential Revision: https://code.wildfiregames.com/D2412
This was SVN commit r23172.
2019-11-21 13:44:41 +00:00
Stan d9e34fc88e Fix c26d36c65c
This was SVN commit r23171.
2019-11-20 19:53:51 +00:00
Stan c26d36c65c Remove bow from praise animation and display helmets as for other gather animations
Patch by: @Angen
Differential Revision: https://code.wildfiregames.com/D2435
This was SVN commit r23170.
2019-11-20 19:40:05 +00:00
Alexandermb 9b07c6bf44 Fix Carnyx mesh folder on actors
This was SVN commit r23169.
2019-11-20 17:44:44 +00:00
Stan 075bcd0ce4 Fix Carthaginian polybolos not shooting fire projectiles. Also fix another variant.
Patch by: @Angen
Reviewed by: @Stan
Differential Revision: https://code.wildfiregames.com/D2433
This was SVN commit r23168.
2019-11-20 13:18:36 +00:00
Alexandermb 5b17a3573a Celtic Carnyx + some animations.
This was SVN commit r23167.
2019-11-18 19:44:39 +00:00
Alexandermb af41aa3e06 Gladiator Helmets
Hoplomacus.
Murmillo.
Secutor.

This was SVN commit r23166.
2019-11-18 19:20:24 +00:00
Alexandermb 3c25bc6c54 Archers animation adjusment on attack_ranged
Replaced bow armature to avoid possible bugs with any other new armature
in future.

This was SVN commit r23165.
2019-11-18 19:16:47 +00:00
Alexandermb 60f71cd7f2 Move leg positions on elephant idles to give a more natural look.
This was SVN commit r23164.
2019-11-18 19:01:18 +00:00
Alexandermb 2837d48878 Replace asian elephants on carthaginian units by African Forest as discussed in the thread: https://wildfiregames.com/forum/index.php?/topic/26967-something-on-elephants/&tab=comments#comment-384561
This was SVN commit r23163.
2019-11-18 18:25:27 +00:00
LordGood e96af27463 lol let a mod file slip through again
This was SVN commit r23161.
2019-11-18 05:53:47 +00:00
LordGood d4db7d2e0b Bolt tower and ampitheater commit, updated ptolemaic sentry tower while I was at it, and radiant flame texture added for directionless fire effects, babylonian tower template switched to persian denomination for potential upgradeability
https://wildfiregames.com/forum/index.php?/topic/27156-artillery-towers/page/2/&tab=comments#comment-388362
https://wildfiregames.com/forum/index.php?/topic/27230-pompeii-ampitheater/&tab=comments#comment-387990

This was SVN commit r23160.
2019-11-18 01:12:41 +00:00
LordGood e0393304c2 Give the Macedonian defense towers the ability to upgrade into artillery towers
This was SVN commit r23159.
2019-11-16 17:25:26 +00:00
elexis 5a691463a3 Update sprintf.js library from 1.0.2 to 1.1.2.
Includes a changeset that removes a SpiderMonkey segfault from occurring
(when passing an XmppClient JS::Heap or JS::PersistentRooted GUIMessage
following 9023f4bebb), refs #5636.
https://bugzilla.mozilla.org/show_bug.cgi?id=1234425
https://bugzilla.mozilla.org/show_bug.cgi?id=1238475
https://github.com/alexei/sprintf.js/commit/61c795624204883948c0e19f8af208f5359e6fdb

sprintf.js commits that add new features:

padding (intent) support:
https://github.com/alexei/sprintf.js/commit/9e846915e273ebeb12b4decc59af94d596e5ee92

Adds support for the %g placeholder
g — yields a float as is; see notes on precision above
https://github.com/alexei/sprintf.js/commit/a60a5705fcb589b55373b1f15f2b4b5b5892f19c

Adds type option
T — yields the type of the argument1
https://github.com/alexei/sprintf.js/commit/c31c24ecefe92abff04fc38f860ad50c97bebf62

Adds support for the %t (boolean) type specifier
t — yields true or false
https://github.com/alexei/sprintf.js/commit/b92b530c7a4c6ef98632339e05cdea8a041da857

Adds support for returning primitive values through the %v specifier
v — yields the primitive value of the specified argument
https://github.com/alexei/sprintf.js/commit/f18037240bbbc7d53ede6be9a1d7bc964a75e309

The other commits clean sprintf internals and do not change the existing
formats, see:
https://github.com/alexei/sprintf.js/blob/1.0.2/src/sprintf.js
https://github.com/alexei/sprintf.js/blob/1.1.2/src/sprintf.js
https://github.com/alexei/sprintf.js/blob/1.1.2/README.md

Differential Revision: https://code.wildfiregames.com/D2421
Tested by: Angen
This was SVN commit r23157.
2019-11-14 13:00:35 +00:00
Alexandermb 9809598224 Remove ready variant from infantry_spearman_e.xml of the roman faction.
This was SVN commit r23156.
2019-11-13 22:54:45 +00:00
Stan 23f31aa1fe Show helmets when doing citizen duty as it sometimes confused players. Remove unused baskets, and show helmets. Also hide bows.
Discussed with: @Lordgood @Alexandermb
Authored by: @Angen
Differential Revision: https://code.wildfiregames.com/D1959
This was SVN commit r23155.
2019-11-13 21:57:19 +00:00
Stan b1f25e2879 Fix typo in particle actor.
This was SVN commit r23154.
2019-11-13 07:25:14 +00:00
Alexandermb a536cbac9e Additional attack_ranged variants for capes whitout projectiles props avoiding unnecesary draw calls.
This was SVN commit r23152.
2019-11-13 03:15:56 +00:00
elexis 92cbcf85e5 Rename CProgressBar numeric "caption" setting to "progress" to distinguish it from the Button, Input, Text and Tooltip "caption" setting values that are tag-formatted texts.
Remove TODO question from c4684effb6 since the class updates correctly.

Differential Revision: https://code.wildfiregames.com/D2419
Tested on: clang 9.0.0, Jenkins/gcc6, Jenkins/vs2015

This was SVN commit r23151.
2019-11-12 16:53:19 +00:00
elexis c16eddaedc Rewrite loading screen to use class semantics, refs #5387.
Add config option to display the loading screen stage description.
Add tip functions for future use, refs D1730.
Harmonize coordinates.

Differential Revision: https://code.wildfiregames.com/D2418
This was SVN commit r23150.
2019-11-12 15:54:09 +00:00
elexis 235e238f9d Fix 34ce0f865d resetting the cursor after calling the GUI pages script "init" function, refs #539.
Reset the cursor everytime the GUI page is opened, therefore also when
hotloading.

The init function shall be able to determine a cursor, such as already
present in the loading screen.

Differential Revision: https://code.wildfiregames.com/D2417
Tested on: clang 9.0.0, Jenkins/gcc6, Jenkins/vs2015

This was SVN commit r23149.
2019-11-12 14:43:58 +00:00
Alexandermb aca8b9fffc Small typo on the recent committ
Following: 2531c22b73

This was SVN commit r23148.
2019-11-12 00:19:05 +00:00
Alexandermb 2531c22b73 Remove props from cape variants by adding cape specific variants.
Following: 80e13ea74a

Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-committed-animations-re-export-and-unit-meshes-fix/page/29/&tab=comments#comment-387955

This was SVN commit r23147.
2019-11-12 00:15:23 +00:00
LordGood 20df0a8b54 Broke a thing, tweaked artillery tower projectile gravity
This was SVN commit r23146.
2019-11-11 16:03:31 +00:00
Stan 22f659b66e Improved particle effects for the artillery towers. New shrapnel texture by Lordgood
Reviewed by: @Lordgood
Thread:
https://wildfiregames.com/forum/index.php?/topic/27223-task-improve-artillery-tower-particles/

This was SVN commit r23145.
2019-11-11 15:03:52 +00:00
LordGood 662127fc56 Sound and gravity commit, hungarian oaks too. Keep your eyes and ears open for potential errors while playtesting
https://wildfiregames.com/forum/index.php?/topic/27220-differentiating-unit-sounds/&tab=comments#comment-387731
https://wildfiregames.com/forum/index.php?/topic/25431-task-trees/page/14/&tab=comments#comment-387445

This was SVN commit r23144.
2019-11-11 11:14:50 +00:00
Stan 4ba6620486 New bluefin tuna mesh and shoal.
Model by @Micket, textures and animations by @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/19259-task-tuna/&tab=comments#comment-387925
https://wildfiregames.com/forum/index.php?/topic/23840-gaia-animals/

This was SVN commit r23143.
2019-11-11 10:04:49 +00:00
Alexandermb d3cc5523ae New animations for Slingers and Archers.
Split capes for ranged infantry for avoid unsync while attacking.

Remove unused javelinist variant since theres no difference between
shield and shieldarm.

Several tweaks to jog animations such lowering foots for make it look
more jogging and less running.

This was SVN commit r23141.
2019-11-10 14:14:22 +00:00
elexis 6a97c59c67 Change CGUIManager::SendEventToAll to send to all GUI pages.
Notably enables processing of GuiInterface messages when dialogs are
opened.

Differential Revision: https://code.wildfiregames.com/D2408
Tested on: clang 9.0.0, Jenkins/vs2015

This was SVN commit r23138.
2019-11-06 00:30:18 +00:00
elexis 992d740a58 Delete dead "chat" simulation command, "chat" GUIInterface notification type, "aichat" NetClient message and useless "debug-print" simulation command.
The "chat" simulation command and according GUIInterface notification
became unused which translated simulation chat messages ("aichat") in
7afe0afbca.
That commit also introduced the "aichat" network message parsing code
that is never triggered since the NetClient never creates messages of
that type.
The "debug-print" command introduced by 1c0536bf08 sends a GUI value to
the simulation and prints it to the log, which is already covered by the
JS console since e4fe4ed602.

Differential Revision: https://code.wildfiregames.com/D2407
This was SVN commit r23137.
2019-11-05 22:35:37 +00:00
elexis 570891e362 Fix session quickload taking ownership of frozen objects by providing a clone following 003d588d13/D2302 and a report by minohaka.
Differential Revision: https://code.wildfiregames.com/D2406
Tested on: gcc 9.2.0, Jenkins

This was SVN commit r23136.
2019-11-05 14:24:24 +00:00
Alexandermb 403784966e New Roman Republican and Imperial Shields.
Thread:
https://wildfiregames.com/forum/index.php?/topic/27118-task-civ-rome-scutum/

Including:

New Roman Republic shields:

Generic: 4
Hastatii: 13
Triarii: 14

Imperial: 4
Marian: 2
Centurion: 1
Praetorian: 1

Itallic Allies: 5

New Scutum Bosses:

7 New Bosses for match the roman equipment.

New feature: Shield Damage Over time; Shield have 3 textures that will
be used while the entity is getting damage.

Adjusments:

Adjusted the roman infantry template to enable the health variant over
shield.

Adjusted the testudo formation animations to match the new shields size
and positions.

Adjusted the base_swordsman variants to avoid cape going out of sync
while walking.

This was SVN commit r23134.
2019-11-04 21:15:50 +00:00
LordGood 8df87d3e58 arty tower icon element looks more like catapult stones than cannonballs
This was SVN commit r23132.
2019-11-04 16:53:18 +00:00
Alexandermb cbbb08759a Assign greaves to thracian black cloak and seleucids/infantry_swordsman_e.xml.
Texture used by both thracians swordsman have greaves, however they
didn't had any of the new greaves meshes.

This was SVN commit r23130.
2019-11-03 23:44:26 +00:00
Alexandermb f7b1e2903c Add 5th attack animation for keep sync with cape.
Following 80e13ea74a

This was SVN commit r23129.
2019-11-03 23:43:15 +00:00
Alexandermb a1f3d9bf73 Fix warning messages mentioned by @stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-committed-animations-re-export-and-unit-meshes-fix/page/28/&tab=comments#comment-387360

This was SVN commit r23128.
2019-11-02 14:34:42 +00:00
Alexandermb 03e07ed0a8 Fix of variants following 80e13ea74a
This was SVN commit r23127.
2019-11-02 04:25:42 +00:00
Alexandermb 67f9f225e5 Helmets miscelaneous fix:
celt_foret.dae Rotation as requested by @stan.

hele_crest_pilos_hair_a.dae fix a wrong model in the pilos crest hair.

This was SVN commit r23126.
2019-11-02 04:22:33 +00:00
Alexandermb 2a5b53ac41 Remove unused variant.
Following 80e13ea74a

This was SVN commit r23125.
2019-11-02 03:56:55 +00:00
Alexandermb 80e13ea74a Standarize Capes for make them easier to handle.
Capes now works as blankets does for horse, capes actors no longer need
to be duplicated in order to work with a different variant actor such
swordsman or spearman, in this case capes gather together all the
availabe variants into a single actor.

Remove unused variants and rename for a better name consistency.

Remove shieldsmall animations from swordsman folder since this no longer
makes a difference on the animations.

This was SVN commit r23124.
2019-11-02 03:55:00 +00:00
wackyserious b9956629cf Texture Update: Gallic Tunics (Basic rank)
Thread:
https://wildfiregames.com/forum/index.php?/topic/27189-task-gallic-tunic-textures/&tab=comments#comment-387337

General Discussion:
https://wildfiregames.com/forum/index.php?/topic/23002-task-celtic-unit-textures/&do=findComment&comment=366508

Reviewed by: Stan, Alexandermb, Geneva, Sundiata and several community
members.

This was SVN commit r23123.
2019-11-02 02:51:48 +00:00
Alexandermb b6e5d691e3 Several new animations and adjusments:
10 New Animations:

* 2 Spearman
* 8 Swordsman

6 Adjusted:

* 1 Hoplite
* 5 Swordsman

Actors adjusments:

New variant applied for ptol infantry spearman
Variants assignment for the rest of actors.

This was SVN commit r23122.
2019-11-02 01:21:17 +00:00
Alexandermb 3d73816ba2 New Ptol Spearman animations:
Including:

New idles Relaxed (5).

This was SVN commit r23121.
2019-11-02 01:06:33 +00:00
wackyserious 367e60ce1a Texture Update: 1.) Ptolemaic Thureophoroi (Melee) - Elite Rank 2.) Ptolemaic Royal Agema
Thread:
https://wildfiregames.com/forum/index.php?/topic/27188-committed-ptolemaic-thureophoroi/

General Discussion:
https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-general-thread/&do=findComment&comment=387296

Reviewed by: Stan, Alexandermb and several community members
This was SVN commit r23120.
2019-11-01 23:50:09 +00:00
wackyserious 7c21b8b056 Texture Update: Athenian Hoplite (Advanced rank)
General Discussion:
https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-general-thread/&do=findComment&comment=386588

Reviewed by: Stan
This was SVN commit r23119.
2019-11-01 23:36:45 +00:00
elexis 7e081b555f TimeNotificationOverlay and Ambient class, refs #5387.
Notice TimeNotificationOverlay.xml must be included after
PauseOverlay.xml, otherwise there will be a Z/transparency bug, see
D148.

This was SVN commit r23117.
2019-10-30 14:39:44 +00:00
elexis 205dba32c7 Cheats GUI container class, refs #5387.
This was SVN commit r23116.
2019-10-30 14:06:27 +00:00
elexis 6b573d9249 Move session network status overlay to a separate class, refs #5387 and fix pause hotkey disabling for non-hosting observers following e3f43f6352/D2378.
This was SVN commit r23115.
2019-10-30 13:48:27 +00:00
elexis bc6da5e3f2 SessionMessageBox class, refs #5387.
Decouples events from event handling, removes implicit-pause duplication
per messagebox and allows mods to modify message box values.

Differential Revision: https://code.wildfiregames.com/D2398
Comments By: Stan, Freagarach
This was SVN commit r23114.
2019-10-30 11:14:55 +00:00
elexis 3617689230 Fix performance improvement (50 microsec/call) valuesetting missing in 38e06fce7e/D2391, reported by Stan in 1348c936b1.
This was SVN commit r23113.
2019-10-30 10:35:36 +00:00
elexis 1348c936b1 Fix FPS/realtime/matchtime/ceasefire overlay counter visibility following 38e06fce7e/D2391 when starting with all counters disabled or starting a match with ceasefire disabled but ceasefire counter enabled, reported by Polakrity.
This was SVN commit r23112.
2019-10-29 16:28:36 +00:00
Alexandermb f615b71c30 Remove unused variant following e1d6acf008
This was SVN commit r23110.
2019-10-28 19:08:08 +00:00
Alexandermb a89ad97898 Rename the remaining files after 210121d09a
Art_Naming Convention
https://trac.wildfiregames.com/wiki/ArtFileNamingConventions

Remove two unused variants:

attack_melee_hoplite.xml

attack_melee_swordsman_shieldarm.xml

This was SVN commit r23109.
2019-10-28 18:53:11 +00:00
Alexandermb 20edc5e45d Remove idle_relax_long in base_spearman_shield_relax.xml variant.
This was SVN commit r23108.
2019-10-28 15:54:28 +00:00
Alexandermb 210121d09a Rename animations based on Art_Naming Convention https://trac.wildfiregames.com/wiki/ArtFileNamingConventions
Requested by @Stan

This was SVN commit r23107.
2019-10-28 15:52:35 +00:00
Alexandermb e1d6acf008 New Celt Spearman animations:
Including:

New idles Relaxed (6).

New naming convention following Art_Naming Convention
https://trac.wildfiregames.com/wiki/ArtFileNamingConventions

Also included a fix in the attack hoplite variant.


Renaming _Gaul to _Celt since this animations gonna be used by both
factions (Gaul/Brit)

Added variant for the ptolemaic galatians

This was SVN commit r23106.
2019-10-28 15:14:10 +00:00
elexis 64bae4328e Toggle mainmenu submenus instead of opening the same submenu on repeated clicks.
This was SVN commit r23105.
2019-10-28 13:55:54 +00:00
elexis 7b9b9d5dd5 Revert session z="0" removal in 702cdbf0c7/D2292, since the value of the "default" style value for "z" is overwritten by CGUI::Xeromyces_ReadObject and since these session/ z values are necessary for correct display, refs 31a2dd294e.
This was SVN commit r23104.
2019-10-28 12:50:30 +00:00
elexis f7161ad5c6 Support deleting GUI Object event handlers following af9c336b43, refs #5387.
Differential Revision: https://code.wildfiregames.com/D2395
Reported by: nani
Tested on: gcc 9.2.0, Jenkins/vs2015

This was SVN commit r23103.
2019-10-28 11:35:04 +00:00
Alexandermb 8061bd360f New Hoplite animations:
Including:

Replace idles Relaxed (7) (Before 8).
New idle Ready (2).
New naming convention following Art_Naming Convention
https://trac.wildfiregames.com/wiki/ArtFileNamingConventions

Also included a fix in the elephantry/turret_idle.xml variant.

This was SVN commit r23101.
2019-10-27 15:54:14 +00:00
Alexandermb fa01d4ff32 Fix warnings mentioned by @stan in this thread:
https://wildfiregames.com/forum/index.php?/topic/26012-committed-animations-re-export-and-unit-meshes-fix/page/26/&tab=comments#comment-387068

This was SVN commit r23100.
2019-10-27 15:20:51 +00:00
Alexandermb 7dc64ecf9f New pikeman animations:
Including:

* New idles Relaxed (7).
* New idle Ready (1).
* New Attacking Animations (3) as well as improvement of the first one.
* New naming convention following Art_Naming Convention
https://trac.wildfiregames.com/wiki/ArtFileNamingConventions

Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-committed-animations-re-export-and-unit-meshes-fix/page/26/&tab=comments#comment-387021

This was SVN commit r23099.
2019-10-27 14:34:29 +00:00
elexis ece4a323eb Fix wrong playerID used for the controlAll developer overlay option in 96a6a136b6/D2383.
Reported By: Freagarach
This was SVN commit r23098.
2019-10-27 14:15:56 +00:00
elexis 3aa4ac7b00 Fix Atlas complaining again, this time for the objectives dialog from e3f43f6352, refs 966b1608da.
The atlas check added in e3f43f6352 works for skirmish maps but not for
random maps generated in Atlas.
The same atlas check added in f2778ea7b4 works for random maps since the
partial information Atlas provides happened to be sufficient for
DiplomacyPlayerText.

Reported by Stan in 6814a983e1.

This was SVN commit r23097.
2019-10-27 13:40:11 +00:00
elexis 38e06fce7e Rewrite FPS/Realtime/Gametime/Ceasefire counters to use object semantics using class notation, refs #5387.
Rebuild the counters every 250ms instead of every frame and minimize
object creation.

Differential Revision: https://code.wildfiregames.com/D2391
Comments By: Stan
This was SVN commit r23096.
2019-10-27 12:39:28 +00:00
LordGood abe2ec9c75 deleting broken template that slipped through
This was SVN commit r23095.
2019-10-27 08:52:41 +00:00
LordGood 21106e011f Artillery tower master commit, Keep your eyes open for errors, everything's good on my end but my subversion is filthy
This was SVN commit r23094.
2019-10-26 16:42:35 +00:00
elexis 0ce0340bf5 Small mainmenu style cleaup following adf448db4d/D2240, refs #5387.
Add class MainMenuPage, BackgroundLayer, remove duplication of XML size
values in the MainMenuItemHandler,
remove onTick assignment from XML, replace references to globals with
local references.

Differential Revision: https://code.wildfiregames.com/D2390
Comments By: Stan
This was SVN commit r23093.
2019-10-26 13:30:26 +00:00
Alexandermb 8b17110dfc New gaul idles for swordsman and new pikeman attacking animations.
This was SVN commit r23092.
2019-10-25 13:23:12 +00:00
elexis 3fc18b9be3 Make options page agnostic of session page and implement RangeOverlayManager GUI class, refs #5387, #4747.
Avoids further session commits that missed to keep options.json session
code in sync,
enables use of anonymous or object owned config callback handlers and
encourages session developers to make the GUI more reactive to changing
options.

Update RangeOverlays when reseting to default, and update
RangeOverlays of selected entities upon closing the page too (not only
hotkey).

Differential Revision: https://code.wildfiregames.com/D2389
This was SVN commit r23091.
2019-10-25 11:56:20 +00:00
elexis b859195064 Decouple panel entities code from session code and use class notation, refs #5387, #3000, #1902, #1802, d7d1d8ccb5.
Change the logic to only insert/delete buttonhandlers on ownershipchange
and update only the entitystate dependent part on simulation update.

Differential Revision: https://code.wildfiregames.com/D2387
This was SVN commit r23089.
2019-10-22 17:53:22 +00:00
elexis 688a2a00a8 Move researched tech progress overlay to a separate file, use class notation, refs #5387.
Improves performance if no techs are researched from 200 to 50
microseconds per turn (from 500 to 300 microseconds for one tech etc).

Differential Revision: https://code.wildfiregames.com/D2386
This was SVN commit r23088.
2019-10-21 23:05:04 +00:00
elexis ba993d4610 Refactor session lobby bot client code to use object orientation, refs #5387.
Adapt rating score for exploration score and add comment to keep
calculateExplorationScore and calculateScoreTotal in sync following
be881dc420 (following the formula in a4f27dc3e0 and bffe917914 being
otherwise in sync with the summary screen measures), refs #686.
Adapt rating score for captured entities and add comment to keep
calculateMilitaryScore in sync following f60befe098, refs #3216,
ad27deeb9d.
Adapt rating score for trade and vegetarian food and add comment to keep
calculateEconomyScore in sync following 202e567492/D494 and
215a102c27/D1052, refs #3948.
Remove ceasefire sending from the client from d21c0026ec since the bot
doesn't record it and since ceasefire time is expected to be 0 after a
1v1 was decided, refs #2749.
Resolve column value computation fragmentation and remove unneeded
intermediary object encoding following 1d3ac14d35, refs #686.
Remove hardcoding/duplication of unit and structure classes and send
domesticUnitsTrained too, refs c7a04e219b/D2384.
Move session code including the two globals to a separate folder so as
to maximize separation of and ease distribution without lobby code.
Migrate useless ugly trailing commas from bffe917914, to be removed in a
patch modifying the bot code.

Differential Revision: https://code.wildfiregames.com/D2385
This was SVN commit r23087.
2019-10-21 15:00:59 +00:00
elexis c7a04e219b Remove hardcoding and quadruplication of the StatisticsTracker unit and building classes following 1d3ac14d35, refs #686.
Amongst other issues encountered in the lobby ranking session statistics
reporting, refs #5387, D2385, bffe917914.
Correct test case from 59e7320a49/D1305.

Differential Revision: https://code.wildfiregames.com/D2384
Comments By: Freagarach
This was SVN commit r23086.
2019-10-21 08:48:17 +00:00
Stan 3791748a32 New Elm trees.
Art by: @BigTiger
Reviewed and adapted by: @Stan
This was SVN commit r23085.
2019-10-21 06:36:16 +00:00
Stan cf64aa4304 New lavender actors.
Thread:
https://wildfiregames.com/forum/index.php?/topic/25431-task-trees/page/13/

This was SVN commit r23084.
2019-10-20 20:52:34 +00:00
Gallaecio 6ca05322e0 Rephrase the tooltip of Reload Cache to avoid confusion
Summary: The action is Reload Cache, but the tooltip used to say Rebuild
instead of Reload, which caused some confusion among translators
(https://www.transifex.com/wildfire-games/0ad/translate/#sv/$/113848525),
and hence could have the same effect among users.

Test Plan: No tests, only user-visible strings are affected.

Reviewers: Imarok

Reviewed By: Imarok
Differential Revision: https://code.wildfiregames.com/D2294
This was SVN commit r23083.
2019-10-20 11:20:44 +00:00
Gallaecio a0d6bd8e91 list heroes after champions and correct some structure tooltips
Summary: This patch lists heroes after champions in structure production
queues and corrects some structure tooltips.

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Freagarach, wraitii

Differential Revision: https://code.wildfiregames.com/D2324
This was SVN commit r23082.
2019-10-20 10:57:26 +00:00
elexis 96a6a136b6 Rewrite developer overlay to use class syntax, one class per checkbox, a class for the EntityState overlay and TimeWarp debug feature, refs #5387.
Using 22 classes instead of 1 class (refs 2bcf4f678b/D1928) leverages
more benefit of the paradigm.
In particular it means the checkboxes can own the EntityState and
TimeWarp helpers and the DeveloperOverlay itself can remain independent.
Improve performance by 200 microseconds per turn by unsubscribing from
onSimulationUpdate when the developer overlay is not opened, refs
e3f43f6352 / D2378.
Move TimeWarp from input.js from 8ddef2fee0 to independent class using
hotkey release event from 78bc56f33e, refs #3194.

Differential Revision: https://code.wildfiregames.com/D2383
This was SVN commit r23081.
2019-10-19 00:26:34 +00:00
elexis 6ec5855136 Rewrite session menu code to use object orientation, finish off menu.js, refs #5387, adf448db4d / D2240.
Add tooltips for buttons that can be triggered with hotkeys.
Unassign menu animation onTick function after the animation finished,
refs 9a00398e24.
Cleans unused openMenu following 5aae5ee55a.

Differential Revision: https://code.wildfiregames.com/D2380
This was SVN commit r23080.
2019-10-18 14:11:43 +00:00
Alexandermb 0f581e4398 Prepare some animations for the upcoming new shields "Roman Scutum".
Add a new ready variant animations.

This was SVN commit r23079.
2019-10-18 04:00:26 +00:00
Alexandermb 3899c9c7d2 Fix broken camel animations.
This was SVN commit r23078.
2019-10-17 17:40:24 +00:00
elexis fbe57d2066 Commit files missing in previous commit e3f43f6352 / D2378.
This was SVN commit r23077.
2019-10-17 15:22:18 +00:00
elexis e3f43f6352 Implement session event subscription system and rewrite TopPanel, PlayerViewControl, GameSpeed, Pausing, ObjectivesDialog to use object orientation, refs #5387.
New controller classes: PlayerViewControl, PauseControl,
GameSpeedControl
New viewer classes: ObjectivesDialog, PauseOverlay, FollowPlayer,
TopPanel (BuildLabel, CivIcon, CounterManager, CounterPopulation,
CounterResource refs 7e14a33411/D1113, GameSpeedButton,
ObjectivesDialogButton)

New events: SimulationUpdate, EntitySelectionChange, ViewedPlayerChange,
PreViewedPlayerChangeHandler, PlayerIDChange, PlayersInit,
PlayersFinished, Pause, DiplomacyColorsChange, HotkeyChange, refs #2604
Improves GUI onSimuationUpdate performance without selected entities by
allegedly 30%.

Delete misleading dead code resign command from leaveGame and rename to
endGame. The command is not sent via network (see fa85527baf) nor
processed in simulation, because the Game instance is deleted
immediately thereafter, introduced in fcedcae052, refs a3e1c68b9a,
39ffb0a6bd, 9f796068f8.
Remove explicitResume 0 value from e57c99c6f6 and 8ae67ed15f which
should have been a false if defined, and is equivalent to the default.
Restore fast forwarding option from cd571035bb/D595 for developers
changing the perspective to observer or player following 56308ec1ad.
Add pausing for the delete dialog missing following 7a7ebaa983.

Differential Revision: https://code.wildfiregames.com/D2378
This was SVN commit r23076.
2019-10-17 15:08:56 +00:00
Alexandermb ed11b3f039 Some tweak to animation in the 2nd swordsman shield attack
This was SVN commit r23075.
2019-10-17 04:22:57 +00:00
bb b69ffee9b1 Fix PanelEntButton undefined, by not trying to fill gui elements that don't exist
Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D1397
fixes: #5504
refs: #3000

This was SVN commit r23074.
2019-10-15 14:24:08 +00:00
Stan b99fc1a24d Add new rubble for the gaul civic_center.
Use the the new destroyed texture for the brit rubble, and the celt_dock
rubble.

This was SVN commit r23073.
2019-10-13 17:16:52 +00:00
elexis 34325ac4e3 Refactor trade dialog and barter panel buttons to use object orientation, refs #23, #2311, #4366, #5387, 8cbab40137, 749c4d5270, 5f95bca6b0, a934dfad5f.
Differential Revision: https://code.wildfiregames.com/D2369
This was SVN commit r23072.
2019-10-13 03:43:42 +00:00
elexis f2778ea7b4 Fix atlas complaining about the diplomacy dialog following 6814a983e1/D2365, refs 966b1608da.
This was SVN commit r23071.
2019-10-13 03:04:08 +00:00
Stan 1578079f3d Fix the last remaining warnings introduced by 2a1681d5c7
Add a parent variant for the camelry gather variants
Make the camelry use those variants so that they get the custom knife.
Remove the glitching basket for camelry, as its gather_meat and they do
not use it anyway.
Remove the bow while gathering as well. If it should be displayed, it
should either be on the camel, or on the unit shoulder.

This was SVN commit r23070.
2019-10-12 16:24:13 +00:00
elexis 197ab42bd2 Remove catch of critical PSERROR_Scripting exceptions in the GUI that is obsolete for the intended case and wrong for the unintended case.
The catch had been introduced in 953fb41c82, seemingly to catch the case
PSERROR_Scripting_LoadFile_OpenFailed from 1e40ed1543 which was removed
in 4b1297b328, refs D2363.
The LoadGlobalScript and LoadGlobalScriptFile functions don't throw
these errors unless that JS code calls broken C++ code throwing that.
In that case catching the error and continuing like nothing happened
leads to subsequent segfaults and similarly severe errors caused by C++,
not XML.

Differential Revision: https://code.wildfiregames.com/D2366
Tested on: clang 9.0.0, gcc 9.2.0, Jenkins/vs2015
Accepted By: nani
This was SVN commit r23068.
2019-10-11 19:30:28 +00:00
elexis a01e68a4ea Don't leak all GUI objects on name ambiguity following 5cc814759f and remove ERROR_GROUP GUI.
Delete CGUI::UpdateObjects and don't recreate the entire object
hierarchy by recursing through the existing one each time when inserting
one GUI Object.
Change CGUI::AddObject to only insert the one relevant pointer into the
map hierarchy, return success value and delete the child upon failed
insertion in the caller instead of leaking it.
Defer GUIM_LOAD and UpdateCachedSize recursion until all XML files
linked in the page XML file were loaded.
Delete related ERROR_TYPE NameAmbiguity, ObjectNeedsName, and unrelated
JSOpenFailed and in consistency with the rest, do the LOGERROR in the
scope where the error occurs.
Delete ERROR_TYPE InvalidSetting from 90f6641c1d unused following
85a622b13a, 1a49ccb294, ERROR_TYPE OperationNeedsGUIObject from
90f6641c1d unused following d3e56f0f57, see also e1014aad3b, refs #128.

This was SVN commit r23067.
2019-10-11 16:20:50 +00:00
elexis bd914702fb Fix missing file in previous (diplomacy dialog class rewrite), refs 6814a983e1/D2365, reported by Freagarach.
This was SVN commit r23066.
2019-10-11 15:47:59 +00:00
elexis 6814a983e1 Refactor diplomacy dialog to use object orientation paradigm using the class keyword, refs #5387.
Includes dilomacy colors, tribute buttons, spy request buttons, attack
request buttons, minimap panel, idle worker button, ceasefire counter.
Differential Revision: https://code.wildfiregames.com/D2365
Use hotkey release event from 78bc56f33e to remove input.js state and
evil global nested closure hackery from cb890ad876, refs #1839, #3194.
Fixes masstribute selecitonchange issue subject of D1191.

This was SVN commit r23065.
2019-10-11 12:28:12 +00:00
Alexandermb 44b03ed823 Remove unused variant and replace rider run animation in base_spearman_shield_reverse_attack.xml
This was SVN commit r23064.
2019-10-09 23:36:18 +00:00
Alexandermb d4dffa0dbf Replace elephant_asian_armored_03.dae wrong mesh with the respective mesh.
This was SVN commit r23063.
2019-10-07 01:43:48 +00:00
elexis 47f5c27eec Rewrite session chat to use hierarchical object oriented design using class syntax, refs #5387.
Set global hotkeys in JS instead of empty XML objects from
f192d4a2fa/D2260.

Differential Revision: https://code.wildfiregames.com/D2355
This was SVN commit r23062.
2019-10-06 14:42:12 +00:00
Alexandermb b76239cbe7 Fix "Didn't find any objects in the scene" in elephant_asian_armored_03.dae
This was SVN commit r23060.
2019-10-05 15:25:07 +00:00
Alexandermb fe8f284869 Remove duplicated vertex groups and props from elephants
Mentioned by @stan in this thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/21/&tab=comments#comment-386080

This was SVN commit r23059.
2019-10-05 14:51:22 +00:00
Alexandermb dc21504b5d Fix weight on ship sails missing in the mastiff.
This was SVN commit r23058.
2019-10-05 14:20:50 +00:00
Alexandermb e61d6ac8d2 Remove unused animation and tweak levy idle ready.
This was SVN commit r23057.
2019-10-05 13:21:07 +00:00
Alexandermb a5c2cc6cd5 Replace gather meat animation on camel riders.
Fix latest issues mentioned by @stan in this thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/21/&tab=comments#comment-386055

This was SVN commit r23056.
2019-10-05 13:19:23 +00:00
Stan ae50e10339 Add missing garrisoned flag on the cart temple missing since 9a4fcd55a8
Reported by: @faction02
Thread:
https://wildfiregames.com/forum/index.php?/topic/26896-fixed-ninja-stuff-or-bug/&tab=comments#comment-386061

This was SVN commit r23055.
2019-10-05 12:27:06 +00:00
elexis 8cd9d402fe Correct button hovering following 8190293f8b / D2325, clarify difference between IsMouseOver and IsMouseHovering following 5122b0f906.
Differential Revision: https://code.wildfiregames.com/D2354
Tested on: clang 8.0.1, Jenkins/vs2015

This was SVN commit r23054.
2019-10-05 09:58:31 +00:00
Alexandermb 92f7df696d Make generic the infantry swordsman idles so it can be used by all sword infantry shield kinds.
Add base variant file for the romans/infantry_swordsman_c3.xml.

This was SVN commit r23052.
2019-10-05 02:11:58 +00:00
Alexandermb 9a95d21760 Replace run on female variant with proper running.
Reported by @stan

Change running animation speed to match the movement ingame.

Rotate spear while running for the hoplite/run_relax.dae animation.

This was SVN commit r23051.
2019-10-05 01:25:32 +00:00
Alexandermb e0e892efec Separate skirts from legs in short and long tunic meshes.
Re-export some body meshes with the proper vertex groups.

Fix rotation in hand while carrying meat in the cavalry riders.

This was SVN commit r23050.
2019-10-05 01:13:30 +00:00
Alexandermb 2a1681d5c7 Camel riders animations re-export.
This was SVN commit r23049.
2019-10-05 00:52:32 +00:00
Alexandermb 170bfed010 Mauryan trader animation re-export.
Tweaked the male walk animation.

This was SVN commit r23048.
2019-10-05 00:16:52 +00:00
Alexandermb 46de7fe751 Replace death animation on turret elephant riders.
replace variant in elephant rider capes.

This was SVN commit r23047.
2019-10-05 00:04:33 +00:00
vladislavbelov d7ea078583 Removes unused variables after 7f38bef8e1 and 75d9c6293b. Reported by elexis.
This was SVN commit r23046.
2019-10-04 22:06:52 +00:00
Alexandermb 04745e7fdf Continue the cleaning of the unused files with the recent elephant animations re-export.
This was SVN commit r23045.
2019-10-04 21:35:23 +00:00
vladislavbelov e2f0e409f0 Adds containers serialization tests, std::set serialization and movement semantics
Reviewed By: elexis
Tested By: elexis, Freagarach
Differential Revision: https://code.wildfiregames.com/D2352
This was SVN commit r23044.
2019-10-04 21:30:52 +00:00
Alexandermb 273d7949a2 Replace asian_armored variant in two heros elephants + fix a wrong face in elephant_asian_armored_04.dae model.
This was SVN commit r23043.
2019-10-04 20:13:44 +00:00
Alexandermb 893a727cd5 Fix a typo in last commmitt.
This was SVN commit r23042.
2019-10-04 19:30:22 +00:00
Alexandermb 5512fdb9ef Remove an unused elephant variant and replace african forest variant.
This was SVN commit r23041.
2019-10-04 19:29:07 +00:00
Alexandermb 40f0f3d455 Elephant re-export and animations for the riders.
This was SVN commit r23040.
2019-10-04 17:15:51 +00:00
Alexandermb ed4208c538 Reduce frame lenght on new citizen idles to keep in sync with global idle frame lenght.
This was SVN commit r23037.
2019-10-04 03:09:22 +00:00
vladislavbelov 75d9c6293b Adds projection type to CCamera to control usages of projection dependent properties.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2351
This was SVN commit r23036.
2019-10-03 18:51:40 +00:00
Alexandermb eff68a51c0 Citizen animations for the slave and siege engine operators.
Added frequency tags on variants.

12 Citizen animations.
1 tweak on hoplite static idle.

This was SVN commit r23035.
2019-10-03 17:31:17 +00:00
vladislavbelov 8d2b143cb8 Cleanup Camera related code and uses constant references where possible, fixes #5408.
Patch By: shh
Reviewed By: wraitii
Tested By: Angen
Commented By: Stan, Itms, historic_bruno
Differential Revision: https://code.wildfiregames.com/D1784
This was SVN commit r23034.
2019-10-03 13:20:56 +00:00
vladislavbelov a19b14aeb7 Cleanup Camera related code and uses constant references where possible.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2350
This was SVN commit r23033.
2019-10-03 12:58:47 +00:00
vladislavbelov 7f38bef8e1 Splits Camera control from CGameView to separate file.
Commented By: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D2347
This was SVN commit r23031.
2019-10-02 20:55:43 +00:00
Alexandermb 491987fd69 More lifelike idle animations and some new sword attacking animations for scutum like shields.
Sync hoplite idles time/frames so the cape follows the body.

This was SVN commit r23030.
2019-10-02 17:27:44 +00:00
Stan 28e94c0d96 Cleanup CCmpRallyPointRenderer
Replace std::deque by std::vector
Replace some casts by cpp casts
Move the class and struct declaration to a separate file for clarity.
Fixes db864f10c3 by removing offending function
Refs #5288
Refs D1681

Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1682
This was SVN commit r23029.
2019-10-02 15:01:46 +00:00
elexis 6db0f91823 Sort GUI Object types, GUI Object bases and GUI Setting value types into three new folders.
Differential Revision: https://code.wildfiregames.com/D2345
Tested on: gcc 9.1.0
Comments By: Vladislav
This was SVN commit r23028.
2019-10-02 09:44:00 +00:00
vladislavbelov 1cf6c6b63c Moves CSmoothedValue to separate file.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2346
This was SVN commit r23026.
2019-10-01 22:42:54 +00:00
vladislavbelov 45a18c652d Removes unused methods and hides private member.
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2342
This was SVN commit r23025.
2019-10-01 21:11:29 +00:00
Alexandermb f1395c947a New idle relax animations for the hoplite.
5 new animations and renamed 1.

This was SVN commit r23024.
2019-10-01 20:21:45 +00:00
elexis 32d6d07eda Rename CClientArea to CGUISize, GUIbase.h to CGUISize.h, avoid temporary instances and default value and error duplication.
The name is in accordance with its JS classname, member names and
setting names.

Differential Revision: https://code.wildfiregames.com/D2341
Tested on: clang 8.0.1, Jenkins/vs2015

This was SVN commit r23023.
2019-10-01 15:06:13 +00:00
elexis 07cc1ba34c Move GUIbase structs and enums to separate files.
Differential Revision: https://code.wildfiregames.com/D2340
Tested on: clang 8.0.1, Jenkins

This was SVN commit r23022.
2019-10-01 12:46:55 +00:00
elexis 8190293f8b Remove virtual inheritance from the codebase, refs 6b51d71c85, e21ebb37f5 e326ebae46.
Remove workaround in 3d07327837 / D2136, the pointer from IGUIObject to
IGUITextOwner that avoided the dynamic_cast.
Have the GUIObject implementing class take responsibility of calling the
virtual methods in the base classes.
Leaves the code in a clean state that can serve as an example for new
GUI object classes, such as D1346, refs #4683.

Differential Revision: https://code.wildfiregames.com/D2325
Comments By: Vladislav on IRC 2019-07-30, 2019-08-22, 2019-09-20-23
Tested on: clang 8.0.1, Jenkins

This was SVN commit r23020.
2019-09-30 14:08:14 +00:00
elexis 1679510bb8 Resolve Loader memory leak from 1f1642bfe3.
Use C++11 featured shared_ptr to avoid conditional deletion in multiple
locations.
Drops C compatibility(?) of Loader.h.

Differential Revision: https://code.wildfiregames.com/D2331
Tested on: clang 8.0.1., Jenkins
Comments on IRC #wfg 2005-05-07
Refs 77d3c5d0b5, 5e3b0f06ec, f19d8dafee.

This was SVN commit r23019.
2019-09-30 08:49:00 +00:00
elexis 218399bf3d Rename JSInterface_GUITypes to JSInterface_GUISize, refs 8734efca94, 9be8a560a9.
Rename init to RegisterScriptClass.

Differential Revision: https://code.wildfiregames.com/D2339
Tested on: clang 8.0.1., Jenkins/vs2015

This was SVN commit r23018.
2019-09-30 08:19:56 +00:00
Stan d5b9919b00 Add missing round when calculating trader gain, removed in 026ce76e3f
Fixes loot tooltip and market tooltip.
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D2327
This was SVN commit r23016.
2019-09-29 13:19:58 +00:00
Stan 89fadf8b3a Actually fix band-aid from 40289e4a1a. Missing garrison flags date back from e63a938529 (Stoa, Theater, Sentry Tower)
Fix typo from b0b0495fc9 which caused erratic garrison flag behavior on
the Brit Scout Tower
Reported by: @faction02
Thread:
https://wildfiregames.com/forum/index.php?/topic/26896-ninja-stuff-or-bug/&tab=comments#comment-385787

This was SVN commit r23015.
2019-09-29 13:16:57 +00:00
wraitii db4fabcc4c Fix phase notification accidentally deleted in e16c4c4800
Reported By: elexis
Tested By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2336
This was SVN commit r23014.
2019-09-29 08:53:28 +00:00
wraitii 6b29cbac10 Add simple tests for Attacking.
Forgot to 'svn add' in 38b2e37a61

This was SVN commit r23013.
2019-09-29 07:03:09 +00:00
wraitii 38b2e37a61 Fix bonus multiplier issue in 16b452cf91 (multiple attack effects) and consider more entities in EntitiesNearPoint
- the bonus multiplier would self-multiply with every effect, so an
attack with multiple effect would have a broken multiplier.
- EntitiesNearPoint used IID_Resistance, which is now facultative. To
not miss entities, it now returns all entities owned by enemy players.
For GAIA it checks for Health to avoid returning trees.
This means enemy units have higher priority over missed projectiles, but
that should generally be OK.

This also adds simple tests.

Reported By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2322
This was SVN commit r23012.
2019-09-29 06:58:03 +00:00
wraitii 81e084d616 Remove specific macedonian workshop code and template usage now that all civilisations ahve them.
All civilisations were given workships in da973b81f1.

Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2323
This was SVN commit r23011.
2019-09-29 06:42:02 +00:00
elexis 52b7fd5cd9 Remove redundant IGUITextOwner::AddText IGUIObject/this argument.
Differential Revision: https://code.wildfiregames.com/D2333
Tested on: clang 8.0.1., Jenkins/vs2015

This was SVN commit r23009.
2019-09-28 11:46:06 +00:00
elexis b097f38a79 Remove little IGUIButtonBehavior::DrawButton duplication.
Differential Revision: https://code.wildfiregames.com/D2332
Tested on: clang 8.0.1., gcc 9.1.0, Jenkins/vs2015

This was SVN commit r23008.
2019-09-28 11:33:58 +00:00
elexis 813fc38420 Fix alphabetic sorting induced syntax error in previous, a33fd55e81/D2313, reported by go2die.
This was SVN commit r23006.
2019-09-27 14:08:00 +00:00
elexis a33fd55e81 Change GUI Object Setting values to be members of the IGUIObject inheriting class, rename AddSetting to RegisterSetting.
Improves performance for Draw calls by 3-5% according to a shady
benchmark.
Improves memory layout, since the values are not on the heap anymore but
in the using class.
Reduces complexity of the implementation and increases type safety.
Allows specifying default values at setting value construction time,
refs D2242.
Inspired by Vladislav introducing members that cached GetSetting values
in c016a74309/D325, refs #4039, ee38f0db37/D763, refs 4225,
a1c4c23ce4/D474, D406, which were formerly proposed to be removed in
D2241.

Differential Revision: https://code.wildfiregames.com/D2313
Tested on: clang 8.0.1, gcc 9.1.0, Jenkins vs2015
Comments By: Vladislav
This was SVN commit r23005.
2019-09-27 12:49:59 +00:00
vladislavbelov 7790fd7d29 Removes duplication of Clamp function.
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1763
This was SVN commit r23002.
2019-09-26 21:14:21 +00:00
Stan 5d88955e14 Fix sounds fileendings and add distanceless and owner only tags to fit D944
This was SVN commit r23001.
2019-09-26 14:45:28 +00:00
Stan 69381e0489 Fix broken legionnaries introduced in 35dcdb263f
This was SVN commit r23000.
2019-09-26 14:42:13 +00:00
elexis b247e8b830 Chat filter to allow players to only read network or game notifications during the match.
Differential Revision: https://code.wildfiregames.com/D1605
This was SVN commit r22999.
2019-09-26 13:03:40 +00:00
elexis fc08fe60ab Support testing rejoins on turn 0, refs #3460, #4242, #5185, #5162, 2bf1dbfd13
Differential Revision: https://code.wildfiregames.com/D1522
This was SVN commit r22998.
2019-09-26 12:09:19 +00:00
elexis 23543383e3 Display observercount in the lobby gamelist.
Differential Revision: https://code.wildfiregames.com/D284
Based on patch by: fpre, Krinkle
This was SVN commit r22997.
2019-09-26 11:48:33 +00:00
elexis 0817d5d715 Always inform clients why the server chose to disconnect them, i.e. stop using NDR_UNKNOWN as a disconnect reason when the reason is known and add a LOGWARNING for future authors.
Differential Revision: https://code.wildfiregames.com/D1561
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22996.
2019-09-26 11:36:03 +00:00
elexis 767c7f5856 Fix alphabetic template order using templatessorter.sh.
This was SVN commit r22995.
2019-09-26 10:07:36 +00:00
elexis 3521218df5 Fix lineendings.
This was SVN commit r22994.
2019-09-26 09:46:01 +00:00
elexis 00b58fc2ed Fix previous, don't save replay metadata if a multiplayer gamesetup page was opened and closed, refs 35408e7e7e / D2197, refs #5565.
This was SVN commit r22992.
2019-09-25 16:41:14 +00:00
elexis 35408e7e7e Save replay metadata for non-visual games too, refs #4577, #5548, fixes #5565.
Remove gui/common/ hack by going through the GUIInterface and fragile
EndGame() hardcoding by saving if and only if a ReplayLogger exists
following 7470e88624, refs #4020.
Refs D2211, D2213.

Differential Revision: https://code.wildfiregames.com/D2197
Based on patch by: irishninja
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22991.
2019-09-25 10:06:12 +00:00
Stan 9425572bb1 Fix projectiles fired from sky / missing cast in Vector3D in b1659e7618. Removes a trailing .0
Reported by: @faction02
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D2326
This was SVN commit r22990.
2019-09-24 14:21:06 +00:00
Stan f06907da02 Fix blood sometimes appearing below cattle, because of a variant having a frequency set to 1. It should only be switched to by code.
This was SVN commit r22987.
2019-09-23 13:58:02 +00:00
Stan ec040fba08 New cattle sounds by @Samulis
Sound repartition suggested by @Samulis

Also reduce the max range of the bull as it looks really weird. They now
cross horns.

Thread:
https://wildfiregames.com/forum/index.php?/topic/26396-cattle-sounds/&tab=comments#comment-385360

This was SVN commit r22986.
2019-09-23 13:57:16 +00:00
elexis aefb75090c Rewrite Savegame page to use class syntax, enabled by bdc6a7d3fd / D2290, refs #5387.
Uses simple event subscription to make the classes independent of each
other.
Removes all globals except two variables and one function (that may be
avoided in the future too).
Allows the reader to focus on the relevant aspect of the implementation
(encapsulation, information hiding) and makes implementation more
modifiable and extensible.

Differential Revision: https://code.wildfiregames.com/D2310
This was SVN commit r22985.
2019-09-23 10:06:29 +00:00
wraitii da973b81f1 Enable workshops for all civilisations.
Also in this patch:
- reorder workshop training queue to ram, boltshooters, stonethrowers,
siege towers
- remove all siege units and technologies from all fortresses
- list champions before heroes in the production queues of fortresses
- update tooltips of fortresses accordingly.

Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1761
This was SVN commit r22984.
2019-09-23 08:34:54 +00:00
wraitii 47671d1987 Fix mistakes in 74897ebc2d
Some files were not completely changed.

This was SVN commit r22983.
2019-09-23 08:17:25 +00:00
wraitii 74897ebc2d Move palisades from other/ to structures/
Following D1881 which introduced a common parent, palisade templates can
be moved:
 - other/palisades_rocks_* to structures/palisades_*
 - other/palisades_*_spike* to structures/palisades_spike*

Map scripts were updated accordingly.

Patch By: Nescio
Reviewed By: wraitii
Refs #4770

Differential Revision: https://code.wildfiregames.com/D2234
This was SVN commit r22982.
2019-09-23 07:48:00 +00:00
wraitii d69da4c948 Fix undefined resource in PetraAI diplomacy manager after D1846/077c4f2576.
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2319
This was SVN commit r22980.
2019-09-23 06:46:40 +00:00
wraitii 92ad6a61fa Fix OOS introduced by pathfinder threading preparation diff d592bf9cb6
Following d592bf9cb6, paths were computed at the end of turn N, and then
messages were sent at the beginning of turn N+1. However, the path
requests were removed at the end of turn N and so weren't serialised,
and neither were computed paths. This meant rejoiners would OOS when the
game was serialised with pending path results.

To fix this in preparation for threading, the architecture needs to
change slightly so that requests are kept and serialised correctly, and
rejoiners can compute the paths after deserialisation, in order to send
the messages at the beginning of turn N+1.

Fixes #5604

Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2317
This was SVN commit r22979.
2019-09-23 06:38:16 +00:00
LordGood 83b7dac3f4 Split ptolemaic house actors into old and new files
This was SVN commit r22977.
2019-09-23 00:58:02 +00:00
elexis b9d413852b Cleanup GUI includes, whitespace, map iterators, nullptr.
Remove TODO comment about m_Children deletion from e21ebb37f5, refs
e05f939fab / D2311.

Differential Revision: https://code.wildfiregames.com/D2321
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22976.
2019-09-22 23:28:25 +00:00
elexis e67f364887 Warn if the derived class and the base class have the same AddSetting call instead of silently ignoring it.
Enabled by f69261d37b (refs d412b2010b / D2314, 7bb0f2ea69 / D2318).
Helps structuring the GUI so that AddSetting and GetSetting are in the
same file, which defragments code and may allow for future optimizations
(setting values as class members for Draw calls), refs D2313.

Differential Revision: https://code.wildfiregames.com/D2320
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22975.
2019-09-22 22:49:20 +00:00
Alexandermb cc494ec5df Celtic iron Sheath
This was SVN commit r22973.
2019-09-22 15:24:01 +00:00
Alexandermb 979150283d Enable greaves for some greek cavalry.
This was SVN commit r22972.
2019-09-22 15:23:18 +00:00
wraitii 987b36d53c Do not send Reflection and Refraction matrices to shader when not needed
Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1954
This was SVN commit r22971.
2019-09-22 14:56:22 +00:00
wraitii 077c4f2576 Adds a "properties"-property to resources and let mods be able to prevent resources from being bartered, traded and/or tributed.
Patch By: Freagarach
Comments By: elexis, Stan`, Nescio
Reviewed By: wraitii, Angen
Fixes #4370

Differential Revision: https://code.wildfiregames.com/D1846
This was SVN commit r22970.
2019-09-22 14:53:47 +00:00
elexis 7bb0f2ea69 Defragment IGUIButtonBehavior Settings.
Moves the AddSetting sound calls from CButton and CCheckbox to
IGUIButtonBehavior, since the latter is the only class to use them.
Moves ChooseColor from IGUIButtonBehavior to CButton, since that's the
only class to use it and the only class registering the dependent
Settings following b1422137e5 (refs d412b2010b / D2314)

Initialize m_PressedRight in the constructor to prevent undefined
behavior in possible future code following 0d204037b6, refs #1028.
Remove unused soundPath variable following 0e26503cc6 / D2209.

Differential Revision: https://code.wildfiregames.com/D2318
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22969.
2019-09-22 14:53:27 +00:00
bb e771ff40ea Use arrow functions in AI filters
Comments By: elexis, wraitii
Differential Revision: https://code.wildfiregames.com/D1883
This was SVN commit r22968.
2019-09-22 14:01:49 +00:00
wraitii db4637f73a Fix issue with D274/e16c4c4800 - modifications are a list of effects, not a single effect
D274 introduced a silent change that modifications would only have one
effect per value-path, which was an unnoticed regression.

Detected following the comments from SonarQube reported here:
e16c4c4800#inline-4214

Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D2315
This was SVN commit r22967.
2019-09-22 12:05:04 +00:00
elexis 31a2dd294e Fix top panel being hidden during pause mode following 702cdbf0c7 / D2292 reported by Freagarach, ValihrAnt, Krinkle et al.
Remove the false misleading default.cfg z value that is always
overwritten by CGUI::Xeromyces_ReadObject, both introduced in
e21ebb37f5.
Remove multiline property since its redundant with the default C++
boolean, making the default style more agnostic of final GUI Object
classes.

Close advanced locale dialog correctly upon cancel following 86c151ebaa
/ D1684.
Don't switch the background image when closing the credits dialog
following bcf2c75513, refs #3744.

This was SVN commit r22966.
2019-09-22 10:51:08 +00:00
wraitii 2678d5e52e Fix broken paths in d1bcce55db
The commit moved files but did not apply the changes.
Further, this sets eol-style native to these files.

Reported By: Angen
Differential Revision: https://code.wildfiregames.com/D2316
This was SVN commit r22965.
2019-09-22 10:11:11 +00:00
wraitii 026ce76e3f Update the fast-actions cheat and AI bonuses to use the modifiers manager
This deletes custom-code and shows how to use this system component for
triggers.

Differential Revision: https://code.wildfiregames.com/D1011
This was SVN commit r22964.
2019-09-22 07:46:29 +00:00
wraitii d1bcce55db Improve js glue code in D1839/61e3f1ec0d (hotkey state fix) and deal with rebase leftovers.
The code could be improved by using more modern code.

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2295
This was SVN commit r22963.
2019-09-22 07:38:13 +00:00
Alexandermb d96ac8ea24 Gladius sheath.
Fix a typo Transvesal > Transversal

This was SVN commit r22961.
2019-09-21 23:06:37 +00:00
elexis fb65515550 Fix missing replay menu function following loadgame and savegame unification bdc6a7d3fd / D2290.
Refs d64b95b28c, ad1a4d6121

Differential Revision: https://code.wildfiregames.com/D2309
String reviewed by: Nescio
This was SVN commit r22960.
2019-09-21 21:04:15 +00:00
Alexandermb 8fdfbb7cfd Transversal Crested gallic centurion helmet.
Requested by @Wowgetoffyourcelphone

This was SVN commit r22959.
2019-09-21 20:49:12 +00:00
elexis f69261d37b Remove AddSetting<CStrW>("tooltip") and AddSetting<CStr>("tooltip_style") calls redundant with the ones in the IGUIObject base constructor.
If all redundant calls are removed, the code will be able to warn about
them.

Tested on: clang 8.0.1

This was SVN commit r22958.
2019-09-21 16:13:18 +00:00
elexis 702cdbf0c7 Remove GUI object setting values z="0", size="0 0 100% 100%", hidden="false" in XML page specifications that are redundant with the default style values.
Remove question by brian in single_details_area.xml from b66d1716e7
which is answered by "because the style set it".
Delete BuildNameText style, because it specifies ghost="true" in both
style and sole object using the style.
Don't touch progressbar and structree styles, because there is more to
clean.

Differential Revision: https://code.wildfiregames.com/D2292
This was SVN commit r22957.
2019-09-21 15:54:25 +00:00
elexis 869a9548a9 Delete duplicate global default style following 1e6614918b.
Excerpt from D2292.

This was SVN commit r22956.
2019-09-21 15:23:05 +00:00
Alexandermb a9d477b269 Replace old illyrian helmet on seleucid infantry archer.
Mentioned by @Stan

This was SVN commit r22955.
2019-09-21 15:09:59 +00:00
Alexandermb cf1c13b986 Replace illyrian helmet on athenian cavalry swordsman with the new one.
Remove a duplicated illyrian crested helmet of the old variant.

This was SVN commit r22954.
2019-09-21 14:56:43 +00:00
elexis d412b2010b Delete unused CCheckbox text setting remains following b1422137e5, refs 0f807c643a.
Differential Revision: https://code.wildfiregames.com/D2314
Tested on: clang 8.0.1., Jenkins

This was SVN commit r22952.
2019-09-21 03:11:18 +00:00
vladislavbelov aa72791b69 Fixes compilation errors about missed include and unused argument introduced in c17e7ee92f.
Patch By: elexis
Reported By: elexis
This was SVN commit r22950.
2019-09-20 19:44:58 +00:00
elexis 734d21464b Fix missing JSAutoRequest before JS_ReportError in various commits.
Differential Revision: https://code.wildfiregames.com/D2256
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22949.
2019-09-20 19:18:07 +00:00
Alexandermb 47eb30056f Latest Fix
This was SVN commit r22948.
2019-09-20 16:13:47 +00:00
Alexandermb b56083071a Fix issues mentioned by @stan in this thread: https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/15/&tab=comments#comment-385394
This was SVN commit r22947.
2019-09-20 16:06:26 +00:00
Alexandermb 262056df42 Replace straw helmet
This was SVN commit r22946.
2019-09-20 15:37:40 +00:00
Alexandermb cc839ec521 Enable greaves on carthaginian champions.
This was SVN commit r22945.
2019-09-20 15:32:05 +00:00
Alexandermb bd66089319 Add updated carthaginian infantry pikeman champion shield.
This was SVN commit r22944.
2019-09-20 15:27:27 +00:00
elexis e05f939fab Delete empty IGUIObject::Destroy function and MEGA TODO from 5122b0f906, e21ebb37f5.
None of the GUI object types implemented in the past two decades owns
children, only the CGUI page.

Differential Revision: https://code.wildfiregames.com/D2311
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22943.
2019-09-20 15:25:13 +00:00
Alexandermb d90dffab1f Fix latest issues of the old helmets files merge.
This was SVN commit r22942.
2019-09-20 15:13:54 +00:00
elexis 1bc6d778bb Delete GUI.h umbrella include following 8d0cb1b954.
Differential Revision: https://code.wildfiregames.com/D2304
Tested on: clang 8.0.1., VS2015, Jenkins
Comments By: Vladislav, Angen, Stan
Tested by: Angen
This was SVN commit r22941.
2019-09-20 13:11:18 +00:00
vladislavbelov 8f7729bfdb Fixes values of clip planes in PostProcManager.
Reviewed By: wraitii
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D2196
This was SVN commit r22940.
2019-09-20 07:54:44 +00:00
vladislavbelov c17e7ee92f Adds a helper function to pick entities with a given component and a given filter on screen.
Reviewed By: wraitii
Commented By: Stan, elexis
Differential Revision: https://code.wildfiregames.com/D2207
This was SVN commit r22939.
2019-09-20 07:45:55 +00:00
Alexandermb 76f82bbcac Replace hero_infantry_swordsman_marcellus.xml helmet with champion montefortino.
Replace mesh on hele_boeotian_g.xml to hele_boeotian_b.

This was SVN commit r22937.
2019-09-20 02:51:28 +00:00
Alexandermb 60049abcab Fix thracian_cap_01 missing on cavalry_javelinist_b_r.xml
This was SVN commit r22936.
2019-09-20 02:22:14 +00:00
Alexandermb f03a18f72e Improved peytrals for persian and seleucid cavalry.
3 New peytrals:

Pers with bronze and iron.
Pers winged bronze for cavalry javelinist.
Seleucid with bronze.

This was SVN commit r22935.
2019-09-19 22:26:33 +00:00
Alexandermb fec02fa2e3 Replace illyrian helmet on macedonian infantry with the new one.
replace mesh from hele_boeotian.xml.

This was SVN commit r22934.
2019-09-19 22:06:33 +00:00
Alexandermb 35dcdb263f Cleanup of helmets folder.
Merged all the old helmets files including meshes, textures and actors
to another sub folder called "old"

Added a better visual rome gallic helmet as replacement of the one i've
did before.

Replaced thracian helmet on spartan pikeman.

Replaced pers neckguard with one animated working like a cape.

Added the new persian conical helmet.

Added another pilos helmet for the persian cavalry.

Added another crest for the persian pilos helmet.

This was SVN commit r22933.
2019-09-19 21:53:07 +00:00
elexis a936cc618a Move CGUIDummyObject class used for empty GUI objects to a separate file, and put the according CGUI page base object on the stack.
Differential Revision: https://code.wildfiregames.com/D2206
Tested on: clang 8.0.1., Jenkins

This was SVN commit r22931.
2019-09-18 20:51:45 +00:00
Alexandermb b88e7d8368 Following dd2a75b630 fix latest issues mentioned by @Stan in the hellenic helmets thread.
Removing some crest's done by me and replacing old crest's on iron
corinthian helmets.

Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/15/&tab=comments#comment-385266

This was SVN commit r22930.
2019-09-18 19:57:34 +00:00
wraitii 4fd3f071a5 Fix SetGarrisoned() call when transforming an entity
Before cc1ea7cca0, the promotion code would carry the UnitAI
IsGarrisoned flag, which the Transform helper incorrectly didn't do.
However, this was missed when merging the two code paths.

This fixes an issue for example when units are promoted while atop
walls.

Reported By: faction02
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2303
This was SVN commit r22929.
2019-09-18 19:07:16 +00:00
vladislavbelov 7985ea4b8e Removes usages of duplication of Clamp function in simulation and atlas. Refs D1763.
This was SVN commit r22927.
2019-09-18 15:02:36 +00:00
vladislavbelov f1de8eb4ba Removes usages of duplication of Clamp function in gui, ps and renderer. Refs D1763.
This was SVN commit r22926.
2019-09-18 14:44:31 +00:00
vladislavbelov 050f1dc8df Removes usages of duplication of Clamp function in graphics. Refs D1763.
This was SVN commit r22925.
2019-09-18 08:34:36 +00:00
elexis bdc6a7d3fd Unify loadgame and savegame dialog following e0ea53a8ee, refs #2030.
This way the save dialog gains the sortable list and details section
feature from 10b49f9c18 / D246 by removing a folder of code, refs #4413.
Fixes a style warning about the old dialog using a style for an 'olist'
type for a 'list' type, refs be963ec9b7 / D2232.

Subsequently move the gui/common/ helper file to the page code, meaning
it's not loaded for every GUI page needlessly anymore.
Fix map preview aspect ratio.
Use object-oriented code for the moved savegame code, refs #5387, but
conserve the rest of the code to limit the changes for auditability.

Differential Revision: https://code.wildfiregames.com/D2290
Tested on: Jenkins

This was SVN commit r22923.
2019-09-18 02:33:43 +00:00
elexis 003d588d13 Happy savegame hack removal following e0ea53a8ee, refs #2030.
Simply pass the JS value to the Save functions instead of letting those
obtain the data later from the topmost GUI page.
The JS hack incidence appears to be unused since 4b1297b328.

Differential Revision: https://code.wildfiregames.com/D2302
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22922.
2019-09-18 00:17:56 +00:00
elexis 93fed19c6a Reliably report and reject invalid XML files following a18fbd12ec, refs #245, fixes #5222.
Don't write XMB files for XML files that failed the validation,
otherwise the XML validation error will not be reported on consecutive
program starts anymore (as the XMB is loaded, skipping validation).
This had resulted in invalid XML  going unnoticed and committed in
credentials.xml in 80dbd1f2a3.

Differential Revision: https://code.wildfiregames.com/D1574
Reported by: gameboy
Comments By: bb
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22921.
2019-09-17 23:00:36 +00:00
elexis 41475093b0 Fix struc tree / civ info hotkeys following rebase error in adf448db4d / D2240 and don't trigger global hotkey handlers upon release following f192d4a2fa / D2260.
Differential Revision: https://code.wildfiregames.com/D2273
Tested on: clang 8.0.1., Jenkins
Tested by: Nescio
This was SVN commit r22920.
2019-09-17 22:42:50 +00:00
elexis da958bf0e4 Fix wrong GlooxScriptConversions include in 9023f4bebb / D2264 triggering VS2015 build warning but no clang build warning, refs #5596.
Differential Revision: https://code.wildfiregames.com/D2298
Tested on: clang 8.0.1., Jenkins

This was SVN commit r22919.
2019-09-17 20:39:09 +00:00
Itms a3d8807833 Fix 61e3f1ec0d on Windows.
Patch By: Angen
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2299
This was SVN commit r22917.
2019-09-17 19:27:38 +00:00
elexis d468535df3 Split NetFileTransfer message parsing into one function per case, refs #5212.
Avoid redundant map lookups by caching the iterator.
Remove c-style casts by using type specific printf parameters, and
static_cast elsewhere.
Use references while at it, and typedef -> using.

Differential Revision: https://code.wildfiregames.com/D1567
Comments by: Vladislav
Tested on: clang 8.0.1, gcc 9.1.0

This was SVN commit r22916.
2019-09-17 14:18:46 +00:00
Alexandermb 7dcaf478d8 Update the corinthian helmet portrait with the ones done by @wowgetoffyourcelphone using @alexandermb new corinthian helmet render.
This was SVN commit r22915.
2019-09-16 17:40:11 +00:00
Alexandermb 9e6250660c Following dd2a75b630 Assign the new helmets and clean the unused files.
This was SVN commit r22914.
2019-09-16 17:38:19 +00:00
Alexandermb dd2a75b630 Several adjustments to the helmets and addition of new ones.
Fixed:

Replaced the Phrygian b helmet with b1 following the name schema of the
rest as well as adding 2 variants more of the same.

Added:

Add bronze specular for the bronze helmets.
Added Phrygian B12
Added Thracian B8 and B9
Added Celt Monte Bibele
Added Illyrian Helmets (B1; B2; B3)
Added new face mask's

Reworked:

Reworked Corinthian Helmet B1 and B2 with a more historically accurate
one.
Reworked the helmet's Crest's adding a better visual ones.
Reworked Phryian Face Mask's with better visual ones.

Renamed:

Renamed Apulo roman helmet to Apulo Itallic.
Renamed Phryian b to b1.
Renamed Thracian b to b1.

This was SVN commit r22913.
2019-09-16 17:11:03 +00:00
wraitii 14fff267a1 Make health correctly recalculate its cached values when the entity changes owner.
Following e16c4c4800, the ModifierManager no longer sends
ValueModificationMessages when an entity changes owner to/from
INVALID_ENTITY. This happens in particular when the entity is renamed.

For now, components must check on their own in OwnershipChanged.

Reported By: Freagarach
Patch By: Angen
Reviewed By: wraitii
Fixes #5588

Differential Revision: https://code.wildfiregames.com/D2286
This was SVN commit r22912.
2019-09-16 17:07:50 +00:00
elexis 4d4bf579b2 Report and tolerate XML GUI object setting errors when parsing XML attribute strings as values for settings that don't exist on the GUI object.
Following e326ebae46, 80b1876b77, d6db5a466d, ... the XML errors were
silently ignored.
Following 1a49ccb294 it led to a crash (m_Setting access for an item
that does not exist).

Differential Revision: https://code.wildfiregames.com/D2297
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22911.
2019-09-16 16:13:25 +00:00
wraitii 61e3f1ec0d Fix hotkey events synching with hotkey state.
This is a semi-revert of 78bc56f33e and a correct fix for #3194.

The core issue is that the GUI handler must come behore the hotkey
handler, otherwise typing in boxes can set off hotkeys, and the hotkey
handler is repsonsible for updating the hotkey state.
Thus the GUI handler never has an up-to-date hotkey state, since that's
done later. 78bc56f33e fixed that by calling HotkeyInputHandler
manually, but that was still broken in some (unused) cases and was hacky
(indeed, it even looked hacky as noted by elexis).

The simplest fix is to split the 'hotkey creator' handler from the
'hotkey state change' handler, and run the 'hotkey state change handler'
before any other handler. Thus the gui handler remains in front of the
'hotkey creator' handler, but it has a correct hotkey state at any time.

Differential Revision: https://code.wildfiregames.com/D1839
This was SVN commit r22909.
2019-09-15 12:16:28 +00:00
wraitii c6e5c83b6d Workaround differences between libc and libstd string stream parsing of float/doubles.
libc and libstd differ on how they parse strings. This has a remote
chance of breaking mods and 0 A.D. code, and it broke tests on MacOS.

Add a workaround to ensure they are consistent.

Comments by: vladislavbelov
Fixes #2780

Differential Revision: https://code.wildfiregames.com/D1988
This was SVN commit r22908.
2019-09-15 12:02:26 +00:00
Gallaecio 5faf540980 -ise → -ize
Summary: This patch corrects two occurrences of -ise into -ize in the
quotes, because US spelling.

Test Plan: Ought to be unproblematic.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Itms, Stan, Freagarach, O8 JS GUI

Differential Revision: https://code.wildfiregames.com/D2246
This was SVN commit r22907.
2019-09-15 11:52:59 +00:00
Gallaecio 740ba4cb78 standardize gather technology tooltips
Summary:
This patch standardizes the tooltips of gather technologies, per
https://trac.wildfiregames.com/wiki/EnglishStyleGuide#Stats
Flavour text strings are moved from the "tooltip" to the "description"
entry.

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio

Reviewed By: Gallaecio
Subscribers: Freagarach

Differential Revision: https://code.wildfiregames.com/D2253
This was SVN commit r22906.
2019-09-15 11:51:59 +00:00
Gallaecio 5cc49c2326 standardized hero aura descriptions
Summary:
This patch rephrases the aura descriptions of hero auras to an uniform
standard, to ensure descriptions follow the actual modifications:
[player] [class] [change] [attributes], e.g. "Spearmen +1 capture attack
strength, +25% melee attack damage." instead of "+25% attack and +1
capture for spear soldiers."

See also D1720, D1806, D1807.

The `formation` and `garrison` type aura descriptions are ugly;
improvement suggestions are welcome.

Test Plan: Check for mistakes and omissions.

Reviewers: Gallaecio, Freagarach

Reviewed By: Gallaecio, Freagarach
Subscribers: Freagarach, elexis, Vulcan

Differential Revision: https://code.wildfiregames.com/D1808
This was SVN commit r22905.
2019-09-15 11:48:59 +00:00
Gallaecio 795f453eb7 manual/intro.txt corrections
Summary:
Another follow-up to D1719 and D1744. This one does the following:
* [font="sans-14"] (default) at the end of the line that used a
different font, rather than at the beginning of the next line (no net
change, but looks better in the file)
* two spaces for indentation of hotkeys (looks better in game)
* ` – ` (space en-dash space) instead of `: ` (colon space) to separate
hotkey and description, for better visibility and consistency.
* `6400px by 4800px` → `6400×4800 pixels`
* removed Alt+W entry (superseded by Alt+Shift+W above)
* inserted Esc entry under save game for completeness
* rephrased several descriptions

Before: {F1014718}
After: {F1014719}

Test Plan: Launch the game and open the manual.

Reviewers: O7 Catchall, Gallaecio, elexis, Itms

Reviewed By: Gallaecio
Subscribers: Freagarach, O8 JS GUI, Stan, elexis

Differential Revision: https://code.wildfiregames.com/D2110
This was SVN commit r22904.
2019-09-15 11:44:48 +00:00
elexis 98b8775cd9 Fix glooxwrapper::Message::when() memory leak in f2c76cc75d, refs #3156.
Differential Revision: https://code.wildfiregames.com/D2291
Tested on: clang 8.0.1

This was SVN commit r22903.
2019-09-15 10:28:23 +00:00
wraitii d592bf9cb6 Move path computations to an actual worker to prepare for threading.
This moves the "async" pathfinding computations to a worker, preparing
the architecture for threading.

Tested By: Kuba386, Stan`
Differential Revision: https://code.wildfiregames.com/D1918
This was SVN commit r22902.
2019-09-15 09:27:10 +00:00
wraitii 2333b1814e GUI support for Status Effects and extend their functionality to all attack effects following 16b452cf91
This fixes status effects following 16b452cf91 where the GiveStatus name
change broke them.

This lets status effects deal all types of damage, capture, or inflict
other status effects, like any attack.
This further adds some basic GUI spport to status effects, by showing up
to 5 icons in the top-right of the portrait, and including status
effects in the tooltips.

Status effects can specify a custom icon.

Differential Revision: https://code.wildfiregames.com/D2218
This was SVN commit r22901.
2019-09-15 09:24:52 +00:00
elexis 89e511def9 Allow JS GUI pages to find out if the game is running.
Differential Revision: https://code.wildfiregames.com/D2289
Tested on: clang 8.0.1.

This was SVN commit r22900.
2019-09-14 15:33:46 +00:00
elexis cab920696c Implement glooxwrapper::MUCRoom argument for muc event handlers.
I.e. don't dereference NULL if the user of the glooxwrapper library
reads from the provided room argument.
A step towards being able to use XmppClient with multiple rooms.

Differential Revision: https://code.wildfiregames.com/D2287
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22898.
2019-09-13 15:24:44 +00:00
elexis a84e2e57df Use ScriptInterface::CreateObject for ToJSVal<CColor>, and for ToJSVal<Grid<u8> >, ToJSVal<Grid<u16> > used by the AIManager obtaining the pathfinder grid.
Make that function static, so that it can be used for these functions
without slowly having to obtain the ScriptInterface instance using
GetScriptInterfaceAndCBData just to get the JSContext again.
Remove few redundant conversions for CreateObject arguments.

Differential Revision: https://code.wildfiregames.com/D2128
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Tedious performance testing in: D2128, D2127

This was SVN commit r22894.
2019-09-13 00:56:51 +00:00
elexis 7f943b07b7 Enable no-caller and no-irregular-whitespace in ESLint, refs #5524.
https://eslint.org/docs/rules/no-caller
https://eslint.org/docs/rules/no-irregular-whitespace

Differential Revision: https://code.wildfiregames.com/D2237
Patch By: Krinkle
This was SVN commit r22893.
2019-09-12 21:36:42 +00:00
elexis cbc04ba83b Use all three color channels when loading heightmaps following 204b04f2d4, refs #5018.
Removes wrong debug leftover line from 204b04f2d4 and unneeded clamp
from c9abf6f68c.

Differential Revision: https://code.wildfiregames.com/D1816
Patch By: Angen
Comments By: Vladislav
This was SVN commit r22892.
2019-09-12 19:30:43 +00:00
elexis 4c454f3eee Fix missing wstring_from_utf8 for multi-user-chat messages and translated strings following 9023f4bebb / D2264.
The commit introduced support for arbitrary lobby CreateGUIMessage
JS::Value arguments but didn't transfer wstring_from_utf8 appropriately.
Instead of enlengthening the code by reintroducing utf8_from_wstring
everyhwere, shorten the code and specialize ToJSVal for
glooxwrapper::string and gloox enums.

Avoid string copies for XmppClient getters, refs D1668:
Change GetPresence() and GetRole() to return the pointer to the string
literal instead of copy constructing a std::string each call.
Don't reintroduce the unneeded utf8_from_wstring conversions for the
untranslatable ASCII identifiers returned by GetPresence() and
GetRole().
Change GetSubject() to return a const ref to the member instead of copy
assigning the std::string to an output value.
Change m_Subject to std::wstring to avoid constructing a copy using
wstring_from_utf8 each GetSubject() call.
Change gloox enum to translatable string functions to be static, so as
to use them in the new ToJSVal functions (enabled by not calling
CertificateErrorToString from ConnectionErrorToString anyymore in
92fc34c87c/D2274).

Avoid per-player string copies in m_PlayerMap:
Change m_PlayerMap value type from std::vector<std::string> to a new
PlayerMap struct with named members for readability.
Use gloox enums as PlayerMap values to avoid constructing (performance)
and storing (memory footprint) std::strings.
The JS String is created from the pointer to the ASCII string literal
without intermediaries.
Use glooxwrapper::string for nickname and m_Rating since it's the data
source type received in relevant places, but that might be improved for
performance with std::wstring.

Construct map values in place where possible and post error instead of
silently inserting if an existing value is to be modified.
Avoid repeated std::map lookups on string keys by caching the
PlayerMap::iterator where available.

Remove some glooxwrapper::string to_string() calls redundant with its
operator<< and improve DbgXMPP gloox enum output.
Transfer rating too upon nickchange.

Differential Revision: https://code.wildfiregames.com/D2271
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22891.
2019-09-12 17:23:33 +00:00
Stan 8f3277cb99 Add new improved berry bushes based on the old grapes actor.
Discussed with: @elexis
Refs: 4981cdedad
Thread:
https://wildfiregames.com/forum/index.php?/topic/17326-your-screenshots/page/23/

This was SVN commit r22889.
2019-09-11 12:51:16 +00:00
elexis 28aa7c20e4 Fix lobby playerlist rebuild following presence update message removal in 6bf74902a7/D2265.
Update the list when the data it is built from changes, not only for
presence changes.

Differential Revision: https://code.wildfiregames.com/D2283
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22888.
2019-09-11 11:51:34 +00:00
elexis f77a3e289c Fix historic lobby kick messages following arbitrary CreateGUIMessage arguments in 9023f4bebb/D2264.
Perform the freezing for historic messages equally.

Differential Revision: https://code.wildfiregames.com/D2282
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22887.
2019-09-11 10:15:13 +00:00
wraitii 2233a76e2a Fix units sometimes turning around when fleeing (introduced by D1987/99a341f379)
D1987/99a341f379 introduced logic to predict the target movement, which
fixed unit chasing. However, sometimes fleeing units would then predict
that their target will end up in front of them, so they turned around
towards the attacker.

This is fixed by not anticipating the position when it would cause the
vector towards to target to change direction.

Reported By: Freagarach
Tested By: Freagarach
Fixes #5541

Differential Revision: https://code.wildfiregames.com/D2275
This was SVN commit r22885.
2019-09-10 18:11:07 +00:00
Stan 4b0b545fa9 Use the pyrogenesis logo instead of the 0 A.D. logo for the modmod when there is no mod selected because 0 A.D. Empires ascendant is just a mod of Pyrogenesis
Fixes #4782

refs: a89bcf837b f46d721630, 27d99765bb

This was SVN commit r22884.
2019-09-10 13:51:50 +00:00
Stan 68705aa4b2 Fix the walk/feeding animation of the gazelle.
Assign the basic_trans material.
Reported by: @Freagarach
This was SVN commit r22883.
2019-09-10 07:54:16 +00:00
LordGood d59472fd42 ptolemy houses, Enrique's pines
This was SVN commit r22881.
2019-09-09 23:21:28 +00:00
elexis 92fc34c87c Pass XmppClient CertificateErrorToString independent of ConnectionErrorToString to JS using D2264 / 9023f4bebb, refs #4482.
This also allows making the enum to string functions static, refs D2271.

Differential Revision: https://code.wildfiregames.com/D2274
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22880.
2019-09-09 21:26:58 +00:00
elexis 158ba53a46 Fix missing XmppClient m_certStatus and m_PresenceUpdate member initialization following 0e2adda813 and 6bf74902a7.
This might explain unexpected TLS certificate error strings upon failed
TLS handshake, refs #4705.
Might or might not fix a conditional valgrind conditional jump depending
on uninitialized value error reported in P170 for the XmppClient
constructor (inconsistent test results).

Differential Revision: https://code.wildfiregames.com/D2278
Tested on: clang 8.0.1, gcc 9.1.0, Jenkins

This was SVN commit r22879.
2019-09-09 20:50:17 +00:00
wraitii fcc7a831bb Fix issues with MakeGoalReachable when the goal wasn't reachable following D1882/208fc30ddd
This fixes the issue and adds a regression test.

Differential Revision: https://code.wildfiregames.com/D2277
This was SVN commit r22878.
2019-09-09 18:57:59 +00:00
wraitii 9cc8a579f5 Silence uninitialized variable warnings on MakeGoalReachable and FindNearestNavcellInRegions in 208fc30ddd
These variables might be used uninitialised in very odd cases that don't
happen in svn.

Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2250
This was SVN commit r22877.
2019-09-09 18:56:49 +00:00
elexis d7e08a848a Beautify civinfo page with bullet points.
Differential Revision: https://code.wildfiregames.com/D2221
Patch By: Nescio
Comments By: Freagarach
This was SVN commit r22876.
2019-09-09 18:40:42 +00:00
elexis ee726a155c Translate lobby TLS certificate error strings following 0e2adda813 and string freeze lift, refs #4705.
Differential Revision: https://code.wildfiregames.com/D2272
This was SVN commit r22875.
2019-09-09 14:33:30 +00:00
Alexandermb 452c376fc0 Delete old roman helmet prop actor from roman infantry swordsman elite.
This was SVN commit r22872.
2019-09-08 12:50:49 +00:00
Stan efd77bd83d Fix a missing stoa template in the Miletus scenario following 97ee3211d4
This was SVN commit r22871.
2019-09-08 12:39:05 +00:00
Stan 1b8dcec53d Fix ptol temple's (from 7943d82bfe) rubble size and foundation size using the closest matching rubble and foundation. Rubble is currently not using correct units and is close to the size of the 5x9 foundation. The temple is a bit bigger than that one but we don't currently have anything bigger.
Reported by: @Nescio
This was SVN commit r22870.
2019-09-08 09:44:33 +00:00
LordGood 06fe767ffe fixed garrison flag on ptolemaic temple
This was SVN commit r22869.
2019-09-08 00:26:57 +00:00
elexis bfc34f3f58 Fix previous (invalid Freeze 508da732af).
This was SVN commit r22868.
2019-09-07 17:04:04 +00:00
elexis 508da732af Implement NetClient PushGuiMessage using parameter pack and ScriptInterface::CreateObject from D2080 / b4626359f5 to replace remaining Eval function calls.
Specialize ToJSVal<char[n]> to allow passing string literals as
arguments.
Freeze NetClient GUI messages.
Supersede related c-style casts with static casts.
Remove few unneeded conversions.

Differential Revision: https://code.wildfiregames.com/D2267
Tested: clang 8.0.1, Jenkins

This was SVN commit r22867.
2019-09-07 16:51:44 +00:00
wraitii f29159b935 Generalise attack tooltips after D2092/16b452cf91.
This allows attacks with both capture and damage effects to show both,
and centralises display between regular attack and Splash.
It also reverts a change from e05c8263c5 which incorrectly switched
'Interval' and 'Rate'.

Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2138
This was SVN commit r22866.
2019-09-07 14:47:39 +00:00
wraitii 43bbd7d671 Check only that the destruction queue contains no non-local entity when serializing the game state.
Local entities being in the destruction queue when serialising is not an
issue since those should not affect the simulation anyways. This stops
the game from crashing in some rare situations.

Fixes #4616

Differential Revision: https://code.wildfiregames.com/D1738
This was SVN commit r22865.
2019-09-07 14:41:53 +00:00
wraitii 524422c7d8 Move "PlayersToDamage" from calling functions to "CauseDamageOverArea" and replace it with FriendlyFire.
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2064
This was SVN commit r22864.
2019-09-07 13:48:11 +00:00
elexis de050ef7e2 Remove some unused Profiler.h and CLogger.h includes.
NativeWrapperDefns.h from 4e87fef3da, found in audit of 7c21a0cf8e.

Differential Revision: https://code.wildfiregames.com/D2268
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22863.
2019-09-07 13:35:45 +00:00
wraitii b1de59de66 Fix algorithmic error in 9903fd8a6c (waves computation speedup), and delete unused code.
9903fd8a6c introduced a much faster (for a little precision cost)
algorithm to compute distance to shore. However a condition was
incorrectly inverted, which made the algorithm return less-than-sensible
results in many situations.

Further, there was some unused code left behind which is now removed.

Fixes #5580

Reported by: nani (shore bug), elexis (unused code)
Differential Revision: https://code.wildfiregames.com/D2249
This was SVN commit r22862.
2019-09-07 08:50:55 +00:00
elexis 10f805fcf4 Fix wrong "player is not a moderator anymore" lobby chat message following initial implementation in 76bc9b579a/D339, fixes #4877.
It needs to test against the historic role and not the current role,
similar to 8b437a0b1c, refs #3386.
Implements the third GUI message property using the arbitrary lobby GUI
message patch in 9023f4bebb/D2264, refs #4482, 6bf74902a7/D2265.

Differential Revision: https://code.wildfiregames.com/D2266
Tested on: clang 8.0.1

This was SVN commit r22859.
2019-09-06 16:56:43 +00:00
elexis 9023f4bebb Support creating lobby GUI messages with arbitrary arguments instead of forcing every message type into the same struct type, refs #4877 / 76bc9b579a / D339.
Creates the GUI messages directly as JS::Values and removes the
intermediary rigid struct.
Implementation similar to ScriptInterface::CreateObject from D2080.

Differential Revision: https://code.wildfiregames.com/D2264
Tested on: clang 8.0.1, Jenkins

This was SVN commit r22856.
2019-09-06 05:14:20 +00:00
elexis 6bf74902a7 Drop lobby presence GUI messages altogether for better performance and less code complexity.
They were only used to determine whether the playerlist should be
rebuilt, which can be achieved by a boolean member.
So this patch is removing unnecessary indirection from the original
solution in 8b437a0b1c and the reduction in 16b976fc35, refs #3386.
In particular the LobbyClearPresenceUpdates call was ugly and one doesnt
need hundreds of messages with data on it each if one only wants to know
if there was one.
Makes past (e8dfde9ba6) and future (D2264) patches less complex, refs
#4877.

Differential Revision: https://code.wildfiregames.com/D2265
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins

This was SVN commit r22855.
2019-09-06 02:53:22 +00:00
elexis adf448db4d Rewrite Main Menu.
Specify menu and submenu buttons title, tooltip, hotkey and actions
comfortably in an extensible JS object and derive the GUI object
settings based on that rather than relying on complex markup alternating
with JS in the same file.
Automatically compute the position and number of submenu items instead
of letting the author manually compute and keep that in sync in various
places of the XML file.

Use object oriented programming, so that there is a strong separation of
concerns, allowing the readers and authors to only involve themselves
with the component relevant to the feature they work on, refs #5387.
Use class keyword instead of prototype keyword for the JS classes,
because that enforces a policy where no globals are inserted between
class members and informs the reader of that as soon as reading the
classes first line, anticipating fragmentation.

Group project information and community links in a more clearly arranged
JS file.
Keep and document splashscreen onTick hack from a684f7646b, #2042,
#5578.
String change: Inform instead of warn (deter) about the state of the
game in the main menu.
Depends on Engine.SetGlobalHotkey from D2260.

Differential Revision: https://code.wildfiregames.com/D2240
Class syntax comments by: Krinkle, bb, Chakakhan, smiley, nani, fpre
Main menu comments by: Krinkle, nani, Stan (and Imarok in D820)
This was SVN commit r22854.
2019-09-06 01:20:46 +00:00
elexis afaa4417e4 Add ScriptInterface::AssignOrToJSVal<JS::Heap<JS::Value> > to support ScriptInterface::SetGlobal, SetProperty, CreateObject with JS::Heap values.
Differential Revision: https://code.wildfiregames.com/D2263
Tested on: gcc 9.1.0, Jenkins
Refs D2264

This was SVN commit r22853.
2019-09-05 16:45:16 +00:00
Alexandermb e7ebe821c0 Remove helmet during attack_slaughter animation.
Mentioned by @elexis in 65d2c26261

This was SVN commit r22852.
2019-09-05 10:57:37 +00:00
elexis f192d4a2fa Support assigning functions to hotkeys from the JS GUI without involving a GUI object.
Allows developers and modders to register and unregister hotkeys without
having to specify, change or overwrite XML files.
Also allows implementing the main menu GUI page with only GUI objects
for one submenu, refs #5387 / D2240.

Differential Revision: https://code.wildfiregames.com/D2260
Idea by nani in D2257.

This was SVN commit r22851.
2019-09-05 10:42:16 +00:00
Alexandermb eb87783f22 Correct shield_shieldsmall.dae > shieldsmall.dae
This was SVN commit r22849.
2019-09-05 00:29:52 +00:00
Stan 5109cda169 Improved mining animation.
Patch by: @Alexandermb
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/16/

This was SVN commit r22848.
2019-09-04 21:00:31 +00:00
elexis d5c1fd09a4 Add ToJSVal<CRect> to make the conversion reusable, remove unused PSERROR_Scripting_ConversionFailed and dead catch.
Avoids the CRect copy or stops relying on optimization to avoid the
copy.
Split from D2142.

Differential Revision: https://code.wildfiregames.com/D2259
Tested on: gcc 9.1.0, Jenkins

This was SVN commit r22847.
2019-09-04 16:15:37 +00:00
elexis c25ab670e6 Don't crash if a JS GUI author calls Engine.PopGuiPage too often.
Differential Revision: https://code.wildfiregames.com/D2255
Tested On: clang 8.0.1, Jenkins
Comments By: Stan
This was SVN commit r22846.
2019-09-04 15:45:48 +00:00
elexis 33af6da5e1 Implement JS support for GUI object "hotkey" setting missing from 6d8b9e33ef, refs #567, #2604, 9e499cdec5.
Allows JS GUI to assign hotkeys to GUI objects from JS instead of XML.

Differential Revision: https://code.wildfiregames.com/D2257
Comments By: nani
Tested By: nani, Jenkins
Tested on: clang, VS2015

This was SVN commit r22845.
2019-09-04 15:29:36 +00:00
Alexandermb 0d47644b08 Replace idle because i can't upload the idle_relax_shieldsmall
This was SVN commit r22844.
2019-09-04 13:24:40 +00:00
Alexandermb fdd64b806c Some fixes to the infantry animations.
This was SVN commit r22843.
2019-09-04 13:13:29 +00:00
elexis f352d02caf Don't issue invalid move commands visualized with target markers in observermode following a1ddf6114a/D1021, refs #4791, #4302, e256d85305.
Differential Revision: https://code.wildfiregames.com/D2210
This was SVN commit r22842.
2019-09-04 12:55:16 +00:00
Stan cf45819cd2 Revert the quarry change from 4981cdedad and instead create a new template to accommodate the new quarry model.
Reported by: @elexis
This was SVN commit r22841.
2019-09-03 16:08:03 +00:00
Stan 3a31af7e92 Add description and demo keyword missing from 55b3086c03
Reported by: @elexis
This was SVN commit r22840.
2019-09-03 15:59:38 +00:00
Alexandermb 65d2c26261 Fix the issue with the formations and groups in actors And some corrections to variants.
This was SVN commit r22839.
2019-09-03 15:21:14 +00:00
Stan e008b394bc Fix the indent in ef53d85ee4
This was SVN commit r22838.
2019-09-03 09:48:23 +00:00
Stan ef53d85ee4 Rename the unusable 'roads/medit_city_tile.xml' to 'roads/medit_city_tile_02.xml' so that it can be used again. It was broken since its addition in 88ab3f0f5b. Make use of the normal and spec maps and rename them with the same convention.
Fixes #5558

This was SVN commit r22837.
2019-09-03 09:45:41 +00:00
elexis b7c59622ec Remove two GetTemplateDataHelper unused arguments following 1b20ac7671 and 6643613b54, refs #3934, #4801 / D1938.
Reported By: Polakrity
This was SVN commit r22836.
2019-09-03 09:42:37 +00:00
elexis ade8bcc0b8 Fix some Petra whitespace; with b59198524f/D2103 fixes all ESLint issues in petra/, refs #5524.
Differential Revision: https://code.wildfiregames.com/D1993
Patch By: Krinkle
This was SVN commit r22835.
2019-09-02 21:16:06 +00:00
elexis eb6f14a82d AI prototype chain cleanup.
Use prototype = Object.create(parent) instead of prototype = new
parent(...) to avoid calling the constructor needlessly (as it is
redundant with the base constructor call in the constructor calls the
parent constructor).

Testfile reference comes from 7c2e9027c2,
"initial terrible AI player scripts" had it since 57e5bb878a,
jubot copied it since 02ed11ac54,
qbot copied it since b146f53d7b
qbot-wc (later aegis) copied it since 45ee419171,
aegis copied it since bcf7115b5c,
petra copied it since 97afd25171.

d23b7deb98 used Object.create correctly for new code in aegis that was
adopted for petra too in 97afd25171.

Differential Revision: https://code.wildfiregames.com/D2238
Patch By: Krinkle
This was SVN commit r22834.
2019-09-02 17:33:59 +00:00
elexis 86fc1cf99c Gamesetup OOP cleanup, refs #5322.
Move updateAutocompleteEntries to g_MiscControls from b4e5858f6d/D322 to
remove a global variable, a global procedure, reduce updateGUIObjects
logic and increase logical grouping.
Rename autoCompleteNick to autoCompleteText since it's not only used for
nicknames following b4e5858f6d.

This was SVN commit r22831.
2019-09-02 02:13:11 +00:00
Gallaecio 749fbf7b5b legionnaire → legionary (4)
Differential Revision: D1780
This was SVN commit r22830.
2019-09-01 19:23:52 +00:00
elexis 283c7b58e2 Gamesetup cleanup, refs #5322.
Inline toggleReady from d1d7afe46c which became a oneline proxy to
setReady in 903803ceec used only in one place.
Inline senderFont and use setStringTags using 3cfb8730a8 from
Freagarachs patch in D2151.

This was SVN commit r22828.
2019-09-01 18:07:06 +00:00
elexis f04c6b68de Gamesetup OOP refactoring, refs #5322.
Move rightAlignCancelButton from 565709701e to g_MiscControls from D322
/ b4e5858f6d.
Move civResetButton from 78accf3d97 and teamResetButton from b134047abe
to g_MiscControls, refs #3805.
The constant string and constant function value assignment can be
reverted if performance is valued over code structuring.

This was SVN commit r22827.
2019-09-01 16:47:46 +00:00
elexis 398475b4ef Gamesetup OOP cleanup, refs #5322.
Move procedural updateGameDescription and getMapPreview to OOP
g_MiscControls from b4e5858f6d/D322.
Delete unused variable childSize following ac7b5ce861.
Remove host check in launchGame from 1c0536bf08 needless since
d1d7afe46c.

This was SVN commit r22826.
2019-09-01 15:35:10 +00:00
wraitii 67795d4451 Fix duplication and clang warning in unreachable gathering target fix 30dcd696eb / D2120
The function was put in an anonymous namespace to avoid linking errors
should another one be defined elsewhere.

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2243
This was SVN commit r22825.
2019-09-01 14:10:02 +00:00
wraitii 705266ceb2 Match unit classes with templates names
Remove Spear class from pikemen templates.
Give Macedonian Gastraphetes Crossbowman class, as it is a special unit.
Give Kushite Clubman the Clubman class, again a special unit.
Make FishingBoat a visible class.
Introduce Bireme, Trireme and Quinquereme visible classes.
Remove Melee class from Maurya Trireme.
Move Organic to template_unit as most units have it, remove it in
appropriate children templates.
List VisibleClasses directly after Classes.
Rename:
  - Axe -> Axeman
  - Javelin -> Javelinist
  - Pike -> Pikeman
  - Sling -> Slinger
  - Spear -> Spearman
  - Sword -> Swordsman
  - Catapult -> StoneThrower
Correct other simulation files accordingly.

Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1815
This was SVN commit r22824.
2019-09-01 14:08:07 +00:00
Gallaecio 5fa75e845b legionnaire → legionary (3)
Differential Revision: D1780
This was SVN commit r22823.
2019-09-01 12:00:24 +00:00
elexis 0ecc005654 Remove nonexistent hotkey used in cccc55ce97, undefined until 50166bb456, unused since a964e83c79.
refs #wfg 2008-07-12

This was SVN commit r22822.
2019-09-01 11:22:43 +00:00
Gallaecio 9ced0a4e9c standardize resource tooltips
Differential Revision: D2006
This was SVN commit r22821.
2019-09-01 10:58:12 +00:00
Gallaecio 2e611665c0 standardize civ bonus technology tooltips
Differential Revision: D2187
This was SVN commit r22820.
2019-09-01 10:56:43 +00:00
Gallaecio a9df38d17e legionnaire → legionary (2)
Differential Revision: D1780
This was SVN commit r22819.
2019-09-01 10:53:42 +00:00
Gallaecio f27f481880 legionnaire → legionary
Differential Revision: D1780
This was SVN commit r22818.
2019-09-01 10:52:52 +00:00
wraitii 208fc30ddd Optimise MakeGoalReachable and FindNearestNavcellInRegions (D53 outtake)
By leveraging custom ordering in std::set, MakeGoalReachable and
FindNearestNavcellInRegions can be optimised and the code simplified.

Differential Revision: https://code.wildfiregames.com/D1882
This was SVN commit r22817.
2019-09-01 08:59:17 +00:00
wraitii 30dcd696eb Improve gathering behaviour when a target is not reachable
Units can be stuck in gather states when the target ought to be
collectable from, but it's actually unreachable.

A new FINDINGNEWTARGET intermediate state for GATHER will try and find a
new, different target to collect from. This should generally improve the
behaviour (perfect reachability checks would be required to completely
fix it).
Use this also when the target is knowably unreachable / uncollectible.

Fixes #5529

Differential Revision: https://code.wildfiregames.com/D2120
This was SVN commit r22816.
2019-09-01 07:35:32 +00:00
wraitii 9e41ff39fc Unit Motion - make sure units don't get stuck in the special long-path computation step.
In some rare cases, units could be stuck in the special state of 3
failed path computations, making them always compute long paths instead
of trying short paths again. This can happen when they compute a long
path successfully, but the unit cannot actually move as it gets
obstructed right away.
Make sure this state is never kept for more than one turn to fix this
problem.

Refs #5569 (probable fix but kept open for further investigating).

Differential Revision: https://code.wildfiregames.com/D2239
This was SVN commit r22815.
2019-09-01 07:31:21 +00:00
wraitii 2c229a986d Further fixes for Generalized Attack D2092/16b452cf91
Iterating over attack effects incorrectly returned instead of continuing
when the target did not have a receiver.
Polar Sea triggers used Attack instead of Attacking.

Reported By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2235
This was SVN commit r22814.
2019-09-01 07:28:50 +00:00
wraitii dd86d599f5 Fix modifiers affecting player entity following ModifiersManager component in e16c4c4800
Modifiers affecting the player entity itself were not applying
correctly.
The reason was that the cache was not correctly reset.
Adds a regression test.



Reported By: Minohaka
Tested By: Minohaka
Refs #5572 (probably fixed but kept open for verifiation).

Differential Revision: https://code.wildfiregames.com/D2236
This was SVN commit r22813.
2019-09-01 07:16:02 +00:00
Alexandermb a8afe55b02 Following 4c2b3b6fda Mesh wasn't committed.
This was SVN commit r22812.
2019-08-31 19:40:35 +00:00
Alexandermb 4c2b3b6fda Rome Infantry Spearman helmet (Apulo Corinthian)
Update of Apulo-Corinthian Type helmets replacing the ones i've did
before with a better quality ones.

Thread:
https://wildfiregames.com/forum/index.php?/topic/24494-task-roma-helmets/&do=getNewComment

This was SVN commit r22811.
2019-08-31 19:38:03 +00:00
wraitii 055935fa0e Remove Mechanical class in favour or using Siege and Ship.
Mechanical was a union of Siege and Ship and not very used.
The '_mechanical' part of template names was removed in d3a73f0611.

Replace its usage with Ship and/or Siege where relevant.

Reviewed By: wraitii
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2201
This was SVN commit r22810.
2019-08-31 12:44:48 +00:00
wraitii 74ac1111b6 Change CitizenSoldier class to Citizen and/or Soldier in auras and technologies.
Usage of these classes was inconsistent, and CitizenSoldier is a
non-visible class so should not be used in data files.

Reviewed By: wraitii
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D2200
This was SVN commit r22809.
2019-08-31 12:41:43 +00:00
wraitii 381bdcbade Fix cc1ea7cca0 error in Promotion when promoting an entity that died on the same turn.
Add a regression test for this case.

Reported By: elexis
Differential Revision: https://code.wildfiregames.com/D2227
This was SVN commit r22808.
2019-08-31 12:38:38 +00:00
elexis 395fae107b Fix missing PushGuiPage callback replacement in session/ openManual() in 86c151ebaa, refs D1684.
This was SVN commit r22807.
2019-08-31 11:00:26 +00:00
LordGood 7943d82bfe Cypresses, maritime pines, emergent teak variant, grasses ptolemaic tower, walls and temple commit, ptolemaic texture split
This was SVN commit r22804.
2019-08-30 00:19:16 +00:00
elexis b59198524f Remove PETRA Module and Augmentation pattern from 3362c591f5, refs #2322, and in Petra since 97afd25171.
The objective of 3362c591f5 to have only one global for multiple AIs is
still achieved by not changing the resulting object structure.
The advantage of not using the pattern is to have less parental scopes,
i.e. more localization and separation of concerns.
This resembles the successful simulation script component system.
The stated benefits of the Augmentation pattern were never used, because
there are (luckily) no such private variables or globals passed as
arguments.

Fixes an ESLint warning about using PETRA before it is defined, refs
#5524, D1993.
Fixes the missing level of indentation if indentation should represent
scoping proportionally.

Remove superfluous, thus misleading name PetraBot in PETRA.PetraBot
assignment.

Differential Revision: https://code.wildfiregames.com/D2103
Patch By: Krinkle
Related comments by: Yves, wraitii, Philip, leper on #0ad-dev on
December 2013, see #2322
Source was:
http://www.adequatelygood.com/JavaScript-Module-Pattern-In-Depth.html

This was SVN commit r22803.
2019-08-29 18:12:53 +00:00
Stan bc9116cdfb Use the @wowgetoffyourcellphone's Uffington Horse as the Briton Wonder committed in @Enrique's special commit 83680b0dee. As such the building is no longer garrisonable, and no longer gives a population bonus.
Discussed with: @wowgetoffyourcellphone
Thread 1:
https://wildfiregames.com/forum/index.php?/topic/20986-civ-britons/&tab=comments#comment-318536
Thread 2:
https://wildfiregames.com/forum/index.php?/topic/17495-task-wonder-britons-stonehenge-and-white-horse/page/6/&tab=comments#comment-298890

This was SVN commit r22802.
2019-08-29 15:55:12 +00:00
elexis 9c6039e4fe Solemnly delete class GUI and rename GUIUtil.h to CGUISetting.h.
Finishes GUIutil rewrite and fixes #5575.

Differential Revision: https://code.wildfiregames.com/D2233
Test on: clang 8.0.1, Jenkins

This was SVN commit r22801.
2019-08-29 09:07:29 +00:00
elexis 0c3a610acc Delete invalid ModmodScrollbar style use and style property from 64bfa089af and 833c9f108c, identified by the LOGWARNING from be963ec9b7, reported by nani.
This was SVN commit r22800.
2019-08-29 07:56:26 +00:00
Alexandermb 18c90ce449 Fix female axe position while gathering wood.
Reported by @wowgetoffyourcelphone

This was SVN commit r22798.
2019-08-28 17:51:49 +00:00
elexis fac98e7afb Move other/wallset_palisade to structures/wallset_palisade, refs #4770, D1002, D1798.
Differential Revision: https://code.wildfiregames.com/D1881
Patch By: Nescio
While at it, fix ESLint overshadowing warning in survival triggers from
804fd4be61, unnoticed in b8fbfe2d20 and 18e7d8a518 but noticed by
Jenkins.

This was SVN commit r22797.
2019-08-28 12:06:59 +00:00
elexis 1a49ccb294 Move static GUI<>::SetSetting operating on IGUIObject to a member IGUIObject::SetSetting.
Remove PSERROR codes from SetSetting (let std::map throw an out_of_range
if a caller wants to Set a setting that doesn't exist without having
checked with SettingExists, equal to GetSetting from 92b6cdfeab).
That also simplifies std::function SetSettingWrap construct from
0a7d0ecdde to void IGUIObject::SettingChanged.
Don't trigger debug_warn or exceptions in GUITooltip::ShowTooltip if the
XML author specified wrong tooltip input, and dodge another
dynamic_cast.

Rename existing IGUIObject::SetSetting to
IGUIObject::SetSettingFromString and comment that it is purposed for
parsing XML files.
Remove SetSetting default value, so that authors are made aware
explicitly of the need to decide the function broadcasting a message,
refs d87057b1c0, 719f2d7967, ...
Change const bool& SkipMessage to const bool SendMessage, so that a
positive value relates to a positive action.
Clean AddSettings whitespace and integer types.

Differential Revision: https://code.wildfiregames.com/D2231
Tested on: gcc 9.1.0, clang 8.0.1, Jenkins
Comments By: Philip on IRC on 2010-07-24 on GUIUtil being ugly, in case
that one counts

This was SVN commit r22796.
2019-08-28 11:21:11 +00:00
Alexandermb 36e2c1caf8 Remove now unused rome_helmet_attic.xml due to better version (both done by myself)
This was SVN commit r22794.
2019-08-27 23:31:10 +00:00
wackyserious a5679ddcd4 Texture Update: Seleucid Pikeman and Cataphract
Thread:
https://wildfiregames.com/forum/index.php?/topic/26907-task-compounded-linothorax-unit-texture/&tab=comments#comment-383735

General Discussion:
https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-general-thread/page/9/#comments

Reviewed by: Lordgood, Alexandermb and wowgetoffyourcellphone
This was SVN commit r22793.
2019-08-27 21:21:07 +00:00
elexis be963ec9b7 Delete 27 invalid style settings and add LOGWARNING to inform future authors.
Unify the two IGUIObject::LoadStyle functions and remove CGUI argument
that is always identical to the member.

Differential Revision: https://code.wildfiregames.com/D2232
Tested on: gcc 9.1.0., clang 8.0.1, Jenkins

This was SVN commit r22792.
2019-08-27 16:03:24 +00:00
elexis 0a6b650189 Delete SGUIMessage GUIM_SETTINGS_UPDATED broadcasts redundant with the broadcast initiated from SetSetting from e21ebb37f5.
659a9ea57a introduced the call rightfully in ShowTooltip since
CTooltip::SetupText() depends on the just changed _mousepos setting.
But then 0382cdd9b1 moved that _mousepos SetSetting call, resulting in
the message becoming redundant; and it inserted the second redundant
message in HideTooltip.

These were the only redundant SGUIMessage HandleMessage calls.

This was SVN commit r22790.
2019-08-26 23:39:16 +00:00
elexis 92b6cdfeab Move static GUI<>::GetSetting operating on IGUIObject member to a IGUIObject member function, grouping it with SettingExists and AddSetting.
Differential Revision: https://code.wildfiregames.com/D2230
Tested on: gcc 9.1.0, Jenkins

This was SVN commit r22789.
2019-08-26 12:25:07 +00:00
wraitii 85d01b839c Fix attack/armor techs not applying after 16b452cf91, and fix auras/techs affecting capture rate.
Reported By: Nescio
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2224
This was SVN commit r22786.
2019-08-25 18:03:32 +00:00
elexis 719f2d7967 Remove default CGame constructor values to make the code less error-prone, use CRenderer::IsInitialised() to test if the CGame should be rendered to remove indirection/proxies, making the code easier to read.
1c0536bf08 introduced a disableGraphics bool with a default value and
relied on the default being reasonable except for the few needed cases.
be93b31411 introduced the replayLog argument with a default value and
relied on the default being reasonable except for the few needed cases.
5747619c39 fixed a bug in that commit because the default value hadn't
actually been considered to be correct for all CGame constructor calls
and was wrong for two.

By requiring callers to specify the value, authors are forced to
establish thought which value is the correct one, as opposed to hoping
that a default value will be good by default.
As you can see in the diff, it also makes it easier to compare what
values changed if they are always defined in the caller.

Use CRenderer::IsInitialised() to determine if this is a non-visual
CGame,
for the purpose of removing less transparent proxy functions that are
unneeded as long as there are about 30 other calls testing for
CRenderer::IsInitialised() to determine if the Game should be rendered.

Supersedes:
* CGame constructor argument bool disableGraphics from 1c0536bf08.
* CGame::IsGraphicsDisabled() proxy from a533fff883 to the proxy from
1c0536bf08 and two local nonVisual = args.Has("autostart-nonvisual")
variables in GameSetup.cpp from a533fff883.

Call the Renderer destructor instead of calling delete on the
non-pointer (SAFE_DELETE would not be supported for instance).

Started as a preparation for D2197, but actually independent.

Differential Revision: https://code.wildfiregames.com/D2211
This was SVN commit r22785.
2019-08-25 11:02:55 +00:00
Gallaecio 336c423e8e standardized structure aura descriptions
Patch By: Nescio
Differential Revision: D1806
This was SVN commit r22784.
2019-08-25 09:20:43 +00:00
Gallaecio 27a190578f correct descriptions and tooltips of siege technologies
Patch By: Nescio
Differential Revision: D2186
This was SVN commit r22783.
2019-08-25 09:19:01 +00:00
Gallaecio 37a2149cb4 update fortress tooltips
Patch By: Nescio
Differential Revision: D2189
This was SVN commit r22782.
2019-08-25 09:17:58 +00:00
Gallaecio 0dbc66a391 update workshop tooltip
Patch By: Nescio
Differential Revision: D2190
This was SVN commit r22781.
2019-08-25 09:16:53 +00:00
Gallaecio 5f6e2c789c remove incorrect book numbers from Plutarch Moralia
Patch By: Nescio
Differential Revision: D2191
This was SVN commit r22780.
2019-08-25 09:15:23 +00:00
elexis 4919a6185e Remove unused GUIUtil functions, unused GUI includes and some tails in GUIUtil.
HasSetting from 3dfa23cd25 is actually redundant with
IGUIObject::SettingExists.
GetSettingPointer from 8f4f8e240f is superseded by GetSetting reference
following 3dfa23cd25 and 040624acff.
Deregister copying SetSetting variants for CStr and CStrW following copy
removal in 040624acff.
The default template <typename T=int> from c2a71e41bf can be removed
following FallBackSprite/FallBackColor removal in 9985fcf5bd and
RecurseObject unification in d4d5187c9d.
Delete all unused GUI includes, refs D1478.
Remove GUIUtil friend class following something.

Differential Revision: https://code.wildfiregames.com/D2225
Tested on: gcc 9.1.0, Jenkins

This was SVN commit r22779.
2019-08-25 08:57:36 +00:00
elexis b197df5ee6 Fix valgrind conditional jump depending on uninitialised value warning in CGUIManager::HandleEvent from 7c2e9027c2.
The warning seems to be a false positive and happens with clang but not
gcc.

Differential Revision: https://code.wildfiregames.com/D2223
Reviewed By: Vladislav
This was SVN commit r22777.
2019-08-24 22:25:26 +00:00
Alexandermb 9977ddaeff Replace samnite_swordsman.xml actor properly following 31c128b282
reported by: @Freagarach and @Nescio
This was SVN commit r22776.
2019-08-24 19:30:12 +00:00
Alexandermb 31c128b282 Carthaginian mercenaries duplication removal.
Remove duplicated actors from carthaginian civ folder due to redundance
of having twice the same infantry in two folders.

carthaginians/infantry_slinger_e.xml > iberians/infantry_slinger_e.xml

carthaginians/infantry_swordsman_e.xml > gauls/infantry_swordsman_e.xml

Also include a fix for an unsync frame of the idle_ready_shieldsmall.dae
animation.

This was SVN commit r22775.
2019-08-24 18:54:26 +00:00
Alexandermb 51f1436ee2 Add syntagma formation variant for every civ pikeman infantry.
Also add phalanx to hoplite cape.

This was SVN commit r22774.
2019-08-24 18:07:59 +00:00
elexis 55efe4a735 Fix L10n::FormatMillisecondsIntoDateString memory leak following c92e74138a, refs a74fcdcb35, #3350, #4418, #2938.
createDefault returns a new pointer to be deleted, getGMT returned a
pointer to an icu variable not to be deleted.

Differential Revision: https://code.wildfiregames.com/D2220
Reviewed By: Vladislav
This was SVN commit r22773.
2019-08-24 17:33:29 +00:00
wraitii 62dd922bc0 pthread -> std::thread (5/7) - Replace sdl semaphore with condition variable
This removes a dependency on the SDL_Thread header.

Differential Revision: https://code.wildfiregames.com/D1921
This was SVN commit r22772.
2019-08-24 11:26:58 +00:00
Gallaecio b429d0ce03 Quote all book names in quotes.txt
Differential Revision: D2178
This was SVN commit r22771.
2019-08-24 09:24:13 +00:00
wraitii 97ee3211d4 Common template name change: hellenic_royal_stoa → stoa
The old name was unnecessary long, but also potentially misleading:
stoas are Greek, but not necessary royal, and there are no other stoas
in game. Just “stoa” is clearer, more correct, and more consistent with
other `template_structure_*.xml` names.

Patch By: Nescio
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2036
This was SVN commit r22770.
2019-08-24 09:00:46 +00:00
wraitii 9280b57e79 Make damage bonuses, attack preferred classes and garrisonHolder ejectable classes use MatchesClassList.
MatchesClassList supports additional functionalities (and, not and or).

Reviewed By: wraitii
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2115
This was SVN commit r22769.
2019-08-24 08:52:15 +00:00
wraitii 47581ea900 Fix resourceGatherer value modifications following e16c4c4800
e16c4c4800 expects player-wide modifications to invalidate entity
caches.
However, this requires the entity to have an owner when calling
ApplyModifiers.

ResourceGatherer caches its gather rates at Init, when entities do now
yet have their correct owner, and thus this fails.
Since OnOwnershipChanged also caches gather rates however, this call is
redundant (and needlessly slow) so it can just be deleted.

Differential Revision: https://code.wildfiregames.com/D2217
This was SVN commit r22768.
2019-08-24 08:20:30 +00:00
wraitii e16c4c4800 Add a system component to handle stat modifiers, make technologies and auras use this common interface.
The ModifiersManager system component provides an interface to add and
remove modifiers, and get modified stats.
The goal is to merge all the different stat-modifying systems 0 A.D. has
implemented over the years.
This commit makes technologies and auras use ModifiersManager. Some
cheats and AI bonuses also have a similar stat-modifying effect that
have not yet been updated.

Further, this system component makes it possible for e.g. triggers to
easily add modifiers, enabling the writing of Castle Blood Automatic,
RPG or Tower Defense maps without the need for mods or hacks.

The 'Modifier' name was preferred over 'Modification' as it is shorter
and more readable, along with the logic that 'modifiers' store
'modifications' and this stores modifiers. Renaming of other functions
and classes has been left for future work for now.

Internally, this uses a JS data structure. If performance issues arise
with it in the future, this data structure or the whole component could
be moved to C++.
The performance has been tested to be about as fast as the current
implementations (and specifically much faster for global auras with no
icons). Testing showed that sending value modification messages was by
far the slowest part.

Comments by: leper, Stan, elexis
Differential Revision: https://code.wildfiregames.com/D274
This was SVN commit r22767.
2019-08-24 07:37:07 +00:00
elexis 040624acff Replace copy-assigning GUI<T>::GetSetting from c2a71e41bf with the reference returning GetSetting from 3dfa23cd25.
Avoids one or two dozen unoptimizable string copies and two CPos copies,
mostly in SetupText.

The reference return allows to mark values as const where the previous
one prevented that.
This also reveals unused variables where the previous code hid them.

Thus use unused variable "buffer_zone" in the otherwise unused (since
b1422137e5, refs 0f807c643a) CCheckBox::SetupText() from b5f6d19332 and
use the unused variable "scrollbar" in CInput GUIM_MOUSE_PRESS_LEFT from
4113aa0a36.

Refs unintentionally copied DrawCall cache due to GetSetting copying in
c19f3608a5, fixed in 8f4f8e240f.

Differential Revision: https://code.wildfiregames.com/D2215
This was SVN commit r22765.
2019-08-23 14:43:10 +00:00
elexis 4d77bd6542 Fix unused glooxwrapper variable following 61261d14fc, refs #2305, #5294, #5550.
The class didn't leak the m_Wrapped gloox Jingle for this program since
it's not set to owned, and it's not set to owned because gloox deletes
it.
It would have leaked if some other app would have used glooxwrapper with
owned = true, if gloox has a situation for that.

Differential Revision: https://code.wildfiregames.com/D2090
This was SVN commit r22764.
2019-08-23 12:04:20 +00:00
elexis e02afa279c Remove hardcoded C++ fallback font from 70d84beab2 and according TODO from 924b0bf1b4 that was fixed in 6af0d7cfd3 by having the default style specify the default font.
Use references instead of copies for obtaining the font in SetupText().

Differential Revision: https://code.wildfiregames.com/D2214
This was SVN commit r22761.
2019-08-23 03:28:04 +00:00
Alexandermb fcd15d0ad5 Update elephantry_r of the following factions:
carthaginians/elephantry_c_r.xml
ptolemies/elephantry_c_r.xml

Also add new variants for the ptolemaic cavalry.

ptolemies/cavalry_spearman_e_r.xml
ptolemies/hero_cavalry_swordsman_ptolemy_IV_r.xml

This was SVN commit r22760.
2019-08-23 03:07:22 +00:00
Alexandermb 1f6b4702ee Fix the warning of fishermans unrecognized skeleton.
Thread:
https://wildfiregames.com/forum/index.php?/topic/26866-could-not-load-animation/&tab=comments#comment-383334

The issue was a variant "base" file using two of the old armature death
animations.

Also clean the repository from having the old actors with the old meshes
in the meshes/structural folder.

Issue reported by @gameboy

This was SVN commit r22759.
2019-08-23 02:50:55 +00:00
elexis 8609041ddf Fix missing actual boolean check in the commit removing the odd way to check for a boolean in 77b81d8761.
Reported By: Vladislav
Reviewed By: Vladislav
This was SVN commit r22758.
2019-08-23 00:42:00 +00:00
elexis f4990cf967 Mark some GUI functions as const, including the boolean ones from d4d5187c9d.
Rename MouseOver to IsMouseOver.

Reported By: Vladislav
This was SVN commit r22757.
2019-08-22 23:51:10 +00:00
elexis 0e26503cc6 Introduce IGUIObject::PlaySound to unify 19 copies of the UI sound play following 9565c60a14, refs #948.
Stops copying the CStrW each time a sound is played by using the
reference GetSetting variant.

Differential Revision: https://code.wildfiregames.com/D2209
This was SVN commit r22756.
2019-08-22 22:34:12 +00:00
vladislavbelov 659bf68cc7 Cleanup Camera and CGameView, removes a not needed method and refactors classes.
Commented By: Stan
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2195
This was SVN commit r22755.
2019-08-22 20:49:58 +00:00
wraitii 16b452cf91 Generalise Attack effects. All attacks, including death damage and splash, can deal any number of attack effects (damaging, capture, giving status effects.)
This moves most of what was in the Damage system component to a helper,
and renames that component DelayedDamage.
It also introduces a new global script with all possible attack effects.

Comments Taken From: Freagarach, Stan, bb

Differential Revision: https://code.wildfiregames.com/D2092
This was SVN commit r22754.
2019-08-22 18:00:33 +00:00
wraitii cc1ea7cca0 Make Promotion.js use the common Transform helper, add resource gatherer and promotion to said helper.
Fixes #4334

Differential Revision: https://code.wildfiregames.com/D2026
This was SVN commit r22753.
2019-08-22 17:25:44 +00:00
Alexandermb 1d1471aba9 Replace the horse rein with a less basic version
This was SVN commit r22752.
2019-08-22 15:11:07 +00:00
Alexandermb 7efaf75d94 Adjust some helmets following the latest changes on human bodie armature.
(Also remove two files exported from blender by mistake)

This was SVN commit r22751.
2019-08-22 15:06:31 +00:00
Alexandermb e0eb712eb5 Adjust archers right hand position and rotation according to the discussion in the thread.
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/12/&tab=comments#comment-383214

This was SVN commit r22750.
2019-08-22 15:04:49 +00:00
Alexandermb 5bfd0a97eb Update outdated icons and last updated cavalry icons to use the new horse assets
Also separate Gauls from Britons

This was SVN commit r22748.
2019-08-21 18:03:28 +00:00
Alexandermb e513c94366 Fix seleucid hero horse antiochus_the_great from using "objectcolor" material instead of basic_trans_parallax_spec
This was SVN commit r22747.
2019-08-21 17:57:52 +00:00
Alexandermb 7db11d112e Fix warnings mentioned by @Stan
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/12/&tab=comments#comment-383089

This was SVN commit r22746.
2019-08-21 14:18:12 +00:00
Stan 3f9f1e379c Fix the last checkrefs.pl warning.
This was SVN commit r22745.
2019-08-21 13:48:09 +00:00
elexis d4d5187c9d Use variadic template for RecurseObject from c2a71e41bf and move it from GUIutil to IGUIObject.
Unifies the four copies of the function while making it more versatile.
Supersede the hardcoded GUIRR enum and CheckIfRestricted function with a
flexible member function pointer.
Replace the custom IGUIObject iterator with a casually iterable
GetChildren getter, so that it is more obvious what it iterates on.
Implement TODO from e21ebb37f5, i.e. RecurseObject not iterating over
the base object.

Differential Revision: https://code.wildfiregames.com/D2204
Tested on: gcc 9.1.0, clang 8.0.1, VS2015

This was SVN commit r22744.
2019-08-21 13:22:25 +00:00
Alexandermb 0a29e04f1c Fix some warnings and adjust some 1 animation from having sheath throught the leg.
Assign helmet properly to philip_r.

Assing falcata sheath to iberian_infantry

This was SVN commit r22743.
2019-08-21 13:19:32 +00:00
Stan ff1191f538 Fix most of the warnings.
The last one needs a png file see
https://wildfiregames.com/forum/index.php?/topic/26720-task-aspis-remake/page/3/&tab=comments#comment-383062

Add two incorrectly deleted animations in the new folder in 9ef5e274c7
Make the erroring variants use the animations added in 3f0dcc6353 and
cf1e1b463c instead of the 'new' folder.
Make the fisherman use the death animation.
Use the c variant of an animation instead of the d one that does not
exist.

This was SVN commit r22742.
2019-08-21 11:46:12 +00:00
elexis e1014aad3b Use CGUI& instead of CGUI* so that the 50+ users stop wondering whether or not that is null and can't even be mistaken to add redundant null checks preemptively.
Remove the remaining of such checks after d3e56f0f57 removed 21 of them
already.
2c47fbd66a initialized the pointer at construction time rather than at
random conditional events later.

Differential Revision: https://code.wildfiregames.com/D2205
Comments By: Vladislav, wraitii
Tested on: gcc 9.1.0, clang 8.0.1

This was SVN commit r22741.
2019-08-21 10:12:33 +00:00
Stan 632f687ab6 Animations re-export "Infantry-Siege-Operators-Onager"
Patch by: @Alexandermb
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22740.
2019-08-21 08:29:22 +00:00
vladislavbelov 486691b49a Moves and cleanups includes and public/private section of PostprocManager.
Reviewed By: elexis
This was SVN commit r22738.
2019-08-20 21:15:15 +00:00
vladislavbelov 3285f43394 Fixes bug with disabled fog on water. The usage of USE_FOG was introduced in 2c8b78ddaa and removed in 01a8138780.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2198
This was SVN commit r22737.
2019-08-20 21:03:46 +00:00
Alexandermb 63f3428363 Fix 1 animationn
Following  a56c81a79c

front_left_walk.dae Exported all scene instead of the animation and the
mesh.

Note: Committed as two because HTTP Request timeout won't let me

This was SVN commit r22736.
2019-08-20 20:39:45 +00:00
Alexandermb d381f62113 Remove front_left_walk.dae from formations/testudo for commit the new one.
Request timeout HTTP 408 issue.

This was SVN commit r22735.
2019-08-20 20:10:26 +00:00
Alexandermb 4c1a3d9b3f Fix 1 animation.
Following  a56c81a79c

idle_ready_shield.dae Last frame not sync with first frame.

This was SVN commit r22734.
2019-08-20 20:03:26 +00:00
Alexandermb df4458e031 Fix of concern raised following the latest commits 2.
Following a56c81a79c

Emergency commit of what is fixed already because an ongoing blackout in
my country.

Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/10/

This was SVN commit r22733.
2019-08-20 19:57:10 +00:00
Alexandermb a56c81a79c Fix of concern raised following the latest commits.
Emergency commit of what is fixed already because an ongoing blackout in
my country.

Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/10/

This was SVN commit r22732.
2019-08-20 19:22:16 +00:00
Stan 3962a050f5 Rename gastraphetes template corrects the <Identity> node:
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D2202
This was SVN commit r22731.
2019-08-20 18:38:25 +00:00
Alexandermb baa9ac4a50 Assignation of Shields (Aspis and Peltast) and Greaves for the infantry + Several adjustments
following the next committs:

1 - Animations re-export 9ef5e274c7
2 - Aspis Remake c0b562f79b
3 - Greaves ff8fadcd22
4 - Peltast Remake 5ae660300e
5 - Special formations 95a9ecf99e
6 - Preparation of infantry textures for the use of Greaves ebf907534a

This was SVN commit r22730.
2019-08-20 16:23:17 +00:00
Alexandermb 35a1b6759a Peltast Variants.
Forgot to committ variants in 5ae660300e.

Following the fixes of #4460

Thread:
https://wildfiregames.com/forum/index.php?/topic/26817-task-peltast-shields/page/2/

This was SVN commit r22729.
2019-08-20 16:08:21 +00:00
Alexandermb ebf907534a Preparation of infantry textures for the use of Greaves.
Following ff8fadcd22

Note: .dds textures won't be modified since they lost player color when
saving again.

This was SVN commit r22728.
2019-08-20 15:53:16 +00:00
Alexandermb 671b22569d Aspis Miscellaneous fix.
Fix warning raised by a double variant and an unrelated persian
cavalry_spearman_b_m.xml actor file.

Following c0b562f79b

Thread:
https://wildfiregames.com/forum/index.php?/topic/26720-task-aspis-remake/page/2/

This was SVN commit r22727.
2019-08-20 15:41:10 +00:00
Alexandermb 4371f8cea5 Animations re-export "Remove unused animations from Cavalry/Rider Folder"
Patch by: @Alexandermb
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22726.
2019-08-20 15:38:38 +00:00
Alexandermb 95a9ecf99e Special formations
Following the fixes of #4460

Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/10/#comments

This was SVN commit r22725.
2019-08-20 15:34:23 +00:00
Alexandermb 5ae660300e Peltast Remake.
Update of peltast textures and mesh with better geometry and higher
resolution textures.

Following the fixes of #4460

Thread:
https://wildfiregames.com/forum/index.php?/topic/26817-task-peltast-shields/page/2/

This was SVN commit r22724.
2019-08-20 15:33:09 +00:00
Alexandermb c0b562f79b Aspis Remake.
Update of aspis textures and mesh with better geometry and higher
resolution textures.

Following the fixes of #4460

Thread:
https://wildfiregames.com/forum/index.php?/topic/26720-task-aspis-remake/page/2/

This was SVN commit r22723.
2019-08-20 14:22:28 +00:00
Alexandermb ff8fadcd22 Greaves
Replace the greaves from textures and add meshes for have normal map and
specularity.

Textures will be replaced in another committ


Thread:
https://wildfiregames.com/forum/index.php?/topic/26774-task-greaves/page/2/#comments

This was SVN commit r22722.
2019-08-20 13:47:58 +00:00
Alexandermb 9ef5e274c7 Animations re-export "Remove animations from New/ Folder"
Patch by: @Alexandermb
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22721.
2019-08-20 12:21:56 +00:00
elexis e82d0867b2 Erase unused variable following 77b81d8761, clean two stray includes from c19f3608a5.
Confess a wrong word in a comment in c9c82d9daf and a typo in a comment
in 9985fcf5bd.

Differential Revision: https://code.wildfiregames.com/D2203
This was SVN commit r22720.
2019-08-20 10:51:29 +00:00
Stan 23e742f13c Correct Persian specific names
Patch by: @Nescio
Reviewed by: @Stan
Differential Revision: https://code.wildfiregames.com/D1935
This was SVN commit r22719.
2019-08-20 09:28:02 +00:00
Stan e4f38b4b5d Animations re-export "Variant Update"
Patch by: @Alexandermb, Native EOL, XML headers, Indentation by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22718.
2019-08-20 09:10:38 +00:00
Stan fad30c0ba5 Animations re-export "Infantry-Javelinist"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22717.
2019-08-20 09:07:43 +00:00
Stan 3d5671e377 Animations re-export "Infantry-Knife"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22716.
2019-08-20 09:07:25 +00:00
Stan cf1e1b463c Animations re-export "Infantry-Pikeman"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22715.
2019-08-20 09:07:03 +00:00
Stan e5282d14d4 Animations re-export "Infantry-SiegeOperators"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22714.
2019-08-20 09:06:43 +00:00
Stan 861a2694e4 Animations re-export "Infantry-Slinger"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22713.
2019-08-20 09:06:21 +00:00
Stan ca64e6b6b0 Animations re-export "Infantry-Spearman"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22712.
2019-08-20 09:06:01 +00:00
Stan 82de03fe0e Animations re-export "Infantry-Swordsman"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22711.
2019-08-20 09:05:09 +00:00
Stan 3f0dcc6353 Animations re-export "Infantry-Hoplite"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22710.
2019-08-20 09:04:04 +00:00
Stan 1bcd24545e Animations re-export "Infantry-Gastaphrete"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22709.
2019-08-20 09:03:37 +00:00
Stan 0af0c80c84 Animations re-export "Infantry-Archer"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22708.
2019-08-20 09:03:05 +00:00
Stan bae9546246 Animations re-export "Infantry-Base"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22707.
2019-08-20 09:02:24 +00:00
Stan 550057d5dd Animations re-export "Formation-Testudo"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22706.
2019-08-20 09:00:22 +00:00
Stan 0b4846b2ff Animations re-export "Formation-Syntagma"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22705.
2019-08-20 08:59:51 +00:00
Stan 24278387fc Animations re-export "Formation-AntiCavalry"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22704.
2019-08-20 08:59:09 +00:00
Stan 0fc348648f Animations re-export "Gatherer"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22703.
2019-08-20 08:57:35 +00:00
Stan 9cdf2abf35 Animations re-export "Rider"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22702.
2019-08-20 08:56:25 +00:00
Stan 5f5fd12d86 Animations re-export "Fisherman"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22701.
2019-08-20 08:55:32 +00:00
Stan ca901415c7 Animations re-export "Citizen"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22700.
2019-08-20 08:55:05 +00:00
Stan b6d96546fc Animations re-export "Chariot"
Patch by: @Alexandermb, Native EOL by @Stan
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340
Refs #4460

This was SVN commit r22699.
2019-08-20 08:54:29 +00:00
elexis 8b6eee672b Move GUI string parsing specializations to a separate file and remove __ParseString proxy.
Differential Revision: https://code.wildfiregames.com/D2194
This was SVN commit r22696.
2019-08-19 19:43:13 +00:00
elexis 77b81d8761 Remove IsBoolTrue helper function from c399dc277e.
This property is defined as a boolean for every IGUIObject.
If GUIObjects were empowered to make up their own hidden property, then
they should also be empowered to use custom boolean hidden properties
that don't trigger ResetStates.

This was SVN commit r22695.
2019-08-19 18:36:35 +00:00
elexis d403d750f0 Stop copying color every draw call for every GUI object using colors.
Avoid color copies for rendering Draw calls in
GUIRenderer::UpdateDrawCallCache, CButton::Draw, CChart::DrawAxes,
CDropDown::Draw, CList::DrawList, COList::DrawList, refs #1984,
8f4f8e240f, 3028551b91, a905fbbc98.
Avoid color copies during XML loading in CGUI::Xeromyces_ReadImage,
CGUI::Xeromyces_ReadEffects, COList::HandleAdditionalChildren.
Add CGUI::HasPreDefinedColor and mark m_PreDefinedColors,
CGUI::GetPreDefinedColor, IGUIButtonBehavior::ChooseColor() as const for
consistency with the other "databases", refs 3028551b91.
Mark CGUIColor as NONCOPYABLE to add compiler errors if there is an
unexplicit copy, refs 3028551b91.
Explicit ugly copy in CGUI::Xeromyces_ReadColor and
CGUIColor::ParseString.
Deregister copying <CGUIColor>GetSetting functions, refs 8f4f8e240f.
Uses the const ref GetSetting from 3dfa23cd25.

This was SVN commit r22694.
2019-08-19 12:53:58 +00:00
elexis 3dfa23cd25 Use a new GetSetting returning a reference instead of GetSettingPointer when the setting is known to exist.
Differential Revision: https://code.wildfiregames.com/D2192
This was SVN commit r22693.
2019-08-19 10:32:29 +00:00
Itms 5cfef19a06 Simplify the translations maintenance script.
- Removed bashisms
- Removed the call to SVN update which is usually done beforehand in CI
- Removed the git alternative which is never used
- Fixed the call to poediff which seems to fail with latest poediff

Tested on Jenkins since the revamp.
Reviewed By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D2078
This was SVN commit r22690.
2019-08-18 18:13:04 +00:00
elexis 9985fcf5bd Move GUI<>::FallBackSprite and GUI<>::FallBackColor to CGUIColor::operator|| and CGUISpriteInstance::operator||.
Leaves only setting management in GUIutil.h.

Differential Revision: https://code.wildfiregames.com/D2185
This was SVN commit r22689.
2019-08-18 15:17:49 +00:00
Gallaecio 4e55808cf9 Scipio Aeminialus → Scipio Aemilianus
Reported by xtother90 at Transifex

This was SVN commit r22688.
2019-08-18 13:44:57 +00:00
Gallaecio e0c739c8d9 Standardized catafalque aura descriptions
Differential Revision: D1807
This was SVN commit r22687.
2019-08-18 13:25:54 +00:00
Gallaecio 491fe12f85 Capitalize classes in team bonus descriptions
Differential Revision: D2179
This was SVN commit r22686.
2019-08-18 13:12:59 +00:00
Gallaecio 4bdea62915 Upgrade into a %(name)s → Upgrade to %(name)s
Differential Revision: D2165
This was SVN commit r22685.
2019-08-18 13:03:31 +00:00
Alexandermb a33857537d Animations re-export "Cavalry Javelinist Rider Animations"
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340

Comment: An animation re-export of all unit meshes and armatures for fix
3 duplicated vertex groups in all files from the initial infantry
update.

This was SVN commit r22683.
2019-08-17 12:59:57 +00:00
elexis c9c82d9daf Use shared_ptr to avoid copying and deleting SGUIImageEffects, 2.5x faster in a benchmark, refs ba0ebd6644.
Differential Revision: https://code.wildfiregames.com/D2184
Refs 3028551b91/D2163
Tested on: gcc 9, Jenkins

This was SVN commit r22682.
2019-08-17 11:52:57 +00:00
elexis 742f361b2d Improve performance of ScriptInterface::CreateObject from b4626359f5 / D2080 by creating the JSAutoRequest struct only once instead of once per property.
Differential Revision: https://code.wildfiregames.com/D2127
Comments By: Vladislav
This was SVN commit r22680.
2019-08-17 03:30:07 +00:00
elexis ba56191dc2 Move CGUI::GenerateText to CGUIText constructor, CGUI::DrawText to CGUIText::Draw, SGenerateTextImage from CGUI to CGUIText.
Makes GUI text construction 30x faster for empty strings, otherwise less
than 1% faster.
Split the constructor into smaller helper functions to reduce nesting
and improve readability.
Change m_GeneratedTexts from pointer to reference, so that one doesn't
have to keep track to delete it correctly in several places, without
having to resort to copy or move assignments but constructing in place.
Mark CGUIText as NONCOPYABLE and MOVABLE which is already implicitly the
case due to the CGUISpriteInstance members, refs 0a7d0ecdde/D2133,
D2163/3028551b91.

Differential Revision: https://code.wildfiregames.com/D2168
Prepared by the GUIText.h file split in 838889ab12 / D2167.
Comments By: Vladislav
Tested on: gcc 9, clang 8, VS2015, Jenkins
Inlining tested using: clang -Rpass=inline and gcc -Winline

This was SVN commit r22679.
2019-08-17 01:32:11 +00:00
elexis 24f97d9fd5 Fix unreported glooxwrapper leaks following 61261d14fc, refs #2305.
Fixes an occurring leak indicated by the reported clang unused variable
compiler warning, refs #5294, #5550,
by adding the missing glooxwrapper::Jingle::Session::Session destructor
.

Fix two leaks that would have occurred if the according code had been
used:
Delete unused glooxwrapper::Jingle::ICEUDP::ICEUDP instead of adding the
missing destructor.
Delete unused glooxwrapper::Jingle::Content::Content instead of adding
the missing destructor.

Explain why glooxwrapper::Client::registerStanzaExtension doesn't leak
the new StanzaExtensionWrapper.
Explain why glooxwrapper::Jingle::Session::sessionInitiate doesn't leak
the new gloox::Jingle::Content, nor the new gloox::Jingle::ICEUDP.
Explain why glooxwrapper::SessionManager::registerPlugins doesn't leak
the new gloox::Jingle::Content and new gloox::Jingle::ICEUDP.
Explain why glooxwrapper::SessionManager::createSession doesn't leak the
gloox::Jingle::Session.

I will not leak memory in the glooxwrapper.
I will not leak memory in the glooxwrapper.
I will not leak memory in the glooxwrapper.

Use references in the StunClient and glooxwrapper to anticipate any
confusion as to whose obligation it is to delete variables when they are
passed around across several files.
Use static_cast and reinterpret_cast instead of C-style casts in the
StunClient.

Differential Revision: https://code.wildfiregames.com/D2094
Refs D2093 for the reported leaks.
Reviewed By: Josh
Comments By: fcxSanya, Vladislav for D2094, and echotangoecho, leper in
61261d14fc

This was SVN commit r22678.
2019-08-17 00:12:19 +00:00
Alexandermb 06c1bca952 Fix issue with two wrong path and name following c2e9e2263a
Noted by @minohaka

This was SVN commit r22677.
2019-08-16 21:58:25 +00:00
elexis 86c151ebaa PushGuiPage support for passing a function instead of a function name.
Allows coding the GUI without global functions which break
prototype-oriented coding, refs #5322, fixing the concern in 4b1297b328.

Supports stacked message boxes and removes the according workaround.
Change structree / civinfo switch-dialog code from 760a47335d to perform
the callback for page that actually registered the callback.
Ensure the parent that the callbackhandler is always called if the page
is closed.
Merge PopGuiPage and PopGuiPageCB following that choice, incidentally
leaving cleaner code.

Differential Revision: https://code.wildfiregames.com/D1684
Comments by: Yves, Vladislav, wraitii, leper
This was SVN commit r22676.
2019-08-16 18:46:04 +00:00
elexis a06cfe309b Fix miniupnp memory leak from 667537ee49 again after it was fixed in 5876ec38d1 and probably accidentally reverted in 0ba25e9968, refs #2305.
Differential Revision: https://code.wildfiregames.com/D2183
Comments by: wraitii
Tested on: gcc 9, valgrind

This was SVN commit r22675.
2019-08-16 18:07:23 +00:00
wraitii 8a4d2a8ccc Fix e83f24e3a6 and 1ff20e8f6a miniupnpc leak and crash on thread exit.
std::thread crashes when destroyed without being joined or detached.
Joining would wait on the UPnP thread, which can take upwards of 10
seconds, so detach instead.

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2181
This was SVN commit r22674.
2019-08-16 17:38:58 +00:00
Alexandermb c2e9e2263a Animations re-export "Skeleton and Bodies"
Thread:
https://wildfiregames.com/forum/index.php?/topic/26012-task-animations-re-export-and-unit-meshes-fix/page/7/&tab=comments#comment-382340

Comment: An animation re-export of all unit meshes and armatures for fix
3 duplicated vertex groups in all files from the initial infantry
update.

This was SVN commit r22673.
2019-08-16 17:32:21 +00:00
wraitii 43df94c246 Fix 2a485c5e3b Wind computation - switch to signed integers.
Silences a GCC 9 warning and the logic was faulty.

Reported by: elexis
Differential Revision: https://code.wildfiregames.com/D2180
This was SVN commit r22670.
2019-08-15 17:02:53 +00:00
elexis e370c509a6 Small closePage() cleanup for D1684.
Rename close() to closePage() for structree / template viewer / civ info
for global consistency.
Remove a splashscreen proxy and move splashscreen closing from XML to
closePage() in JS.

This was SVN commit r22669.
2019-08-15 13:29:11 +00:00
wraitii 2a485c5e3b Wind speed computation rework.
This reworks wind-speed computation to not use a blurred-heightmap
approach but rather a slightly more wind simulation approach. It fixes
issues near the edges of some maps.

Differential Revision: https://code.wildfiregames.com/D1721
This was SVN commit r22668.
2019-08-15 11:56:00 +00:00
Gallaecio 99f770f911 typography corrections in quotes
Differential Revision: D1547
This was SVN commit r22667.
2019-08-15 09:24:13 +00:00
wraitii 1ff20e8f6a pthread -> std::thread (4/7) - Replace pthread in remaining files
This removes pthread mutexes/threads from:
- vfs
- the resource handler manager
- timer
- the network server.

This allows removing it from our general posix include header.

Differential Revision: https://code.wildfiregames.com/D1920
This was SVN commit r22666.
2019-08-15 09:07:16 +00:00
elexis 9f42c8d6ae Move manual page values back to the page itself due to a lack of that page being reusable.
Instead encourage developers to create a custom GUI page for their
needs, since that is cheap and since they won't be stuck with this
inextensible page.

0da7e822ff reused the manual page to display userfeedback terms.
dfacf5358c moved more values to the calling pages and introduced a Title
string that is never displayed.
da49aa1541 stopped using the manual page to display terms, because one
could actually not reuse the page to do something more than just
displaying text and using one website link.

refs D1684

This was SVN commit r22665.
2019-08-14 13:55:45 +00:00
elexis 6ad90aa1b8 Delete wrongful proxy CGUIManager::GetPreDefinedColor from f0d9806b3f.
It is wrong because the predefined colors should be loaded from the GUI
page that requests to have the color parsed, which may be different from
the topmost page.
Similar to FindObjectByName removed in f9b529f2fb.

Achieve this by implementing the CGUISetting<CGUIColor>::FromJSVal
specialization, moved from ScriptInterface::FromJSVal<CGUIColor>,
instead of adding a CGUI pointer to CGUIColor.
Mark ScriptInterface::FromJSVal<GUIColor> and inherited
CColor::ParseString explicitly as deleted, so that people get a compile
error if they forget to check for predefined colors when parsing a
color.

Refs #5387, D1746 > D1684 > this > f9b529f2fb, 9be8a560a9, 415939b59b,
2c47fbd66a, 85a622b13a.

Differential Revision: https://code.wildfiregames.com/D2108
Tested on: clang 8, VS2015

This was SVN commit r22663.
2019-08-13 18:00:41 +00:00
elexis 02d23d1ff0 Remove useless proxy GUI<int>::ParseColor, refs 31f0e62c83, 2c14d94559.
Tested on: clang 8.

This was SVN commit r22662.
2019-08-13 15:42:14 +00:00
elexis 64e80471d0 Replace JS_THIS_OBJECT and JS::CallReceiver in preparation for SpiderMonkey 49 and 61.
Differential Revision: https://code.wildfiregames.com/D2173
Refs #4893, D1699, D2142, D844, 7c2e9027c2, ...
Refs https://bugzilla.mozilla.org/show_bug.cgi?id=1270977
Refs https://bugzilla.mozilla.org/show_bug.cgi?id=1255800
Tested on: clang 8, VS2015, Jenkins

This was SVN commit r22661.
2019-08-13 14:11:43 +00:00
elexis 8dc425be5d Update update-workspaces.sh and premake5.lua with the with-system-mozjs45 flag from SpiderMonkey 45 in 64b477625d, refs #4893.
Differential Revision: https://code.wildfiregames.com/D2170
This was SVN commit r22660.
2019-08-13 11:30:46 +00:00
Alexandermb a0be131afe Add a better normal map for celt_shield texture
This was SVN commit r22658.
2019-08-13 02:20:01 +00:00
elexis 1a06f6ddad Revert the move from territory_pull to special/ in 20da0b727f, introduce template variants to make the feature more versatile, fix missing the Visibility component, refs b05879e151.
The special/ folder is determined by the TemplateLoader to not store
entities placeable in Atlas.

Differential Revision: https://code.wildfiregames.com/D2083
Patch by: Nescio
Reported by: fatherbushido
This was SVN commit r22657.
2019-08-12 15:16:37 +00:00
elexis 0a22f32a21 Fix svn prop lineendings following 332e59bdbe, 8d4d70add9, 5c4d124d2a.
This was SVN commit r22656.
2019-08-12 15:00:47 +00:00
elexis 1f421c266a Fix ESLint no-multi-assign, default-case, no-empty, no-shadow warnings, refs #5524.
Differential Revision: https://code.wildfiregames.com/D2146
Based on patch By: Krinkle
This was SVN commit r22655.
2019-08-12 14:48:10 +00:00
elexis 057d033541 Duplicate clearChatMessages since that ends up being cleaner
than having a stray function in gui/common/ that refers to page specific
names and logic with a try-catch block to shield against reference
errors, refs #3396, 6e80288d30, 25e6136786.

Incidentally fixes ESLint no-empty hint triggered for empty catch
blocks, refs #5524, D2146.

This was SVN commit r22654.
2019-08-12 14:13:04 +00:00
wraitii a908ce889c Hierarchical Pathfinder - Add Global Regions / Optimise MakeGoalReachable
Optimise MakeGoalReachable using global regions, by leveraging the fact
that we can easily know which goal regions we can reach. Particularly
for point-goals, it becomes almost instant.
This does not change hashes.

Differential Revision: https://code.wildfiregames.com/D1835
This was SVN commit r22653.
2019-08-12 13:19:01 +00:00
wraitii 07dfacdc67 Fix build without precompiled headers in 107d3d461f.
Also remove an un-needed variable.

Patch by: elexis
This was SVN commit r22652.
2019-08-12 12:56:32 +00:00
elexis 353c415072 Hide ESLint no-unmodified-loop-condition hint for a while (const) in gamesetup.js, refs #5524.
Differential Revision: https://code.wildfiregames.com/D2147
Patch By: Krinkle
This was SVN commit r22651.
2019-08-12 11:53:30 +00:00
elexis 214f805f83 Diplomacy and Objectives dialog hotkey.
Delete unused pauseMenuButton from 7a7ebaa983.

Differential Revision: https://code.wildfiregames.com/D2132
Reported By: minohaka
This was SVN commit r22650.
2019-08-12 10:54:25 +00:00
wraitii 107d3d461f pthread -> std::thread (3/7) - Replace pthread in other engine files
MapGenerator, TextureConverter, and some other files used pthread.

Differential Revision: https://code.wildfiregames.com/D1917
This was SVN commit r22649.
2019-08-12 08:16:28 +00:00
wraitii 8ef8a9de89 Fix VisualActor OOS introduced in rp22586
A call to SelectAnimation("idle") was left over.

Reported by: elexis
Fixes #5552

Differential Revision: https://code.wildfiregames.com/D2169
This was SVN commit r22648.
2019-08-12 08:05:04 +00:00
wraitii 801d5cbe68 Fix checkrefs script following eab4f9fdde (phenotypes), and fix the unit_motion_integration_test map from b637fdbae9.
In eab4f9fdde the `gender`-tag was replaced with `phenotype`. the
checkrefs script however was not updated and complained.

b637fdbae9 introduced a map that checkrefs did not validate.

Based on a patch by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2141
This was SVN commit r22647.
2019-08-12 08:03:23 +00:00
Alexandermb b152ee155f Fix wrong sele_horse_crest on antiochus the great horse
This was SVN commit r22645.
2019-08-11 17:05:38 +00:00
elexis 838889ab12 Split CGUIString.h from GUIText.h, so that one may have the SGUIText implementation in a separate cpp file.
Differential Revision: https://code.wildfiregames.com/D2167
Reviewed By: Vladislav
Tested on: gcc 9.0.1, VS2015, Jenkins

This was SVN commit r22643.
2019-08-10 19:16:52 +00:00
elexis d3e56f0f57 Unfriend the 20 IGUIObject classes from CGUI.
Improves separation of concerns and makes the code less error prone,
since the IGUIObject classes can't break CGUI private members without
CGUIs help anymore.

This is achieved by making CGUI GetFocusedObject, UpdateObjects public,
by introducing public CGUI GetBaseObject, GetMousePos, GetMouseButtons,
HasStyle, GetStyle getters,
and by removing the pointless IGUIObject GetMousePos proxy.

Delete GetGUI() checks that are either always or never true following
2c47fbd66a.
Use const references instead of copies for some mouse positions.

Differential Revision: https://code.wildfiregames.com/D2166
This was SVN commit r22641.
2019-08-10 12:51:27 +00:00
Gallaecio ca00267faf Referring a path into an island: land → shallow water
Differential Revision: D1820
This was SVN commit r22640.
2019-08-10 09:28:29 +00:00
elexis a905fbbc98 Use NONCOPYABLE for most GUI classes and structs to have the compiler indicate unintended copies, refs 3028551b91 / D2163.
That is CChartData, CGUIList, CGUISeries, COListColumn, GUITooltip,
SGUIMessage, SSpriteCall, STextCall, SFeedback, IGUISetting,
CGUISetting, GUI, IGUIObject, IGUIScrollBar.
Drop copying GetSetting and SetSetting template functions for CGUIList,
CGUISeries, CClientArea, CGUIString.
Stop copying COListColumn.
Drop copying GUI<CClientArea>::GetSetting call in
IGUIObject::UpdateCachedSize() and four copying
GUI<CGUIString>::GetSetting calls in SetupText() functions.
Delete unused GUIRenderer IGLState class from 849f50a500 obsolete since
1f5b8f1c9a.

Differential Revision: https://code.wildfiregames.com/D2164
This was SVN commit r22638.
2019-08-10 00:04:17 +00:00
elexis 3028551b91 MOVABLE idiom, const CGUI struct maps, in place move construction instead of copying temporaries during CGUI XML loading and GenerateText.
Introduce MOVABLE idiom indicating that a class can use move semantics.
Make values of CGUI struct maps holding XML data const to ensure at the
root that the data is not modified.
Use NONCOPYABLE and MOVABLE for SGUIIcon and SGUIStyle to enforce the
non-copy policy on the compiler level (until someone changes the GUI
design to make modifications needed).

As indicated by that:
  Replace copy operations by in place move operations for these CGUI
struct maps in the CGUI Xeromyces XML loading functions.
  Replace copy operations by const references for CSize and SGUIIcon in
CGUIString::GenerateTextCall and CGUI::GenerateText.
  This avoids copying of non primitive members, such as the strings and
containers of strings.

Further related cleanup to be kept separated for auditability.

Differential Revision: https://code.wildfiregames.com/D2163
Few comments on IRC by: wraitii, Itms
Tested on: gcc 9, Jenkins, partially VS2015

Refs #1984,
  NONCOPYABLE CGUISpriteInstances: 0a7d0ecdde, 8f4f8e240f, c19f3608a5
  NONCOPYABLE Image, Sprite: fb8032043b
  NONCOPYABLE GUI page: 94c57085e9
  NONCOPYABLE GUIManager: 7c2e9027c2
  NONCOPYABLE macro: 16ccae10cd

This was SVN commit r22637.
2019-08-09 17:25:55 +00:00
elexis f804226b89 Fix failure of the CGUIColor constructor author to call the base constructor following f236c07a56, refs 415939b59b.
Tested on: gcc 9, VS2015

This was SVN commit r22636.
2019-08-09 14:54:14 +00:00
FeXoR d192c160de Replace an incorrect math.max() by math.min() in tileclass
Summary:  Patch by smiley fixing 8585040f27

Test Plan:
Check that is the correct fix.
Measure how badly it affected performance.

Reviewers: O14 Maps, elexis, Stan

Reviewed By: O14 Maps, elexis
Subscribers: smiley

Trac Tickets: #4992

Differential Revision: https://code.wildfiregames.com/D2010
This was SVN commit r22635.
2019-08-09 10:47:20 +00:00
Gallaecio 8bc31ee0d2 English review of cavalry unit references
Differential Revision: D1614
This was SVN commit r22632.
2019-08-09 05:48:53 +00:00
Gallaecio 306d73e864 acropolis → citadel (non-Greek fort), plateau (orography)
Differential Revision: D1805
This was SVN commit r22631.
2019-08-09 05:37:07 +00:00
Itms 9325992232 Revert use of the isRunOnce flag after removal in 64b477625d of compile'n go, refs #4893.
This breaked a SM assertion, which was only caught in debug mode. It
could have led to subtle bugs during the compilation of JS scripts.
Still set the flag to its default value, because SM devs wanted to
change the default in the future.

This was SVN commit r22629.
2019-08-08 09:05:42 +00:00
Itms 64b477625d Upgrade SpiderMonkey to version 45.0.2, refs #4893.
- Various build changes, in particular NSPR is not needed on Unix
anymore
- Add js/Initialization.h to source/scriptinterface/ScriptEngine.h
- Use nullptr instead of JS::NullPtr(), see
https://bugzilla.mozilla.org/show_bug.cgi?id=1164602
- Remove `JS::RuntimeOptionsRef.varObjFix`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1171177
- Remove uses of `AutoIdArray`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1191529
- `JS_InternUCStringN` has been renamed, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1178581
- `JS::Evaluate` now takes scope chains explicitly, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1097987
- Array functions (such as `JS_IsArrayObject`) are fallible and output
to params, see https://bugzilla.mozilla.org/show_bug.cgi?id=f3d35d8
- Remove `JSCLASS_CACHED_PROTO_WIDTH` workaround in our code, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1236373
- Remove compile'n go (`setCompileAndGo`) and replace it by
`setIsRunOnce` which will become the default in the future, see
https://bugzilla.mozilla.org/show_bug.cgi?id=679939
- Mark shared memory in direct access operations
(`JS_GetUint16ArrayData` and `JS_GetUint8ArrayData`), see
https://bugzilla.mozilla.org/show_bug.cgi?id=1176214
- Use new `JS::ObjectOpResult`, see
https://bugzilla.mozilla.org/show_bug.cgi?id=1113369

Thanks to wraitii, elexis, Krinkle and historic_bruno for contributions
and comments, and to gentz, madpilot, s0600204 and Stan for testing and
indirect contributions.

Differential Revision: https://code.wildfiregames.com/D1510
This was SVN commit r22627.
2019-08-07 22:37:43 +00:00
elexis 7876ca7acb Fix gcc 8 compiler warning in FileIo.cpp about truncating use of strncpy [-Wstringop-truncation].
Refs #5294
Differential Revision: https://code.wildfiregames.com/D2159
Tested on: gcc 9, Jenkins

This was SVN commit r22626.
2019-08-07 15:38:40 +00:00
elexis 82f765b4cc Add Profiler2 static const member definition, since the declaration itself is insufficient for const ref access, as revealed in debug builds but not release builds following f89f90d56e and 9965f43067.
Differential Revision: https://code.wildfiregames.com/D2158
This was SVN commit r22625.
2019-08-07 14:45:13 +00:00
elexis f89f90d56e Fix Profiler2 gcc 8 compiler warning about possible out-of-bounds array access and replace auto with their type, refs #5294, 3cbe96d24c.
Tested with gcc 9, clang 8

This was SVN commit r22624.
2019-08-07 09:12:28 +00:00
elexis eb20fe3626 Replace ScriptInterface ErrorReporter layered hack from 5e15a0279e with proper code, refs f6c1d98c9a.
Avoids preparation for the SpiderMonkey 45 update, refs #4893 / D1510 .
Add JSAutoRequest missing from 5e15a0279e too.

Differential Revision: https://code.wildfiregames.com/D2152
Reviewed By: Itms
This was SVN commit r22622.
2019-08-06 22:13:06 +00:00
elexis d35f16e4f5 Remove unused texture test helper function obsolete since dee3cb84b5 and ef888367aa that throws a compiler warning with gcc 7 and beyond.
Refs #2456, #5294.
Differential Revision: https://code.wildfiregames.com/D2153
This was SVN commit r22621.
2019-08-06 21:00:36 +00:00
Itms b5ff885d6a Improve Roman specific names.
Add vowel lengths, add and correct some names, expand some hero names.

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1999
This was SVN commit r22620.
2019-08-06 17:59:09 +00:00
elexis df40b88c71 Fix ModIo.cpp gcc 7 compiler warning about extended alignment by using a pointer for hash_state as expected by sodium anyhow, following 833c9f108c, refs #5294.
Differential Revision: https://code.wildfiregames.com/D2102
Reviewed By: Itms
Comments By: historic_bruno
This was SVN commit r22619.
2019-08-06 13:06:15 +00:00
elexis f236c07a56 Call CGUIColor base constructor without C++17 using declaration following 415939b59b.
This removes the trigger for an unidentified VS2015 bug revealed by the
IGUIObject::AddSetting / CGUISetting constructor in 85a622b13a
(unset GUIObject color settings didn't hold the color assigned in the
inherited default constructor, so hovered button text appeared black
instead of white on Windows).
The code in the two commits seems correct, but VS2015 doesn't seem to
implement it correctly (and claims to support C++17) while clang and gcc
behave as intended.
Fix whitespace.

Reported By: gameboy, Angen
Refs
https://wildfiregames.com/forum/index.php?/topic/26694-strange-font-color/

This was SVN commit r22617.
2019-08-05 20:45:15 +00:00
bb 7e1f959db0 redo 2d57478781, Create a ConfigDB_CreateAndWriteValueToFile function to absorb some duplication in the gui
Move two duplicated lines from 7e14a33411 in a function

fixes 2d57478781
Reviewed By: elexis
Comments By: Stan, vladislav
Differential Revision: https://code.wildfiregames.com/D1939
This was SVN commit r22615.
2019-08-05 14:12:55 +00:00
wraitii 69abe717e3 Fix no-pch build following renderer options refactoring 5c4d124d2a
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2148
This was SVN commit r22612.
2019-08-04 20:08:06 +00:00
wraitii 6f63f05b8a Fix eab4f9fdde - phenotype tokens were added instead of replacing.
As reported by Freagarach in D2141, when using datatype="tokens" in
children templates, the list of tokens gets expanded instead of
replaced.
This means women randomly switched to male voices.

Patch by: Freagarach
This was SVN commit r22611.
2019-08-04 09:11:46 +00:00
wraitii 5c4d124d2a Refactor renderer options.
This moves the renderer options into their own class to:@
  - allow one to only include the rendering options, not the whole
renderer header, when one wants access to rendering options.
  - centralise rendering changes and their side-effects.
  - clean up code.

Tested by: historic_bruno, Freagarach
Commented by: historic_bruno
Differential Revision: https://code.wildfiregames.com/D1929
This was SVN commit r22610.
2019-08-04 08:28:30 +00:00
wraitii 2ff8614ce2 Unit Motion - Improve behaviour around obstructions and unreachable goals
Use the "pretend correct path" behaviour for short goals too. This is a
fix for #5545, since the position check now works correctly without
needing to add a tricky check for path-vs-path distance.

Simplify HandleObstructedMove to use ComputePathToGoal more. This means
we occasionally compute a long path when stuck, which fixes two cases of
stuck units reported in #5547.

Move some common calls into functions for convenience.

Make sure the short-path-waypoint-range-relaxing introduced in
32e8ed51aa doesn't happen for the last waypoint, which caused units to
occasionally never get in range of the last waypoint.

Clear short path waypoints when computing a long path.

This won't fix all instances of unit dancing, but it should improve most
of them.

Fixes #5545, Fixes #5547

Differential Revision: https://code.wildfiregames.com/D2135
This was SVN commit r22609.
2019-08-04 08:16:09 +00:00
wraitii 9ece3e7088 Pthread -> std::thread (2/7) - Remove pthread in Profilers
Use std::thread and thread_local instead of pthread specific calls.

Differential Revision: https://code.wildfiregames.com/D1916
This was SVN commit r22608.
2019-08-04 08:11:58 +00:00
wraitii accd72b3c1 Prevent tree leaves from being too bright in water reflections.
Since ead8436b3d, the sides of tree leaves are extremely bright. The
reason is that they overwrite the value of the depth buffer, and thus
they show the skybox in the water calculation.

The simplest fix for this is to show the skybox only at lower
transparency values. A better fix would require handling alpha blending
completely differently.

Refs #5125.

Differential Revision: https://code.wildfiregames.com/D2143
This was SVN commit r22607.
2019-08-04 07:54:13 +00:00
elexis c4789fdcc7 Fix missing ShadowMap headers in previous, da4e601d8f.
Tested on: gcc, clang

This was SVN commit r22606.
2019-08-04 05:58:55 +00:00
elexis da4e601d8f Move GetDefaultGuiMatrix to a separate file.
The function was located in the wrong file, because it is not logically
related to IGUIObject settings.
The separate file allows the various users to include it without
including the GUIRenderer.

This was SVN commit r22605.
2019-08-04 03:52:00 +00:00
elexis 85a622b13a Implement IGUIObject settings as a template class and IGUIObject::AddSetting as a template function.
This means the type information is available for all methods operating
with the setting type, which is easier for the authors, allows for
compile-time checks and optimizations.
Remove the enum that was used to indirectly obtain the setting type at
runtime.
Revises SGUISetting and enum from e326ebae46 (5122b0f906),
std::function from 82f1d2718b.

Differential Revision: https://code.wildfiregames.com/D2145
Tested on: gcc, clang, VS2015, Jenkins

This was SVN commit r22604.
2019-08-04 02:20:08 +00:00
elexis 5a1da77ce4 Use IGUIObject::GetSettingPointer and SetSetting instead of accessing the member m_pSetting directly following fd91563f42.
Revise 53b335f5ae in CInput::UpdateBufferPositionSetting to use the
SkipMessage argument from 4113aa0a36 to prevent the infinite loop
instead of hijacking the pointer.

This was SVN commit r22603.
2019-08-04 00:02:56 +00:00
elexis cd82b62e25 Fix JSInterface_IGUITextOwner build on VS2015 following 3d07327837 (which works on gcc, clang and Jenkins), reported by minohaka.
Retract IGUIObject override keyword from that commit, because clang
recommends to use it for either every or no overriding class member
(which then should be done consistently for all classes inheriting
IGUIObject, refs D2144).

This was SVN commit r22602.
2019-08-03 17:52:56 +00:00
wackyserious 11dc5e3901 Texture Update: Judean Slinger
Thread:
https://wildfiregames.com/forum/index.php?/topic/22287-task-judean-slinger

Reviewed by: Stan, Lordgood (wowgetoffyourcellphone and Lion.Kanzen)
This was SVN commit r22601.
2019-08-03 06:18:37 +00:00
Alexandermb f64a39c123 Better texture for shield_props (bosses and spinas)
Better texture for brit_battersea shield

Fix celtic shield bosses using 3rd texture variant instead of 1st

Added brass and golden variant for shields props 02 and 03

replaced gold texture with 03 texture variant for have less texture
files.

This was SVN commit r22600.
2019-08-03 02:52:40 +00:00
wackyserious 674d60e830 Texture Update: Gallic Naked Fanatic
Thread:
https://wildfiregames.com/forum/index.php?/topic/25403-task-gallic-naked-warrior-re-design/

Reviewed by: Stan (Genava55 and Sundiata)
This was SVN commit r22599.
2019-08-02 23:19:39 +00:00
wackyserious 1a388ff401 Texture Update: Scythian Archer
Thread:
https://wildfiregames.com/forum/index.php?/topic/26592-task-scythian-archer-athens-rework/

Review by: Several active community members (Check thread)
This was SVN commit r22598.
2019-08-02 23:07:19 +00:00
wackyserious 8f314fb653 Texture Update: Thracian Peltast
Thread:
https://wildfiregames.com/forum/index.php?/topic/26673-task-thracian-peltast-retexture/

Reviewed by: wowgetoffyourcellphone
This was SVN commit r22597.
2019-08-02 21:38:31 +00:00
elexis 3d07327837 Introduce a JSInterface_IGUITextOwner to encapsulate JSI_IGUIObject::getTextSize from 9c5062147a / D844.
JSI_IGUIObject should not contain functions that work only for some GUI
Object types, refs #5442.

Deduplicate the shuffled copy of CText::SetupText.

Avoid the 80 times slower dynamic_cast mandated by the virtual class
inheritance by adding an ugly overridable pointer to the base class
pointing at this derived classes, as bargained with Vladislav and
proposed by wraitii in D1781 id=8426.
This may be improved by refactoring the IGUIObject and JSInterface
classes to use templates and / or eliminating its virtual inheritance.

Implement and use FromJSVal / ToJSVal CSize specialization.
Remove the JS::CallArgsFromVp call.

Differential Revision: https://code.wildfiregames.com/D2136
Comments By: wraitii, Vladislav
This was SVN commit r22596.
2019-08-02 16:55:15 +00:00
Alexandermb a1963b8ec2 Separate texture variants in bryastovets helmet as requested by @wackyserious.
Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/10/&tab=comments#comment-381256

Following 0257f1ca79

This was SVN commit r22595.
2019-08-02 14:21:56 +00:00
Alexandermb 007f271a67 Remove unused horse sele_crest and straps_kush_base.xml from wrong folder.
Concern raised by @elexis in checkref

Following 2115bf2e5d

This was SVN commit r22594.
2019-08-02 14:20:12 +00:00
elexis df489f2500 Add virtual CreateJSObject to IGUIObject, split from GetJSObject, so that inheriting classes can extend the JS object upon construction, refs #5442, D2136.
Remove the comment from 53bcba3368 that allures the reader to believe
there is a memory leak which is not and has not been the case, refs
D1700.
Remove the useless JSAutoRequest from GetJSObject if the object was
constructed already (performance improvement), following cx assignment
in 4b1297b328, following JSAutoRequest addition in e9e05f4efc (that also
had removed other useles JSAutoRequest calls but not this one).
Don't change JS::PersistentRooted to JS::Heap until SpiderMonkey is
updated, refs D1700.
Provide access to GUI, ScriptHandlers and JSObject for inheriting
classes.

This was SVN commit r22593.
2019-08-02 12:18:30 +00:00
Alexandermb 2510e1b82e Fix concern raised by checkref mentioned by @elexis
Add silver chalcidean variant for
macedonians/hero_infantry_swordsman_craterus.xml

Following 0257f1ca79

This was SVN commit r22590.
2019-08-02 02:36:01 +00:00
elexis 52f2bfae2b Add virtual base initialization missing in 2c47fbd66a.
Reported by Jenkins, but not gcc, clang, VS2015.
Take the opportunity following 2c47fbd66a to make the CGUI pointer held
by IGUIObject constant (the address, not the value).

Differential Revision: https://code.wildfiregames.com/D2139
This was SVN commit r22589.
2019-08-01 23:55:10 +00:00
elexis 69ac0b9656 Move CGUIManager::LoadPage to CGUIManager::SGUIPage::LoadPage, because it only operates only on that struct.
Refs D1684 (patch also made an appearance in D2108)

This was SVN commit r22588.
2019-08-01 20:48:05 +00:00
elexis 2c47fbd66a Pass the GUI page pointer CGUI* to the IGUIObject and derived classes upon construction, instead of on stray cases.
Call JS_AddExtraGCRootsTracer and JS_RemoveExtraGCRootsTracer depending
on JS::Heap use instead of on CGUI page link setup.
GUIObjects should be able to access the GUI page independent of the
scripting (for example to obtain PredefinedColors, refs D2108).

Refs: D2108, c02a7e1a7b
Comments By: wraitii
This was SVN commit r22587.
2019-08-01 20:20:24 +00:00
wraitii eab4f9fdde Replace {gender} by {phenotype} and support this tag in VisualActor.
A random phenotype can be chosen by giving multiple tokens to the
template.
This allows giving different looks to the same template.

Comments By: stan, vladislav, elexis
Patch By: Freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1955
This was SVN commit r22586.
2019-08-01 19:14:40 +00:00
Alexandermb d7a93c3b35 Update some actors outdated helmets
(following 0257f1ca79 And 2fcccb6669)

This was SVN commit r22585.
2019-08-01 17:54:15 +00:00
Alexandermb 29b72212fe Update some hero helmets
(following 0257f1ca79)

This was SVN commit r22584.
2019-08-01 17:39:26 +00:00
Alexandermb d51adb2674 Fix for broken catafalque_two_wheel.dae following 6d332c0822
Mentioned by @elexis

Also fix traders two_wheel carts from staying static while dead.
(temporary fix until i place an animation for death in the
two/four_wheel_cart.

This was SVN commit r22583.
2019-08-01 12:59:24 +00:00
Alexandermb 9e1c53c2ff Update athen/cavalry_javelinist_e_r.xml helmet.
This actor was using old boeotian helmet

mentioned by @wackyserious Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/10/&tab=comments#comment-381154

(following 0257f1ca79)

This was SVN commit r22582.
2019-08-01 12:34:49 +00:00
Alexandermb 12797e14d7 Remove now unused corinthians actors due to new meshes.
Remove mask from boeotian helmets B3/B4

Remove hele_su3 from macedonians/infantry_javelinist_e.xml.

Add missing checkguard from hele_phrygian_bronze.png

(following 0257f1ca79)

This was SVN commit r22581.
2019-07-31 23:00:22 +00:00
Alexandermb 8f979756fd Add two missing corinthians after update.
This was SVN commit r22580.
2019-07-31 19:15:16 +00:00
Alexandermb 0257f1ca79 Big hellenic helmets update
Including:

*Thracian*
*Phrygian*
*Boeotian*
*Chalcidean*
*Attic*
*Bryastovets*
*Corinthian*
*Pilos*

Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-committed-hellenic-helmets/page/10/&tab=comments#comment-381132

Reviewed by the community of 0.A.D.

This was SVN commit r22579.
2019-07-31 18:40:21 +00:00
LordGood 8d4d70add9 entity template for the juniper tree
This was SVN commit r22577.
2019-07-29 19:14:08 +00:00
LordGood a21a21c443 Junipers, grasses, and some flora material edits for broken parallax. Black pines lightened a bit
This was SVN commit r22576.
2019-07-29 19:04:39 +00:00
wraitii fee7dba38f Fix Capture oversight in GetBestAttackAgainst in 9fcfdb0324
This fixes units always using capture attack on a building, since
rp22569 forgot to eliminate Capture from the attack types when not
allowed.

Reported by: minohaka
Patch by: Freagarach
Reviewed by: wraitii
Fixes #5544

Differential Revision: https://code.wildfiregames.com/D2134
This was SVN commit r22575.
2019-07-29 18:51:50 +00:00
elexis 82f1d2718b Remove both copies of the 15-fold copies of the JSI_IGUIObject::getProperty and setProperty setting case handlers following the FromJSVal / ToJSVal template specializations implemented in
* JSI_GUIColor in 9be8a560a9
* bool in eec179a9a8
* CGUISeries and CGUIList in 26ae9d430a
* primitives in 636c719110
* EAlign and EVAlign in 0834d07462
* ClientArea in b9f3c8557b
* CColor in 415939b59b
* CGUISpriteInstance 0a7d0ecdde
* CPos in d6b93b3be6

The removed JS_ReportError calls were redundant.

This was SVN commit r22574.
2019-07-29 14:46:29 +00:00
elexis d6b93b3be6 Add missing CPos FromJSVal, ToJSVal following 659a9ea57a.
This was SVN commit r22573.
2019-07-29 11:56:11 +00:00
elexis 0a7d0ecdde CGUISpriteInstance non-copyable and FromJSVal / ToJSVal.
Make CGUISpriteInstance non-copyable to further harden Philips
protection from 8f4f8e240f against unintentional copies of its DrawCall
cache such as in c19f3608a5.
Remove its copy constructor from 849f50a500, make it movable, and until
it becomes otherwise necessary, force move assignment when sprites are
assigned.
Improves the fixes of the compiler warnings about deprecated implicit
copy constructors in 8a32b0b3d4 by avoiding the copies instead of
copying explicitly.
Add ToJSVal, FromJSVal for CGUISprinteInstance to make
JSI_IGUIObject::getProperty and setProperty more consistent.
Rename Sprite operator= to SetName to reduce ambiguity.
Pass CRect by reference in CGUISpriteInstance::Draw.

Differential Revision: https://code.wildfiregames.com/D2133
Comments By: wraitii
This was SVN commit r22570.
2019-07-28 22:40:58 +00:00
wraitii 9fcfdb0324 Improve Attack's GetBestAttackAgainst by only considering attack types that actually can attack the target.
Patch By: freagarach
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D2112
This was SVN commit r22569.
2019-07-28 14:58:24 +00:00
wraitii c03abd1e92 UnitMotion cleanup - remove dead code, add a common path for MoveTo functions, rename BeginPathing, move functions around for better readability.
BeginPathing renamed to ComputePathToGoal, as that is what this function
does.
IsMoving renamed to IsMoveRequested, as the function returns true when
the unit has a move request going on, not when it is actually moving
across the map, which was misleading.

UpdateMovementState's implementation moved closer to where it is used.

PathIsShort and WAYPOINT_ADVANCE_MAX are currently unused, thus deleted.

Differential Revision: https://code.wildfiregames.com/D2067
This was SVN commit r22568.
2019-07-28 10:51:12 +00:00
wraitii d9c6879450 Fix units ignoring range when attacking in one case, and fix targeting formations
Fixes for 5568bd4c16:
- units could occasionally ignore range checks when attacking.
- attacking a formation wouldn't pick new targets correctly.

While testing, I also think the walk then walk and fight behaviour
should be changed to just walk and fight or units might just run towards
enemies and not attack them, which looks rather odd.

Reported By: Angen
Fixes #5530

Differential Revision: https://code.wildfiregames.com/D2119
This was SVN commit r22567.
2019-07-28 10:39:27 +00:00
wraitii 1e2f511a09 UnitMotion - reject paths that would not take the unit closer to the goal than it is now.
This helps with #3144 and units not going idle when ordered to clump
together.

By rejecting paths that would not take the unit closer to the goal than
it is, we can avoid the case where a unit at A finds a short path to B,
goes there, gets stuck, finds a new short path to A, etc. ad infinitum.

It doesn't completely fix the problem since two units moving might still
occasionally become stuck against one another, but it makes it rarer
(unit pushing would probably finish solving this).

This assumes that being as close as possible to the goal is the best
behaviour when trying to move somewhere, even when it is unreachable.

Refs #3144

Differential Revision: https://code.wildfiregames.com/D2075
This was SVN commit r22566.
2019-07-28 10:29:28 +00:00
wraitii 103d89f026 GatherNearPositiion when the target remains invisible on our second try, instead of going idle.
This improves hunting behaviour, as targets may still be in FOW on the
second try, and the unit would go idle - instead it'll now gather near
position, which is more likely to find a proper resource.

Differential Revision: https://code.wildfiregames.com/D2071
This was SVN commit r22565.
2019-07-28 09:48:23 +00:00
elexis ad4de3d3be Delete CInternalCGUIAccessorBase class from c2a71e41bf.
Delete GetSetting/SetSetting variants that operate on a GUI page other
than the one that the setting is defined in; introduced in c2a71e41bf,
obsolete since f0d9806b3f.

Delete CInternalCGUIAccessorBase::GetObjectPointer as these variants
were the only caller for that.
Delete CInternalCGUIAccessorBase::HandleMessage from a08cbd2f74 as it's
an unnecessary proxy.
Delete CInternalCGUIAccessorBase::QueryResetting from 953f72a91c by
making ResetStates public, equal to UpdateCachedSize from 90bbd48a14
(public required for VS2015 but not gcc 9).
Move ResetStates to implementation file.

Tested on: gcc 9, VS2015

This was SVN commit r22563.
2019-07-28 02:39:52 +00:00
elexis 3e4d339b51 Add a missing undefined to booelan conversion for the diplomacy dialog in eec179a9a8, fixes #5542.
Remove diplomacyMenuButton unused since introduction in a21e01150a.

This was SVN commit r22562.
2019-07-27 21:18:16 +00:00
wraitii 6b052bab08 Fix 415939b59b - clang-specific error at compilation time
JS_ReportError was passed a CStr, which it doesn't support.

Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2131
This was SVN commit r22561.
2019-07-27 15:12:59 +00:00
elexis b7d1ea671f Update Errors definition file following:
I18n Script SetupFailed removal in 818ea52c3b,
Renderer VBOFailed removal in 2f28b07356,
CVFSFile InvalidBufferAccess removal in b253cbbee6.

Differential Revision: https://code.wildfiregames.com/D2124
This was SVN commit r22559.
2019-07-26 19:27:10 +00:00
elexis 415939b59b Introduce CGUIColor type inheriting Color type and switch the GUI to exclusively use that.
The type differs from the Color type, because contrary to Color, it can
be created from a color predefined in the GUI page (such as "yellow").
Move this predefined color check to the new class instead of hardcoding
it in FromJSVal / ToJSVal, GUIUtil, JSInterface_IGUIObject and to
straighten the latter.

Delete fov_wedge_color from Minimap, unused since introduction in
5275dc862b.

This was SVN commit r22558.
2019-07-26 18:57:28 +00:00
elexis b9f3c8557b Move CClientArea ToJSVal / FromJSVal conversion from JSI_IGUIObject (since that should be agnostic of the conversion) to CClientArea (since that defines the properties).
This was SVN commit r22557.
2019-07-26 14:47:27 +00:00
elexis 0834d07462 Make JS changed horizontal / vertical actually take effect, finishing 156ff7cf56, refs f4b410ff82.
Move EAlign and EVAlign JS<->C++ conversions to FromJSVal and ToJSVal
for consistency.

Remove alternative / british spelling "centre".
Use i32 instead of int since at least and at most 32 bits are intended
there, refs 1e07787e76.

This was SVN commit r22556.
2019-07-26 13:45:14 +00:00
elexis 52d58d9845 Wipe MaybeGC/ForceGC declaration leftover from 9f0484e5ce / D1073.
This was SVN commit r22555.
2019-07-26 12:41:22 +00:00
wackyserious b9544a2eaa New Ptolemy IV (Hero) Texture
Thread:
​https://wildfiregames.com/forum/index.php?/topic/26591-task-ptolemy-iv-rework/

Reviewed by: Stan, Nescio and wowgetoffyourcellphone
This was SVN commit r22554.
2019-07-26 11:10:43 +00:00
historic_bruno 8d293db6eb Removes clipboard debug logging on X11, fixes #5535
This was SVN commit r22551.
2019-07-25 05:34:04 +00:00
historic_bruno 1e9cc3d43e Fixes missing Engine.DisplayErrorDialog in hwdetect.js (lost in 4b1297b328).
Fixes #5533.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2123
This was SVN commit r22549.
2019-07-25 05:21:25 +00:00
vladislavbelov 4ced2182b2 Fixes compiler warning about unused variable introduced in 09e129bce2.
This was SVN commit r22548.
2019-07-24 23:25:45 +00:00
vladislavbelov 50f70b7be3 Refactors Camera aspect ratio and calculation of plane points.
Reviewed By: elexis
Commented By: wraitii
Differential Revision: https://code.wildfiregames.com/D2020
This was SVN commit r22547.
2019-07-24 23:08:02 +00:00
wraitii 3532dd64ac Fix patrol order and make the relaxed range check into a constant.
Introduced by 32e8ed51aa.

Reported By: elexis
Fixes #5531 .

Differential Revision: https://code.wildfiregames.com/D2118
This was SVN commit r22546.
2019-07-24 19:05:12 +00:00
wraitii 2cc071f306 Fix memory leak introduced by 3a839517ce in SparseGrid
Following 3a839517ce, SparseGrid::Reset() replaces the value of m_Data
(a C-style dynamically sized array) with a new value-initialised array,
by using the new operator. Previous code simply did a memset.
This means that when m_Data was not null, it leaked memory as the
previous array was not deleted.

SparseGrid::Reset is called when destroying the sparse grid, and a
SparseGrid is used by the long pathfinder when computing JPS paths. As
that is called rather often, it resulted in a relatively serious memory
leak that could make very long games use several GB of memory.

This fixes the leak by using placement new, which re-uses the memory,
effectively doing the same as the previously existing memset.

Profiling by historic_bruno and elexis showed that performance from
value-initialising with placement new was at worst similar to memset,
and testing shows this was compiled in a memset call in several cases
anyways.

Reviewed By: elexis
Fixes #5522

Differential Revision: https://code.wildfiregames.com/D2121
This was SVN commit r22545.
2019-07-24 17:11:22 +00:00
wraitii ae7e43ff19 Alt+tab fix for ca9109be75 - call sound IdleTask in Atlas and swap buffers only once in Atlas.
- ca9109be75 moved SwapBuffers inside Render - this makes Atlas call it
twice in a row which might behave oddly (did not seem to though) and
anyways was wasteful.
- ca9109be75 moved IdleTask from the sound manager outside of Render.
This means atlas never called IdleTask, and this broke sounds after a
few seconds.

Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D2029
This was SVN commit r22544.
2019-07-24 16:40:34 +00:00
wraitii a783f430d5 Update the gather LastPos alongside the combat LastPos when hunting to more efficiently hunt.
When units are hunting, they push an attacking order in front.

That attacking order keeps track of the target's last known position to
efficiently hunt. However, if the unit goes out of LOS,
ShouldAbandonChase triggers and the unit goes back to the gather order -
which hby then as a hopelessly out of date "LastPos".
By updating the LastPos of the gather order as well, Gather can recover
efficiently.

Differential Revision: https://code.wildfiregames.com/D2072
This was SVN commit r22543.
2019-07-24 15:55:07 +00:00
wackyserious 7c2985bbe1 New Roman Units Texture
Thread:
https://wildfiregames.com/forum/index.php?/topic/25533-task-roman-infantry-new-texture/

Reviewed by: Art Department and (Sundiata, Genava55,
wowgetoffyourcellphone and Lion.Kanzen)

This was SVN commit r22542.
2019-07-24 06:53:04 +00:00
elexis 636c719110 Use FromJSVal ToJSVal for primitive types to remove the duplicate logic and make JSInterface_IGUIObject case handling more equal.
Remove broken uint overflow check from 3698c134b5 and just use the
native JS uint32 conversion.

This was SVN commit r22540.
2019-07-24 02:58:50 +00:00
elexis 26ae9d430a CGUISeries and CGUIList specializations for ToJSVal / FromJSVal to make the JSI_IGUIObject case handling agnostic of implementation specifics, refs 4d367109c3, 977a5c7ca2, 2bae30c454.
This was SVN commit r22539.
2019-07-24 01:40:30 +00:00
elexis eec179a9a8 Use FromJSVal and ToJSVal for GUI boolean conversions.
Consistently warn instead of using implicit conversion when not passing
a boolean, for consistency and callers being more cautious with passed
values.

This was SVN commit r22538.
2019-07-23 21:46:32 +00:00
elexis 62f83eb673 Use ToJSVal for JS_NewStringCopyZ to improve encapsulation and consistency and remove a snprintf call.
This was SVN commit r22536.
2019-07-23 15:17:35 +00:00
elexis cbcd1bbde0 There is nothing to see here following 9be8a560a9.
This was SVN commit r22535.
2019-07-23 14:50:09 +00:00
elexis 9be8a560a9 Delete JSClass JSI_GUIColor / GUIColor from af9c336b43, refs #5387, D1699.
* JSI_GUIColor::construct and JSI_IGUIObject::setProperty hunk are
duplicates of FromJSVal, getProperty of ToJSVal, following 7c2e9027c2.
* The constructor, it's fallback magenta and toString have never been
used by JS.
* A JS color class providing some methods (such as found in color.js,
refs #5387, and the unused toString redundant with rgbToGuiColor, see
also eee8217b45) is more inviting to changes and maintenance if defined
in JS and can still be instantiated in C++, like the Vector2D (see also
65b02395b3).
* PredefinedColors (such as "red" or "green") can be obtained from the
prototype without defining the class in C++.
* Minimize ugliness by removing macrosity, refs 8ceb41212d.

Rename alpha to a in guiToRgbColor from eee8217b45 for consistency with
the C++ conversions (opaqueness had been skipped in the only callers of
this JS function yet).
Delete unused GUISTDTYPE Mouse in header forgotton in 8734efca94.

This was SVN commit r22534.
2019-07-23 14:22:27 +00:00
wraitii 7a823ca671 UnitMotion - Fix a rare pathfinding issues where units tried going straight through walls, and make sure a long path is computed even when the target is within short path or direct path range.
This fixes a regression introduced by 055c848c1a: when an entity is
ordered to move to a target within short path distance (or direct path
distance), it no longer computed at least one long path, which meant it
could be stuck forever if the target was not actually reachable (such as
behind a wall).
To fix this, compute a long path after 3 failed computations, which
should result in a delay of 1-3 turns. The previous code did this after
1 failed try - the decision to make it 3 is mostly based on the idea
that in most cases, being stuck means we ran into units, not that we
were ordered somewhere close. Should there be complaints, it could be
lowered to 2 or 1.

This fixes a second issue, reported in #4473: units sometimes get stuck,
particularly when trying to garrison a turret from 'inside' the walls.
The issue is that the turret is not accessible via the inside as its
obstruction + garrison range is blocked by the surrounding walls.
However, as introduced by 6e05a00929, TryGoingStraightToTargetEntity
ignores all entities with the obstruction group of the target (the
reason for this being that otherwise it would never succeed, since the
line towards the target would likely go through the target).
For walls and formations, this means ignoring possibly too many
entities, and in the case of #4473, ignoring wall pieces. The unit thus
mistakenly thought it could direct-path to the turret, and got stuck.

To fix this, we can ignore specifically the targeted entity's
obstruction tag. This can be considered a fix to 6e05a00929.

temple accepted an earlier version of this patch (specifically elexis'
version).

Fixes #4473

Based on a patch by: elexis
Differential Revision: https://code.wildfiregames.com/D1424
This was SVN commit r22533.
2019-07-23 06:18:07 +00:00
elexis 8734efca94 Delete JSI_GUIMouse from af9c336b43 obsoleted by 64bd264fc0.
Excerpt of D1699.

This was SVN commit r22531.
2019-07-23 01:36:13 +00:00
elexis 227957cd99 Delete unused broken JSI_IGUIObject::construct.
The constructor is invalid, because one cannot create or obtain and pass
an IGUIObject C++ class instance pointer via JS, only triggering a crash
when doing something with it.
If there was a use case, the GUIObject should be created with a
GUIObject type specific constructor.
Remove obsolete getProperty comments.

From D1699, refs #5369 and wraitiis equivalent:
Differential Revision: https://code.wildfiregames.com/D1933
This was SVN commit r22530.
2019-07-23 01:24:49 +00:00
elexis b04a8d4793 Disable eslint curly rule, because none of its configurable enforcement reflects the curly brace convention of this repository, refs #5524.
Differential Revision: https://code.wildfiregames.com/D2070
Patch By: Krinkle
Reviewed By: Imarok
This was SVN commit r22529.
2019-07-22 19:55:52 +00:00
elexis b4626359f5 Provide ScriptInterface CreateObject and CreateArray functions to replace Eval calls following 7c2e9027c2, 1c0536bf08 and later.
Differential Revision: https://code.wildfiregames.com/D2080
Previous version reviewed By: Krinkle
Comments By: historic_bruno, wraitii
This was SVN commit r22528.
2019-07-22 19:35:14 +00:00
wraitii 6643613b54 Easier introduction of new damage types.
725aa8a686 introduced a DamageTypes.js global script similar to the
resources one. However, we never actually need to refer to this script
since we can always use the damage types provided by the
template/context/object we are looping over/...
There is one exception to this for AI weighting of damage types.
However, since damage types are not stored in files, this is strictly
equivalent to hardcoding them in the global script and was deemed
acceptable.

Patch By: freagarach
Reviewed By: wraitii
Refs #4801 (by invalidating it for now, though such helper files might
be useful in the future if damage types require more metadata).

Differential Revision: https://code.wildfiregames.com/D1938
This was SVN commit r22527.
2019-07-22 18:37:18 +00:00
wraitii 32e8ed51aa UnitMotion - Send messages to UnitAI when obstructed, to allow stopping early when walking and avoiding pathfinding lag.
As reported by #5521, Ordering units to walk to a point in a forest can
lag terribly, as units will end up computing long short paths in the
forest, which can result in `ComputeShortPath` calls that individually
take upwards of 80ms.

This can be alleviated by allowing units to stop a bit earlier. A23
handled this in UnitMotion directly, but it's better to handle this in
UnitAI to avoid surprises and to make it customisable on a per-state
level.

This diff further speeds up using the short pathfinder by starting with
a smaller search range, limiting the max-range more and moving the range
slightly towards the goal.

This also refactors UM sending messages to UnitAI so that we may in the
future push more information (in particular, the entity_id that a unit
was obstructed by could be interesting for COMBAT).

This doesn't fix the possibility of lag, but it reduces its occurrence
to levels that should be similar to A23 and thus acceptable enough.

Tested By: Freagarach
Fixes #5521

Differential Revision: https://code.wildfiregames.com/D2105
This was SVN commit r22526.
2019-07-22 18:07:24 +00:00
Alexandermb 09315fdc6b Update Britons blacksmith_armorstand_armor.xml to use new @wackyserious chainmail textures
This was SVN commit r22524.
2019-07-22 00:55:23 +00:00
elexis 1a3ba39900 Trader linting, refs D2106.
Differential Revision: https://code.wildfiregames.com/D2107
Patch By: Angen
Comments By: Vulcan
This was SVN commit r22523.
2019-07-21 20:19:39 +00:00
elexis 51419d7092 Correct uncaught MapReader and MapGenerator throw statements following 2b138f47db and 2180862d40.
Differential Revision: https://code.wildfiregames.com/D2089
Reviewed By: historic_bruno
This was SVN commit r22521.
2019-07-21 01:35:39 +00:00
elexis 41ee485e68 Remove unused GUIManager SGUIPage members from 7c2e9027c2 and 4b1297b328.
This was SVN commit r22520.
2019-07-21 01:29:08 +00:00
wraitii 13209c3183 Revert 09916ce6cb which broken jenkins build.
This was SVN commit r22519.
2019-07-20 13:10:53 +00:00
wraitii 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
Itms 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
elexis 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
JoshuaJB 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
Itms 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
elexis 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
historic_bruno 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
wraitii 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
wraitii 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
wraitii 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
historic_bruno 9f8fb83a89 Removes deprecated 'register' storage class from mongoose. Refs #3068
This was SVN commit r22503.
2019-07-18 06:28:51 +00:00
historic_bruno 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
Itms 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
wraitii 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
wraitii 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
historic_bruno 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
historic_bruno 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
historic_bruno 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
elexis 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
elexis 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
elexis 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
elexis 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
wraitii 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
elexis a6f30c14d5 Provide microsecond precision in the RandomMapLogger too, refs 7a91d330d3.
This was SVN commit r22481.
2019-07-15 14:44:53 +00:00
elexis 3e8205d7bf Moar lineendings.
This was SVN commit r22478.
2019-07-15 02:18:51 +00:00
wraitii 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
elexis 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
wraitii 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
wraitii 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
wraitii 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
elexis 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
wraitii 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
wraitii 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
historic_bruno 5fe08f1471 Actually use variable added in 80d9a44ab5. Refs #5501.
This was SVN commit r22468.
2019-07-14 05:15:51 +00:00
historic_bruno 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
elexis 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
wraitii 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
wraitii 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
elexis 3c2f15ee8b Fix lineendings.
This was SVN commit r22460.
2019-07-12 17:40:40 +00:00
elexis 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
wraitii 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
historic_bruno a573460c65 Updates library LICENSE.txt for libsodium and macOS patches
This was SVN commit r22457.
2019-07-12 15:25:12 +00:00
wraitii 57362f7fa3 UnitMotion - remove m_PathState, which is redundant with other variables.
m_PathState kept 3 pieces of information that can be deduced using other
variables:
 - whether the entity was following a path. This can be better deduced
by checking if the entity has short/long waypoints.
- whether a path is currently being requested. This can be better
deduced by checking the value of m_ExpectedPathTicket
- whether the requested path is long or short. This can be stored
directly alonside the path request ticket number, making it more obvious
why it exists.

With these changes, m_PathState can be removed.

Differential Revision: https://code.wildfiregames.com/D1903
This was SVN commit r22456.
2019-07-12 14:49:32 +00:00
historic_bruno 1ecac53a38 Fixes GnuTLS build on macOS.
Fixes macOS linker warning "PIE disabled absolute - addressing not
allowed".

Updates nettle to 3.5.1, GnuTLS to 3.6.8, gloox to 1.0.22.
Disables TCP fast open feature of GnuTLS (requires 10.11, no SDK build
support).
Fixes GnuTLS detection of GMP by adding it to LIBS flag.
Disables getaddrinfo on gloox 1.0.22. Lobby connections failed during
server hostname resolution.
Adds --with-pic to GMP build to force consistent PIC usage.
Adds -N flag to patch commands to avoid reapplying them.
Removes unneeded build flags.
Documents --enable-fat configure flag: GMP and nettle detect
CPU-specific features, fat binaries let us build and run them on
different CPUs (see D1772).

Fixes #5453, 5489. Refs #5481.
Tested by: kali0ad, trompetin17
Reviewed by: elexis, trompetin17
Differential Revision: ​https://code.wildfiregames.com/D2057
This was SVN commit r22455.
2019-07-11 21:48:50 +00:00
trompetin17 1918fd11d4 fixing Build atlasUI inside xcode missing libpng, libjpeg
Refs #5493
Differential Revision: ​https://code.wildfiregames.com/D2062
Reviewed By: historic_bruno
This was SVN commit r22454.
2019-07-11 16:13:57 +00:00
wraitii e674da7e5e Unit Motion - Remove m_FinalGoal in favour of recomputing when necessary.
It is generally better to use the movement request data as that is our
actual target and goals are just a representation of that at any given
time. Where a PathGoal is required, compute this lazily.

This allow failing easily in MoveToX() functions if the goal cannot be
computed.

Differential Revision: https://code.wildfiregames.com/D1902
This was SVN commit r22452.
2019-07-10 18:57:53 +00:00
wraitii 54f7a09a54 Unit Motion - make sure units that die while moving don't keep their obstruction
Introduced by 70e22e2923. PositionChanged messages sent between
MT_Destroy handling in CmpObstruction and the actual destruction of the
component could re-recreate an obstruction, which would then live
forever in the obstruction manager.

This prevents that by de-activating the obstruction when it is
destroyed, so that further PositionChanged messages do nothing.

Differential Revision: https://code.wildfiregames.com/D2060
This was SVN commit r22451.
2019-07-10 18:43:21 +00:00
wraitii bbc2e84160 Unit Motion - combine Goal computation logic from MoveToPoint and MoveToTarget
MoveToPoint and MoveToTarget both compute a goal from a move request.
They can be combined to reduce duplication and streamline the code.

Differential Revision: https://code.wildfiregames.com/D1984
This was SVN commit r22450.
2019-07-10 18:41:17 +00:00
wraitii 7d610d3412 Remove redundant checks in HandleObstructedMove performed already by PathResult
HandleObstructedMove contains logic to drop long waypoints, should they
be occupied by units (because that can get the pathfinder stuck, since
the long-range pathfinder can find a path, but not the vertex one).

However PathResult already drops waypoints this way, so this code can be
removed for simplification.

Differential Revision: https://code.wildfiregames.com/D1981
This was SVN commit r22448.
2019-07-09 19:59:43 +00:00
wraitii 4ca448a686 Fix Formation walking / other orders with the new UnitMotion
This fixes a number of issues with formations:
- Gives the controller an obstruction. This fixes the bug where units in
formations can't gather from a tree.
- Stop special-casing formation members in PathResult. This fixes
formation members being stuck in-place when they run in an obstruction.
- Makes sure units stay in Formation.IDle when they are idle so that
D1337/D1901 can work correctly in the IDLE state.
- Warn if animals enter this state.
- Make sure that formation members that end up in INDIVIDUAL.IDLE go
back to FORMATION.IDLE for sanity and for better housekeeping (refs
#3144 - fixed completely upstream).

Differential Revision: https://code.wildfiregames.com/D2048
This was SVN commit r22447.
2019-07-09 19:58:44 +00:00
wraitii a1dc9cadd8 UnitMotion / AI - remove the special 'move' animation, make UnitMotion inform the visual actor directly.
Use UpdateMovementState to inform the visual actor of the unit's speed,
which cill update the movement animation accordingly.
The removes the need for UnitAI to handle movement animation using the
special "move" state.

Differential Revision: https://code.wildfiregames.com/D1901
This was SVN commit r22446.
2019-07-09 19:56:28 +00:00
vladislavbelov 09e129bce2 Adds an tool to pick water high by terrain click in Atlas.
Reviewed By: trompetin17
Differential Revision: https://code.wildfiregames.com/D2037
This was SVN commit r22445.
2019-07-09 18:16:55 +00:00
elexis 8a32b0b3d4 Fix some gcc 8 and gcc 9 compiler warnings that were thrown 4500 times.
Refs #5294
Differential Revision: https://code.wildfiregames.com/D2055
Reviewed By: Vladislav
This was SVN commit r22443.
2019-07-09 00:18:48 +00:00
wraitii 7cf6244110 Formation animation refactor - use animation variants instead of special move override.
The animation overrides are a little awkward. Instead, use animation
variants, which allow defining different animations (and props and such)
easily for different units in a formation.
This lets us clean up the special C++ code to override the walk
animations.

It continues the work started by 8446b92f1b.

Original Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1337
This was SVN commit r22442.
2019-07-08 18:23:44 +00:00
wraitii 3c3f85ce98 Unit Motion - remove m_State
Following D1899/98f609df1d, we have logic that can handle calling
MoveSucceeded() even if we don't go through the special STATE_STOPPING
state, and following D1898/8ac104b07a we no longer need STATE_STOPPING
for animation sync either.

m_State can therefore be entirely removed as it is redundant with other
information.

Differential Revision: https://code.wildfiregames.com/D1900
This was SVN commit r22441.
2019-07-08 18:09:21 +00:00
wraitii 54ffd9df94 Various Unit AI fixes following UM / UAI changes
- Garrisoning cleanup (return true in some cases in ENTER when we do
change the state)
- Fix animal walking speed until D1901 lands
- Fix trading behaviour which occasionally bugged out.

Differential Revision: https://code.wildfiregames.com/D2045
This was SVN commit r22440.
2019-07-08 18:06:37 +00:00
elexis 01161e3451 Fix build without precompiled headers following the Atlas UTF8 fix in 800bf0da24 and ThreadUtil include removal in ba736916fc.
Differential Revision: https://code.wildfiregames.com/D2043
Reviewed By: Vladislav, wraitii
This was SVN commit r22437.
2019-07-07 21:52:52 +00:00
bb 61a346e55b Add damage container also in the examples, following f4babd9b34
Reviewed By: Nescio
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D1995
This was SVN commit r22436.
2019-07-05 18:15:42 +00:00
wraitii a70374b1da Improvements to gather order when out or resources and fix 8a38cfb7cf
8a38cfb7cf introduced an issue, as it expected "this.order.data.initPos"
to always exist. But going through `GatherNearPosition` did not set it.

Fix this by setting that variable in `GatherNearPosition`.
Use the opportunity to still fallback to the unit's position if the
variable were to not exist for some reason (defensive programming
against future changes).
Re-enable "return resource" behaviour as the final fallback case - The
GatherNearPosition call previously always passed thus this no longer
triggered.

Possible follow-up: try gathering near the dropsite found.

Differential Revision: https://code.wildfiregames.com/D2039
This was SVN commit r22434.
2019-07-04 19:55:09 +00:00
vladislavbelov da2f644428 Adds a possibility to disable saving of replay in autostart mode.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D2017
This was SVN commit r22432.
2019-07-03 21:36:40 +00:00
wraitii 99a341f379 UnitMotion - account for target's movement in ComputeTargetPosition (improve chasing behaviour).
After the recent UM changes, units sometimes chase/flee forever as they
can never actually get in range.
This is because moving to the current target's position is not enough
when the target is moving.

By accounting for the target movement's in ComputeTargetPosition, the
behaviour is much improved.

Differential Revision: https://code.wildfiregames.com/D1987
This was SVN commit r22431.
2019-07-03 18:09:31 +00:00
wraitii 58018a1056 UnitMotion - rename CheckTargetMovement to PathingUpdateNeeded for clarity, and improve the logic.
This new version compares the final waypoint with the target's
obtruction shape and uses reachability checks to know if we will be in
range or not.

Differential Revision: https://code.wildfiregames.com/D1983
This was SVN commit r22430.
2019-07-03 18:06:53 +00:00
wraitii f990cd2381 Ensure units do get in attacking range since that range can change over time because of elevation differences.
This is a partial revert of 4fda917f46, which skipped the
"MoveToTargetAttackingRange" in APPROACHING. I (incorrectly) assumed
that the original order was still perfectly fine, but in fact the
attacker's max range may have changed as that depends on the relative
elevation between attack and target - and so the original order might
never get us in range!
This was introduced originally in 8c74df2acd.

Add a comment to clarify this.

Further, this makes sure UnitMotion still is aware that it has a target
even if it is in range from the beginning, as that could lead
to stuckiness (and did when chasing sometimes). This was done in D1984
anyways.

Fixes #5478.

Differential Revision: https://code.wildfiregames.com/D2035
This was SVN commit r22429.
2019-07-03 18:05:11 +00:00
wraitii 8a38cfb7cf Return Gathering to A23 behaviour - Make units try to gather near the target resource's position instead of their position.
Units were incorrectly looking at resources near their position
following 7d53fb19a2.

Fixes #5477.

Differential Revision: https://code.wildfiregames.com/D2034
This was SVN commit r22428.
2019-07-03 17:57:16 +00:00
wraitii 5fef05d780 UnitMotion - make ComputeTargetPosition return a position for point goals
This makes it possible to merge the TryGoingStraightTo family of
function.
This means it is now called even for point goals and decreases the
likelihood of stuck units (as we take over from the long-range
pathfinder which brings units to navcell centers, which may not be in
the goal).

Differential Revision: https://code.wildfiregames.com/D1982
This was SVN commit r22426.
2019-07-02 07:29:31 +00:00
wraitii 5568bd4c16 UnitMotion - Explicit handling of movement errors (such as target death) in Combat.Approaching
In A23, units that are approaching an enemy (Combat.Approaching) will
carry on moving to their last waypoint if the target dies, and then go
idle.
As of 69d3e76fd2, this no longer happens and units stop in their tracks,
staying in attacking forever.

This lets Combat.Approaching explicitly handle the error, deciding what
is best to do:
- go to the next order (for hunting and queued orders)
- find new targets nearby (in case the attack wasn't a forced order)
- walk to the target's last known position and find units to attack
there (in case it was). This is A23 behaviour.

Differential Revision: https://code.wildfiregames.com/D1992
This was SVN commit r22425.
2019-07-02 06:49:27 +00:00
wraitii ff9d162c8c Make sure states are exited if the movement update fails.
Differential Revision: https://code.wildfiregames.com/D1998
This was SVN commit r22423.
2019-07-01 19:51:21 +00:00
wraitii 44aef27b78 Adapt unitMotion to edge-edge distance checks.
D981/c219ee54b2 changed IsInXChecks to use edge-to-edge distance instead
of centre-to-edge, which broke UnitMotion's min-range movement, which
assumed distance to the center.

Since units are represented as squares, the diagonal point may be closer
to the target than the "real" clearance by a factor √2, so the delta
between minimum range and maximum range should be at least `(√2 - 1) *
clearance` to be safe in all situations (this is generally not a problem
for regular units which have a clearance of 0.8, but could be one for
catapults or elephants).

Differential Revision: https://code.wildfiregames.com/D1969
This was SVN commit r22422.
2019-07-01 19:50:06 +00:00
wraitii d2c88acf44 Fix 3e43ddd869: s/target/this.gatheringTarget
Differential Revision: https://code.wildfiregames.com/D2032
This was SVN commit r22421.
2019-07-01 19:02:00 +00:00
bb bdb742488a Cleanup UnitAI's FaceTowardsTarget function and allow units without a unitMotion in that.
Patch By: Freagarach
Differential Revision: https://code.wildfiregames.com/D2014
This was SVN commit r22420.
2019-07-01 12:32:57 +00:00
bb 3a77eb25d3 Fix ESLint semicolon-related warnings
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D2004
This was SVN commit r22419.
2019-07-01 11:09:19 +00:00
wraitii b20f357764 Don't use the opposite edge in UnitAI range checks.
For now, we use the nearest-edge to nearest-edge distance for min-range
checks (following much discussion on D981).
This was missed when committing it in c219ee54b2.

UnitMotion was already correctly not using opposite edge checks.

Differential Revision: https://code.wildfiregames.com/D2031
This was SVN commit r22416.
2019-06-30 19:05:04 +00:00
wraitii 69d3e76fd2 Unit Motion - Stop when targets have an invalid position.
Previously, unitMotion had no code that checked particularly if the
target was still in the world.
When the target moved out of the world, unitMotion would follow the path
to its last known position, then send a "MoveSucceeded" message once
there.

Following 98f609df1d, this message was no longer sent. Thus unit would
follow their path to its last waypoint and stay there, unable to carry
on or finish the order. UnitMotion now explcitly sends a "MoveFailed"
message.

This still changes behaviour from A23, requiring further revisions to
UnitAI (see D1992 for one such case).

Minohaka tested an earlier version of this change (which incorporated
D1992) and accepted it.

Differential Revision: https://code.wildfiregames.com/D1979
This was SVN commit r22415.
2019-06-30 19:00:27 +00:00
wraitii 3e43ddd869 Fix 0b41e8ee61, make units again properly hunt animals that died in FoW.
The reason was that the unit immediately tried gathering nearby instead
of going to the unit's last known position.

Related to D1997.

Differential Revision: https://code.wildfiregames.com/D1996
This was SVN commit r22414.
2019-06-30 18:55:26 +00:00
wraitii f42d97c6f3 Fix some animals "roaming" state not working correctly (units seem stuck in place)
Due to an issue in 4a15cc3b9f, animals incorrectly tried going towards
the roaming point instead of away from it.

With that fixed, MovementUpdate still did not trigger as the min and max
range were the same.
Use -1 as max range (= infinite) instead since we want to move
arbitrarily away.

Having an infinite max range was broken in c219ee54b2, this
re-implements that.

Further, other calls with equal min and max range have been changed
likewise.

This does not entirely fix whales, which run in other problems because
of their large roaming range.

Differential Revision: https://code.wildfiregames.com/D1980
This was SVN commit r22413.
2019-06-30 18:53:25 +00:00
wraitii a7573ae911 Fix IsInjured overwrite in 56ed4c1dc8
Reported By: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2027
This was SVN commit r22412.
2019-06-29 19:42:58 +00:00
wraitii 56ed4c1dc8 Fix IsInjured call on miraged entities.
ea208f19a3 introduced an "IsInjured" function, used in the GUIInterface.
Mirages must mock this function and this was missed in the original
diff.

Tested By: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D2018
This was SVN commit r22411.
2019-06-29 17:17:07 +00:00
bb 445a5d8855 Clean up technologie data files:
- put modification each on an own line
 - space/tab correct
 - space correct objects
 - remove trailling 0's

Partially requested by: Stan
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1953
This was SVN commit r22408.
2019-06-28 15:58:21 +00:00
Itms 6cde90104a Update precompiled win32 libogg to 1.3.3 and libvorbis to 1.3.6, building them with VS2015, refs #5379.
Use the default naming for both libraries (libvorbis instead of vorbis),
and use our default suffix for debug versions of the libs.

This was SVN commit r22406.
2019-06-27 22:36:04 +00:00
vladislavbelov 8babfe2330 Refactors camera projections - makes projection functions of camera more clear.
Reviewed By: elexis
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2012
This was SVN commit r22404.
2019-06-26 22:54:05 +00:00
vladislavbelov ec4d84c72f Removes unused and obsolete LightingModel.
It was introduced in d295dacb9b as a way to control behavior of shaders.
Its usage in shaders was completely removed in 05008d190e (before that
in b7888aea52).

Reviewed By: elexis
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D2011
This was SVN commit r22403.
2019-06-26 22:30:23 +00:00
vladislavbelov 3b77a0fba1 Update the minimap, range overlay renderer, and status bars when a player's color is changed in Atlas.
These were missing from 343ec21e75.

Patch By: temple
Differential Revision: https://code.wildfiregames.com/D1261
This was SVN commit r22402.
2019-06-26 19:16:57 +00:00
vladislavbelov da13a6c734 Fix missing slash in common-api of entity. The mistype was introduced in c1e86161b5.
It wasn't found because it's not used at all. It was added in
07ea313ad6, and its usage was removed in 998dc21676.

Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1994
This was SVN commit r22401.
2019-06-26 18:04:33 +00:00
Stan 352ce9b41c Add the new keyword for BigTiger's maps.
Fixes 4ac8ea7989

This was SVN commit r22400.
2019-06-25 21:08:29 +00:00
wraitii fe2bb77e0f Skybox calculation - fix regression of 9376609ee8 introduced in 01a8138780
Audited By: vladislavbelov
Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1985
This was SVN commit r22399.
2019-06-25 19:23:57 +00:00
wraitii 47256dca84 Add Krinkle to 0 A.D.'s programming credits
Reviewed By: Krinkle
Differential Revision: https://code.wildfiregames.com/D1990
This was SVN commit r22398.
2019-06-25 19:22:46 +00:00
trompetin17 844462b0c0 #5445
This was SVN commit r22397.
2019-06-25 05:05:06 +00:00
vladislavbelov 3573c87fc8 Makes rendering helpers (culling camera, frustums) be available through the developer overlay.
It helps to test/debug patches like D1847.

Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1972
This was SVN commit r22395.
2019-06-23 20:17:44 +00:00
Stan 98f6866814 Remove two duplicate textures and models. They were incorrectly added in 4981cdedad in the flow of new objects.
Noticed by: @elexis
This was SVN commit r22394.
2019-06-22 20:50:47 +00:00
LordGood abc0beb07d Teak, dragon bamboo, scaled down some baked normal and ao maps larger than the base map, minor edits to areca palm
This was SVN commit r22392.
2019-06-19 08:16:38 +00:00
LordGood 1c4de428cb may have forgotten an actor file, also areca palms
This was SVN commit r22391.
2019-06-18 17:57:13 +00:00
LordGood b77336b491 bananas and strangler figs
This was SVN commit r22390.
2019-06-18 16:04:28 +00:00
Stan 6d0a91a886 Fix a little glitch on the Athenian storehouse.
Reported by: @vladislavbelov.
This was SVN commit r22389.
2019-06-18 12:14:54 +00:00
Stan 44d699b432 Remove three unused capes.
This was SVN commit r22388.
2019-06-18 09:34:15 +00:00
Stan afca278486 Improve starting position camera for Oceanside (2)
Patch by: BigTiger
This was SVN commit r22387.
2019-06-17 22:34:41 +00:00
Stan 4ac8ea7989 3 New temperate maps by BigTiger.
This was SVN commit r22386.
2019-06-17 18:24:09 +00:00
Stan 0df4d130cf New particle actors by BigTiger.
This was SVN commit r22385.
2019-06-17 18:23:41 +00:00
Stan 1d841a71fe New terrain textures by BigTiger for the temperate biome.
This was SVN commit r22384.
2019-06-17 18:23:16 +00:00
Stan 4981cdedad New bushes, trees (Oaks, firs, Birch) by Big Tiger, as well as new cliffs, and decals.
This was SVN commit r22383.
2019-06-17 18:22:07 +00:00
Itms 4967d176b9 Define variables before mentioning them in scripted component tests, and add a linter rule for this.
Patch By: Krinkle
Differential Revision: https://code.wildfiregames.com/D1986
This was SVN commit r22380.
2019-06-16 20:48:28 +00:00
wraitii f4babd9b34 Wrap damage types in a Damage element in XML templates to prepare for genericizing them.
Patch By: Freagarach
Reviewed By: Wraitii
Differential Revision: https://code.wildfiregames.com/D1950
This was SVN commit r22379.
2019-06-16 17:08:27 +00:00
wraitii 61db02790c Fix cppformat failures on MacOS tests.
cppformat tests failed on MacOS - the global locale was not set and
defaulted to something unexcpeted.
It is now fixed to US notation.

Patch By: Krinkle
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1978
This was SVN commit r22378.
2019-06-16 15:25:17 +00:00
LordGood 9e8a43401e fixed anomaly in doum palm
This was SVN commit r22377.
2019-06-15 19:43:22 +00:00
LordGood 7a25c9e88e Holly oaks, fixing some weird normals on the atlas cedar, and a few edits to the quarry stone and texture maps I don't remember doing, but I can trust past me to have made good decisions, right?
This was SVN commit r22376.
2019-06-15 19:00:12 +00:00
wraitii 190f8d3566 Calculate entity limit counts correctly when SpawnUnits fails in ProductionQueue.
When adding a batch of unit, these in-training units get added to the
production queue and to the entity limit count.
These in-training units need to be removed from the entity limit counts
when spawning them, or we would be double-counting them. This was done
when creating the cached entities, but this was too early: entities
might fail to spawn, for example when there is no room around the
foundation.

Change that so the entity limit count is now decremented right before
giving spawned entities the correct owner (which triggers EntityLimits
OnGlobalOwnershipChanged, which adds the spawned entities to the entity
limit count).

Additionally, add Init to TrainingRestrictions so that the test setup
doesn't complain. Other components have an empty Init instead of
checking for Init in the test setup (and 61/67 have an Init function) so
it seems more standard this way.


Reported By: elexis
Reviewed By: wraitii
Patch By: Angen
Tests By: wraitii
Differential Revision: https://code.wildfiregames.com/D1879
This was SVN commit r22375.
2019-06-15 17:27:24 +00:00
wraitii 5992943f43 Fix resource-returning order sometimes not working correctly (introduced by 0c20afdfda)
Differential Revision: https://code.wildfiregames.com/D1975
This was SVN commit r22374.
2019-06-15 15:07:27 +00:00
vladislavbelov d1fb66d2a7 Cleanups BoundingBoxAxisAligned and fixes coding styles a bit.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1951
This was SVN commit r22372.
2019-06-12 20:23:14 +00:00
vladislavbelov 3e53d05298 Fixes includes and forward declarations in CPatchRData.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1952
This was SVN commit r22371.
2019-06-12 20:03:22 +00:00
vladislavbelov 2bcf4f678b Refactors Developer Overlay using an object instead of global functions.
Reviewed By: wraitii
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1928
This was SVN commit r22370.
2019-06-12 19:21:44 +00:00
wraitii 63e1c9ff1a Fix typo in 0b41e8ee61.
This was SVN commit r22368.
2019-06-11 20:09:40 +00:00
wraitii 0b41e8ee61 Fix leftovers from 0c20afdfda - improve repairing, chasing and fleeing behaviour.
0c20afdfda made states more caller-independent but did not change some
callsites to be compatible with that. This fixes those.

This does not fix chasing entirely however since unitMotion does not
always recognize that the target moved enough that the entity will never
be in range.
This will be fixed upstream.

Differential Revision: https://code.wildfiregames.com/D1968
This was SVN commit r22367.
2019-06-11 20:06:25 +00:00
wraitii 98f609df1d UnitMotion - Change "Possibly At Destination" logic.
UnitMotion will now send hints that a move may be completed if:
- it is a formation member and the formation member has stopped moving.
- it isn't and it is in range from its target.

Differential Revision: https://code.wildfiregames.com/D1899
This was SVN commit r22366.
2019-06-11 19:52:40 +00:00
wraitii 8ac104b07a Fix 'gliding' behaviour at the end of movement by moving the PossiblyAtDestination check earlier.
Units in 0 A.D. exhibited a "gliding" behaviour at the end of a
movement, e.g. they switched to the Idle animation and still moved a
little bit.

The reason for this behaviour is that entities check if they reached
their destination after moving. Other components (unitAI mostly) will
then possibly change animations and such, resulting in a movement over
the turn while the entity is possibly now in another animation state
than "move".
Instead, what should be done is checking if the entity has arrived
before moving, so if UnitAI calls StopMoving, then entity won't move at
all on the same turn, and the gliding effect vanishes.

The STATE_STOPPING state is made un-necessary by this change, since this
off-by-one mistake was the reason for its existence. It can be removed
(see downstream).

Differential Revision: https://code.wildfiregames.com/D1898
This was SVN commit r22365.
2019-06-11 18:51:55 +00:00
wraitii f04bdd84ae UnitMotion - Split Move() into several functions
Move() is generally 4 parts:
- Moving
- Updating our state
- Handling obstructed moves
- Checking if we are at destination.

These can all be put in their own functions, clarifying logic and making
it harder to make mistakes.

Differential Revision: https://code.wildfiregames.com/D1897
This was SVN commit r22364.
2019-06-11 17:25:59 +00:00
wraitii ad4594e55d UnitMotion - move TryGoingStraight before the core of the 'Move' logic
In preparation for D1897, this logic isn't related to the "movement"
part of Move(), and can be called earlier.

Differential Revision: https://code.wildfiregames.com/D1896
This was SVN commit r22363.
2019-06-10 19:35:02 +00:00
wraitii 36341b5d6c UnitMotion - Handle obstruction moving flag similarly to m_CurSpeed
The obstruction manager keeps a flag of moving units. This should be
updated in the same location as the entity's current speed, since they
have similar properties.

Differential Revision: https://code.wildfiregames.com/D1895
This was SVN commit r22362.
2019-06-10 19:33:24 +00:00
wraitii 1adf9560b8 Unit Motion - update our current speed even when we have not moved.
VisualActor refers to unit motion's `m_CurSpeed` to know what animation
to display in the special walk mode. However that variable was
inconsistently updated. By making sure we reach that codepath in one
place, we remove opportunities for issues.

This should fix most existing instances of moonwalking, another upstream
diff will fix the rest.

Differential Revision: https://code.wildfiregames.com/D1894
This was SVN commit r22361.
2019-06-10 18:27:27 +00:00
wraitii 017cb504ee Drop an indentation level in UnitMotion.
This will simplify later changes.

Differential Revision: https://code.wildfiregames.com/D1893
This was SVN commit r22360.
2019-06-10 17:15:27 +00:00
Stan eee977fd7d Fix wrong actor file for persian cavalry javelinist base actor when gathering meat
Patch by: @Angen
Differential Revision: https://code.wildfiregames.com/D1967
This was SVN commit r22359.
2019-06-10 10:13:24 +00:00
Stan 641a1a4b85 Remove duplication of attack variant from Kush hero 'hero_infantry_archer_amanirenas.xml'.
Patch by: @Angen
Differential Revision: https://code.wildfiregames.com/D1966
This was SVN commit r22358.
2019-06-10 10:11:07 +00:00
wraitii 70e22e2923 Unit Motion - Face point when calling StopMoving()
FacePointAfterMoving intends for the unit to face the destination once a
move is done. Since 4fda917f46, stopping is the responsibility of UnitAI
(through a call to StopMoving()). Thus we should move that code in that
function, as this ensures we don't forget to do it and removes
duplications.

Differential Revision: https://code.wildfiregames.com/D1889
This was SVN commit r22355.
2019-06-09 17:06:24 +00:00
wraitii f2db913a7d Unit Motion - remove the m_Moving variable
The variable is not necessary since having a target is equivalent,
removing it thus reduces redundant state.

Differential Revision: https://code.wildfiregames.com/D1888
This was SVN commit r22354.
2019-06-09 17:04:18 +00:00
wraitii 6e6f7699d0 Fix repairing/garrisoning range checks following 4fda917f46
4fda917f46 introduced mistakes in range checks which sometimes broke
garrisoning and repairing.

Reported By: gameboy
Differential Revision: https://code.wildfiregames.com/D1963
This was SVN commit r22353.
2019-06-09 16:59:27 +00:00
wraitii 4a15cc3b9f Unit Motion - wrap target state into a struct
These variables together held the state for the target of UnitMotion, as
set by the MoveTo[X] family of functions.
Wrapping them in a struct reduces the chances that one will accidentally
forget to reset part of the state and makes it explicit in-code that
these are grouped together.

Calling StopMoving() resets this target, which wasn't before and left
the component in an incoherent state.

Differential Revision: https://code.wildfiregames.com/D1887
This was SVN commit r22352.
2019-06-09 11:18:06 +00:00
wraitii 4fda917f46 Prevent UnitMotion from stopping on its own, and rename "MoveCompleted" to "MovementUpdate"
UnitAI is now solely in charge of moving and stopping, making UnitMotion
behaviour easier to predict, which will ultimately help with unitAI
development. It might temporarily make units more resilient than before
however.

UnitMotion also tells UnitAI that it's arrived with "MoveCompleted"
messages, but these actually could be wrong - unitAI could decide that
we didn't want to stop after all - so change the name for something less
misleading.

Differential Revision: https://code.wildfiregames.com/D1886
This was SVN commit r22351.
2019-06-09 11:16:40 +00:00
wraitii 27b686215a Remove "MoveStarted" messages
"MoveStarted" messages were sent by UnitMotion when the unit started
moving (sort of) or failed to do so. This was used by formations and
guarding but was not really necessary as this can be done in "enter" or
in a timer.

Differential Revision: https://code.wildfiregames.com/D1885
This was SVN commit r22350.
2019-06-08 12:53:28 +00:00
Stan 08bfcf144b Allow techs to affect unit counters stats.
Reviewed by: @wraitii
Differential Revision: https://code.wildfiregames.com/D1782
This was SVN commit r22346.
2019-06-06 20:44:30 +00:00
wraitii c219ee54b2 Move "IsInRange" family of functions to the Obstruction Manager and make the commutative.
These functions were placed in UnitMotion, which had nothing to do with
range checks and made them available only to moving entities for no
particular reason.

This patch also adds support for square-square range checks and
shape-shape distance checks.

Modified from a patch by bb on top of work from wraitii.

Differential Revision: https://code.wildfiregames.com/D981
This was SVN commit r22345.
2019-06-06 19:37:23 +00:00
wraitii ba736916fc Clean up ThreadUtil, use standard C++11 constructs instead of custom ones.
ThreadUtil shipped a scope lock and a mutex implementation, which can be
removed since we now have these in the standard library.
This lets us clean up this header which get included everywhere (through
profiler includes).

Tested By: Angen and Stan
Differential Revision: https://code.wildfiregames.com/D1915
This was SVN commit r22344.
2019-06-06 19:30:48 +00:00
Stan 7c88828814 Add a glow material that supports normal maps as well.
This was SVN commit r22343.
2019-06-05 23:17:37 +00:00
wraitii 7d53fb19a2 Additional fixes following 0c20afdfda - units no longer return to gather nearby resources when depleting a chicken/tree/...
Reuse the timer code in the gathering sub-state to avoid broken
duplication.

Reported By: minohaka
Test By: Angen
Differential Revision: https://code.wildfiregames.com/D1956
This was SVN commit r22342.
2019-06-05 20:44:43 +00:00
vladislavbelov 3ac1a004fa Fixes black water glitches for certain wind angles with the approximate solution.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1804
This was SVN commit r22341.
2019-06-05 20:13:31 +00:00
vladislavbelov 70ccc3e5cb Adds Camera test for ortho projection.
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1948
This was SVN commit r22340.
2019-06-05 19:55:37 +00:00
wraitii dd67d0769e Resolve issues with 0c20afdfda - unitAI order cleanup and unitMotion MoveTo change
0c20afdfda had two issues:
- some of the unitAI code did not return true when switching states in
the "enter" phase
- missed a return false in unitMotion.cpp

This fixes the issue noticed by @bb.

Differential Revision: https://code.wildfiregames.com/D1947
This was SVN commit r22339.
2019-06-05 17:27:12 +00:00
Itms f97213187e Version and update the Windows autobuilder script, refs #5379.
Patch by Angen, based on the previous bat script for the autobuilder
job.
Comments by Stan.
Differential Revision: https://code.wildfiregames.com/D1909
This was SVN commit r22338.
2019-06-04 16:48:22 +00:00
Itms 37e5097ea9 Fix a m_JumpPointCache assertion failure in debug mode, refs fa726867f1.
Patch By: Stan
Comments By: wraitii
Differential Revision: https://code.wildfiregames.com/D1942
This was SVN commit r22336.
2019-06-04 08:29:47 +00:00
s0600204 800bf0da24 Improve UTF-8 character handling in Atlas
(Also prevents the compile-time warnings reported in the abandoned
D1432)

Accepted by: Itms
Patch linting by: Stan, Vladislav, wraitii
Also tested by: Imarok
Fixes: #4936
Differential Revision: https://code.wildfiregames.com/D1395
This was SVN commit r22335.
2019-06-03 20:19:53 +00:00
vladislavbelov 4b65cc0317 Fixes a typo introduced in cb048b4738 in shore calculations, found by Angen and fixes style notes by elexis.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1949
This was SVN commit r22334.
2019-06-03 20:19:18 +00:00
vladislavbelov f4194df416 Removes unused variable from ModelRenderer introduced in 6bc33fe8bd. Found by Angen.
Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1812
This was SVN commit r22333.
2019-06-03 20:06:01 +00:00
wackyserious 9618c1fc2f Roman helmets texture recolor
-Adjusted the hue and saturation of the textures to achieve visual
uniformity.

Reviewed by: Stan
This was SVN commit r22331.
2019-06-01 10:44:01 +00:00
elexis 2b5aaad399 Revert 899714f667 to faciliate committing it again with credit in the commit message.
Agreed with: wraitii and liked by vladislavbelov in
https://wildfiregames.com/forum/index.php?/topic/26104-leper-attribution-request-899714f667/
Refs D1504

This was SVN commit r22330.
2019-05-31 21:56:13 +00:00
bb 7d25ab3a45 Merge persian and mauryan Archery Tradition technologies
Add the tech to ranges, and make them also pop upin captured barracks

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1941
This was SVN commit r22329.
2019-05-31 21:35:30 +00:00
bb 658a5a8dd1 Rename Stables class to Stable since we use the singular forms.
Fixes 964934cf4e

Patch By: Angen
Reviewed By: Nescio
Differential Revision: https://code.wildfiregames.com/D1890
This was SVN commit r22328.
2019-05-31 20:47:57 +00:00
Stan 5ecacc60f0 Fix the smoothing group issue reported by @vladislavbelov on the chat today, that is made more visible by https://code.wildfiregames.com/D1925.
- Rename civil_centre to civic_center
- Rename the shield prop object to a more explicit name.
- The template and the rubble template should be renamed in another
commit to make sure that do not affect the AI.

This was SVN commit r22327.
2019-05-31 13:21:58 +00:00
bb bd26f04e5a Set ship status bars in parent
Patch By: Nescio
Reviewed By: wraitii
Comments By: Imarok, Stan
Differential Revision: https://code.wildfiregames.com/D1842
This was SVN commit r22326.
2019-05-31 12:00:49 +00:00
bb e7f720d7bc Reduce defensive_wall* duplication
Including:
Remove LongWall from gates
Change the ("unused") gate cost component in more reasonable number and
adapt the repairTimeRatio with it to keep the health/second the same

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1794
This was SVN commit r22325.
2019-05-31 11:17:10 +00:00
Stan ddcdc643ba Further cleanup of MikkTSpace
- Move the * and & to the correct side,
- Add .0 and  0.f to clearly mark the types
- Pass pointers instead of arrays
- Add a newline after forward declaration
- Add spaces between operators
- Use c++ cast

Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1934
This was SVN commit r22323.
2019-05-30 23:03:01 +00:00
bb 4495467e65 Seperate stable from barracks
Including:

    moves template_structure_military_barracks_stables.xml to
template_structure_military_stable.xml
    updates all its children accordingly
    merges values from pers_stable.xml into the new generic template
    changes generic name Stable (singular, without s)
    standardizes rubble sizes to 5x5 (pers had 4x4)
    corrects specific name for Greek factions
    adds foundation actor to kush_stable.xml

Patch By: Nescio
Comments By: Angen
Differential Revision: https://code.wildfiregames.com/D1790
This was SVN commit r22322.
2019-05-30 21:00:18 +00:00
vladislavbelov 2cf1f85d7e Fixes tests compilation after ebfec91057. Found by Angen.
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1937
This was SVN commit r22321.
2019-05-30 17:27:55 +00:00
bb 93139ab417 Rename pers_stables to pers_stable as rest of {civ}_stable to simplify check done by Petra
Patch By: Angen
Reviewed By: Stan
Differential Revision: https://code.wildfiregames.com/D1860
This was SVN commit r22320.
2019-05-30 16:55:45 +00:00
vladislavbelov ebfec91057 Adds Camera test for frustum.
Reviewed By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1927
This was SVN commit r22319.
2019-05-29 20:12:41 +00:00
wackyserious 97fad1fe1d Re-upload the uncompressed PNG files for the previous commits.
There was a setback when I used tinypng to compress the images as it
eliminated necessary image component.

Reviewed by: Stan
This was SVN commit r22318.
2019-05-29 09:44:10 +00:00
wackyserious dcdff5e9ca New Texture: Macedonian Units
Thread:
https://wildfiregames.com/forum/index.php?/topic/22184-task-greek-unit-texture-update/

Reviewed by: Art Department and forum community.
This was SVN commit r22317.
2019-05-29 09:30:16 +00:00
Stan 39720041f7 Cleanup MikktspaceWrapper.
Reviewed by: @Angen
Differential Revision: https://code.wildfiregames.com/D1872
This was SVN commit r22316.
2019-05-28 22:06:29 +00:00
Stan 8cb7c4ec34 New horse and cattle fauna template corrections
Patch by: @Nescio
Reviewed by: @Stan
Differential Revision: https://code.wildfiregames.com/D1874
This was SVN commit r22315.
2019-05-28 20:46:56 +00:00
wraitii ca9109be75 Fix a crash on some system when Alt-tabbing during game setup.
Move checks for rendering a frame in Render() to avoid missing calls to
this functions, which can crash on certain systems.

Move the sound manager's idle task out of Render().
Move the buffer swapping in Render() since we do not need to swap
buffers unless we are rendering.

Patch By: Angen
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D1495
This was SVN commit r22314.
2019-05-28 13:18:32 +00:00
wraitii 0c20afdfda Unit Motion: MoveTo family of function no longer returns false if the move is un-necessary, instead unitAI checks explicitly.
This also moves the actual "moving" code to states instead of orders,
making states more self-contained and removing the change of errors when
cleaning up a state.

Differential Revision: https://code.wildfiregames.com/D1865
This was SVN commit r22313.
2019-05-28 11:38:18 +00:00
wraitii e2233a4a90 Don't clear pathnames in vfs::GetPathnames so it can be called several times.
Differential Revision: https://code.wildfiregames.com/D1914
This was SVN commit r22312.
2019-05-28 10:18:04 +00:00
wraitii 899714f667 Small commands.js cleanup
Differential Revision: https://code.wildfiregames.com/D1504
This was SVN commit r22311.
2019-05-28 10:00:19 +00:00
wraitii 0f645b45a9 Fix red squares on some maps when using HQ water effects
This fixes an oversight in rp22297.

Reported By: gameboy
Differential Revision: https://code.wildfiregames.com/D1919
This was SVN commit r22310.
2019-05-28 09:57:14 +00:00
Stan 42591587a8 New less broken walls for the gauls, move the gaul walls to the gaul repository, the gaul gate will be moved when it's replaced/improved.
Thread:
https://wildfiregames.com/forum/index.php?/topic/17326-your-screenshots/page/19/
https://wildfiregames.com/forum/index.php?/topic/19465-suggestions-for-the-gauls/page/4/

This was SVN commit r22309.
2019-05-27 22:01:25 +00:00
s0600204 804d36fca3 Add a build flag to prefer locally-built libraries (linux/bsd systems)
To use:
```
./update-workspaces.sh --prefer-local-libs
```
Then run `make` as usual.

Accepted by: Itms
Differential Revision: https://code.wildfiregames.com/D1747
This was SVN commit r22308.
2019-05-27 15:45:57 +00:00
Stan 792027f18d Unify stables names.
Fix some decals,
Remove AO suffix,
Rename struct_b to roof
Use stable_elephant as per the art convention
<general>_<civ>_<type>_<extra>_<variation>

This was SVN commit r22306.
2019-05-26 20:11:58 +00:00
wraitii 12f893b1e3 Remove 'Async' from short/long path requests names
Having Async in the name was not really informative and made it awkward
to reuse for non-async code.

Reviewed By: Kuba386
Differential Revision: https://code.wildfiregames.com/D1854
This was SVN commit r22305.
2019-05-26 13:47:41 +00:00
wraitii f504c643a0 Allow entities to be affected by Status Effects from ranged attacks.
This implements a status effects receiver component (in a similar
fashion to the damage receiver component). The plan is to further extend
this component notably to handle graphical indication of status effects,
and a variety of other effects.

Currently implemented: ranged attacks can inflict status effects that
reduce HP over time.
This can be resisted by armour.

No units currently utilise this in-game but with proper graphics support
that could be changed.

Patch By: Mate-86
Reviewed By: wraitii
References #1912

Differential Revision: https://code.wildfiregames.com/D1252
This was SVN commit r22304.
2019-05-26 12:44:46 +00:00
wraitii 65fcd66556 Update precompiled headers to improve build times.
Expect a 10-25% build time improvement.

Original Patch By: Angen
Reviewed By: Angen
References #5038

Differential Revision: https://code.wildfiregames.com/D1333
This was SVN commit r22303.
2019-05-26 07:21:12 +00:00
s0600204 9ea68317ad Use pkg-config where possible instead of hard-coding or library-specific programs
Accepted by: Itms, wraitii
Previously tested by: andy5995
Fixes: #5157
Refs: D1582
Differential Revision: https://code.wildfiregames.com/D1611
This was SVN commit r22302.
2019-05-25 18:00:40 +00:00
wraitii 220449ea9a JPS - make the JPC cache usable again (98f4ed6cb8 fix)
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1875
This was SVN commit r22301.
2019-05-25 16:01:44 +00:00
wraitii 537a141867 Early-exit when destroying invalid entities (INVALID_ENTITY, already destroyed…)
Destroying INVALID_ENTITY is valid and should do nothing.

The current code will send MT_Destroy messages when doing this, which is
un-necessary work and feels kind of broken to me.
Early-exit instead.

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1736
This was SVN commit r22300.
2019-05-25 15:59:43 +00:00
wraitii 94e0856485 ShouldConsiderOurselvesAtDestination renamed to CloseEnoughFromDestinationToStop and stateful effects moved at the caller.
It improves readability of the code when a function that seems like it
does a simple check actually only does a simple check and the caller is
the one changing state.

Differential Revision: https://code.wildfiregames.com/D1884
This was SVN commit r22299.
2019-05-25 13:23:44 +00:00
wraitii ea208f19a3 Health.js cleanup: add tests, add an "IsInjured" function, use this.hitpoints everywhere
Continuation of D1769.

Differential Revision: https://code.wildfiregames.com/D1828
This was SVN commit r22298.
2019-05-25 13:11:46 +00:00
wraitii 01a8138780 Water GLSL shader improvements around reflections and whitespace fixes.
This improves refractions around entities close to the surface, such as
fishes, by handling depth better and by clipping the water plane a
little lower.

This uses the skybox for reflections when refractions are enabled but
reflections are disabled, making it possible to play with reflections
disabled without having super-ugly water (arguably a performance
improvement).

Differential Revision: https://code.wildfiregames.com/D359
This was SVN commit r22297.
2019-05-25 11:08:57 +00:00
wraitii b637fdbae9 Add unit motion integration test map
This uses trigger to create some scientific test cases for unit motion
(the whole unitAI->Motion->Pathfinders stack)

Differential Revision: https://code.wildfiregames.com/D1892
This was SVN commit r22296.
2019-05-25 10:26:03 +00:00
wraitii d15e7df5de Target build version explicitly for Xcode
Xcode otherwise defaults to the latest Mac OS version.

Reviewed By: Wraitii
Differential Revision: https://code.wildfiregames.com/D1482
This was SVN commit r22295.
2019-05-25 08:28:35 +00:00
Imarok 31010f493d Replace , with . in an AI's chat sentence
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D1912
This was SVN commit r22293.
2019-05-21 17:32:14 +00:00
Stan 24b42ef15c Use Alexandermb's shield for the gaul theatron.
This was SVN commit r22292.
2019-05-20 12:51:55 +00:00
Stan 3aace01be7 New Briton Blacksmith.
Make all the props in the blacksmith buildings separate
Add three tools, one hammer, two tongs
Use the new briton shields on the blacksmith
Use the new helmets on the blacksmith
Add new crates, and gives it a bit more geometry.
Update the anvil eyecandy prop

This was SVN commit r22290.
2019-05-19 17:50:29 +00:00
Stan 3cc010d44e New deer icon by @wowgetoffyourcellphone
Reviewed by: @Stan
This was SVN commit r22289.
2019-05-19 09:18:07 +00:00
Stan 904b537483 Fix blood sometimes appearing below the infantry hero Ashoka.
This was SVN commit r22288.
2019-05-19 08:02:29 +00:00
Stan 3477b561a5 New icons for the boar, the camel, the horse, the walrus and the wildebeest by @wowgetoffyourcellphone
Reviewed by: @Stan
This was SVN commit r22287.
2019-05-18 09:29:02 +00:00
Imarok dc34d9c5d0 Fix possibly using uninitialized global in 80635665f7 and rename GetDirectoryName
Reviewed by: weberkai
Fixes: #4789
Differential Revision: https://code.wildfiregames.com/D1852
This was SVN commit r22284.
2019-05-14 10:13:02 +00:00
Imarok 621bb1367a [CChart] Add a percentage format and round displayed integers
Reviewed by: bb
Approved by: Vladislav
Differential Revision: https://code.wildfiregames.com/D1878
This was SVN commit r22282.
2019-05-13 21:23:26 +00:00
wraitii f0f06deaf3 Fix ResetMoveSpeed rename missed in 859d96fba5, introduced by ac47803221.
This was SVN commit r22281.
2019-05-13 19:40:58 +00:00
bb 964934cf4e Make the ai aware ranges no longer have the barracks class
fixes 536d5e3af4

Patch By: Angen
Comments By: Nescio, Stan
Differential Revision: https://code.wildfiregames.com/D1857
This was SVN commit r22280.
2019-05-13 18:53:21 +00:00
wraitii 795e414663 Hierarchical pathfinder: Speed up edge update
Speed up edge update by being clever, only updating dirty tiles instead
of everything (effectively doing to "TODO be clever" here).

This is a substantial speed improvement when an update is necessary.

Differential Revision: https://code.wildfiregames.com/D1834
This was SVN commit r22279.
2019-05-13 17:02:16 +00:00
wraitii 32b2c01c7c Decouple long and hierarchical pathfinders to an extent.
Following 809f297707, this decouples the hierarchical pathfinder and the
long pathfinder. The long pathfinder was the class owning the
hierarchical pathfinder, which didn't particularly make sense and
resulted in some interface awkwardness.

At the moment, the long pathfinder still needs to hierarchical
pathfinder to compute paths (to make sure they are reachable).

Differential Revision: https://code.wildfiregames.com/D1867
This was SVN commit r22278.
2019-05-13 16:58:00 +00:00
wraitii 859d96fba5 UnitMotion - improve variable names and reuse a duplicated function (cleanup def47cb7ae)
This:
 - cleans up a code duplication and clarifies the intent.
 - reorders things around for clarity
 - improves variable names.

Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1840
This was SVN commit r22277.
2019-05-13 16:47:51 +00:00
wraitii ac47803221 Fix move speed not correctly reset when chasing a unit
def47cb7ae had an issue where the move speed was not correctly reset
after chasing a unit.

Reported By: Angen
Reviewed By: Angen
Differential Revision: https://code.wildfiregames.com/D1861
This was SVN commit r22275.
2019-05-11 12:23:22 +00:00
Stan 6935fb665d Replace all shields by the new shields in the gaul barracks.xml
Replace the old spears by new spear models,
Use the eyecandy barrel instead of the one, hence removing useless
underground geometry
Use the eyecandy anvil instead.
Add smoke to the chimney,
Fix the roof UVMapping
Rename to gaul.

This was SVN commit r22274.
2019-05-10 15:01:12 +00:00
Stan 35101bbd23 Add a new open barrel variant with celt swords.
Fix barrel size.

This was SVN commit r22273.
2019-05-10 14:59:22 +00:00
Stan 81fcd891be Update the eyecandy dummy actor using the one in the celt barracks.
Enable normal and spec maps

This was SVN commit r22272.
2019-05-10 14:57:22 +00:00
Stan c0dd79ac3d Add different names to the gaul shield color variants so they don't synchronize when using them as props.
This was SVN commit r22271.
2019-05-10 14:55:00 +00:00
Stan 64bf626d5b Fix last checkrefs.pl warning because the cavalry variant was using an incorrect animation.
This was SVN commit r22270.
2019-05-10 14:54:03 +00:00
Alexandermb 55e77096ec Removed duplicated gather meat unnecesary for cavalry riders.
Added gather meat position for carthaginian cavalry spearman italic,
they were standing above the horse when gathering meat

This was SVN commit r22269.
2019-05-10 14:26:50 +00:00
Alexandermb e8451c235a Remove unused carthaginians/farmstead_horse.xml used in carthaginians/farmstead.xml
Remove round shield for Bouddica and add a British Exclusive shield
Remove unused files by 2115bf2e5d

This was SVN commit r22268.
2019-05-10 14:05:58 +00:00
Stan 20da0b727f moves territory_pull.xml from other/ to special/ and updates the only file in which it is currently used (maps/scenarios/Campaign Test Map.xml), because it is something special and thus doesn't belong in other/ (which contains various gaia structures).
Patch by: @Nescio
Reviewed by: @elexis, @Stan
Differential Revision: https://code.wildfiregames.com/D1798
This was SVN commit r22266.
2019-05-10 06:50:36 +00:00
Alexandermb 444330ade0 More remove of unused files by: 2115bf2e5d
This was SVN commit r22265.
2019-05-09 21:50:30 +00:00
Alexandermb 3a8a661005 Continuation of the cleaning of the art unused or duplicated files from 2115bf2e5d
Remove unused files

This was SVN commit r22264.
2019-05-09 20:19:05 +00:00
Stan d5e90c2be3 *Faction exclusive shield shapes for Britons and Gauls
*Differentiation of Celtic factions (Gauls and Britons)

Thread:
https://wildfiregames.com/forum/index.php?/topic/25422-task-celtic-shields/&page=4
Reviewed by @Stan, @Genava55 and others community members
Patch by: @Alexandermb
This was SVN commit r22263.
2019-05-09 19:40:52 +00:00
Alexandermb 8b7ba6e631 Remove now unused files by 2115bf2e5d
Cleaning of the art assets of the old horse.

This was SVN commit r22262.
2019-05-09 19:21:05 +00:00
Alexandermb 9d9e75f0b3 Fix issue with seleucid cavalry armor.
Reported by: @Hidan
Thread:
https://wildfiregames.com/forum/index.php?/topic/25397-task-horse-update-20-retexture/page/3/&tab=comments#comment-374738

This was SVN commit r22261.
2019-05-09 19:13:54 +00:00
Stan 2115bf2e5d *New Horse models
*New Horse textures
*New Horse fauna (Breed, Marwari, Lusitano, Celtic)
*Cleaner distribution of animations for riders and horse files
*Better usage of variants to reduce amount of lines in Horse Actors
*Chariot for Kushites Done by @Sundiata
*Single armature for chariots

The missing riders will be added in the next commit.



Patch by: @Alexandermb
Reviewed by: @Lordgood, @Stan
This was SVN commit r22260.
2019-05-09 18:16:43 +00:00
Stan 9e44b9867b Fix the kush background stuttering.
Patch by: @Polakrity
Reviewed by: @Stan
Differential Revision: https://code.wildfiregames.com/D1758
This was SVN commit r22259.
2019-05-09 17:46:48 +00:00
Stan ca37b0fb0e Use the new animation for the maur trader.
This was SVN commit r22258.
2019-05-09 17:43:17 +00:00
Stan bdb306813a Some cattle Fauna
New Cattle Textures
New Sanga Variants
New Maur trader chariot

Thread:
https://wildfiregames.com/forum/index.php?/topic/18469-committed-zebu-rigging/
Reviewed by: @Stan, @Lordgood, and others community members
Patch by: @Alexandermb
This was SVN commit r22257.
2019-05-09 17:38:51 +00:00
Stan 126da09a47 removes <Actor> from the generic template_* files
removes <SpecificName> from the generic template_* files
removes <GenericName> from the gaia/ruins/* files
removes <GenericName> from the gaia/treasure/* files
removes <Icon> from the gaia/treasure/* files if it's identical to the
parent template
adds the appropriate actors to their specific children in the cases they
were not yet included there
adds the appropriate specific names to their specific children in the
cases they were not yet included there
use title case for the gaul theatron
<Actor> is still present in the following generic templates:
template_formation.xml
template_unit_catafalque.xml

Reviewed by: @Stan
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D1759
This was SVN commit r22256.
2019-05-09 17:24:20 +00:00
wraitii 2584cbf69a Fix warning introduced in the mirage cleanup, 905763004a
Iterating using a for..in over an array returns the indices as string,
not number, which C++ did not accept.

Differential Revision: https://code.wildfiregames.com/D1864
This was SVN commit r22254.
2019-05-08 19:24:20 +00:00
wraitii 809f297707 Move the Vertex Pathfinder to its own helper class
The vertex pathfinder was implemented directly in CCmpPathfinder,
instead of being a separate helper like the hierarchical pathfinder or
the long pathfinder.

This moves it to its own helper VertexPathfinder, which gets us ready
for D14 and pathfinder threading. Some struct definitions need to be
moved around.

Differential Revision: https://code.wildfiregames.com/D1855
This was SVN commit r22253.
2019-05-08 11:53:02 +00:00
Alexandermb 6970a168d9 Add dirt decals to rome factions temple:
Basic temple and Vesta Temple.

This was SVN commit r22252.
2019-05-07 17:28:36 +00:00
Stan 6efa2b46ce Fix uv shield orientation for pikemen.
Thread:
https://wildfiregames.com/forum/index.php?/topic/17326-your-screenshots/page/17/#comments

This was SVN commit r22250.
2019-05-04 21:01:13 +00:00
wraitii b0f41952b8 Fix UnitMotion calculation of time left to avoid units going back and forth between walking and running animations.
Because of the limited precision of our fixed-point numbers, the
timeLeft calculation could sometimes return results above the actual
time left, resulting in units moving a few fixed::epsilons farther than
they should be, which makes them switch to the running animation. This
was rather unstable however, so there was a constant 'flickering'
between walking and running.
If we divide last instead of first in the operation, the errors get
gobbled up by the division and we no longer have this issue.

Reported by: wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D1856
This was SVN commit r22249.
2019-05-04 15:53:46 +00:00
wraitii 75d0c56070 Don't crash when calling the profiler from a 'non-main' thread
Motive behind the change: calls to Profile() currently crash unless they
are triggered from the main thread, but it's somewhat difficult to know
that from the code. It makes more sense to silently ignore those
particularly so we can easily have the same code be threaded or not.

This also removes a few profiling calls that don't make much sense.

Differential Revision: https://code.wildfiregames.com/D1853
This was SVN commit r22248.
2019-05-04 15:03:10 +00:00
wraitii 905763004a Slight cleanup of fogging OnDestroy and some comments
Following b56f7f39d4 I dwelled in the fogging code. Some confusion could
have been avoided by some comments.
Also early-exit the loop to avoid doing un-necessary js->c++
transitions.

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1737
This was SVN commit r22247.
2019-05-04 13:49:08 +00:00
wackyserious e4a5a8f848 New Texture: Persian Units
Thread:
https://wildfiregames.com/forum/index.php?/topic/23634-task-persian-unit-texture-upgrade/#comments

Reviewed by: LordGood, Wowgetoffyourcellphone and several community
members.

This was SVN commit r22246.
2019-05-04 02:15:27 +00:00
Stan 0e3a3257c2 Add special scaffoldings for the wall towers as well. Based on a model by @LordGood.
This was SVN commit r22245.
2019-05-03 22:28:42 +00:00
Stan b852eeba9c Add missing file in 7165acf9cc. It didn't appear as changed in previous commit
This was SVN commit r22244.
2019-05-03 22:26:07 +00:00
Stan 7165acf9cc Add an AO map to the propylaea building. Enable special maps for all versions of the building. Add EOL Native to the actors.
This was SVN commit r22243.
2019-05-03 22:23:57 +00:00
Stan 55b3086c03 Add a map to be able to test which foundation fits best an actor.
This was SVN commit r22241.
2019-05-01 21:10:28 +00:00
Stan 64eb803ee4 Update templates to use the new foundation sizes.
This was SVN commit r22240.
2019-05-01 21:09:54 +00:00
Stan d52005f990 Unify foundation sizes
1x1 is now a 1x1 grid unit for the game 2x2m unit in blender , that you
can see using THE Wireframe mode or the special texture in atlas.
Resize and adapt existing foundations accordingly
Unify construction dust, it only appears when building (scaffold
variant)
Add 64 foundations from 2x1 to 9x9 and corresponding dirt decals
Add three new scaffolds based on Lordgood's for walls
Rename props to use lowercase names as per art conventions and update
the maps accordingly.
Use 0x instead of a b c and d as per the art convention.
Add missing materials tags, and only use special textures when necessary

Template update will be done in the following commit.

This was SVN commit r22239.
2019-05-01 21:08:53 +00:00
Stan ae7725b698 Add more animations to the atlas drop down list.
This was SVN commit r22238.
2019-05-01 20:57:33 +00:00
Alexandermb f696236cb5 This was SVN commit r22237. 2019-04-29 15:52:03 +00:00
Alexandermb e084b5239b New iberian helmets
Threa:
https://wildfiregames.com/forum/index.php?/topic/24988-task-iberian-units-update/page/4/&tab=comments#comment-372800

Including updated versions of:

* iber_helmet_05
* iber_helmet_06
* iber_helmet_07
* iber_helmet_08
* iber_helmet_09

Updated actors:

*iberians/cavalry_javelinist_a_r.xml
*iberians/cavalry_javelinist_e_r.xml
*iberians/cavalry_javelinist_c_r.xml
*iberians/infantry_spearman_a.xml
*iberians/infantry_swordsman_a.xml
*iberians/infantry_swordsman_c.xml
*iberians/infantry_swordsman_e.xml
*carthaginians/infantry_spearman_e.xml

This was SVN commit r22235.
2019-04-28 15:51:21 +00:00
Imarok 839f281c98 Don't add the period outside a translated string
Previoues version reviewed by: bb
Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D1366
This was SVN commit r22234.
2019-04-28 15:26:41 +00:00
Stan ef098db7c8 Seed unit sounds so that their pitch and their gain are always the same for the same unit.
Fixes #3578
Reviewed by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1584
This was SVN commit r22231.
2019-04-25 22:37:15 +00:00
Imarok 34a6f17aa7 Fix forgotten tab in 06fae58904 line 1337.
Noticed by Polakrity.

This was SVN commit r22230.
2019-04-25 21:06:14 +00:00
Stan 6f31daed81 Fix missing spaces and non compliant code with regards to the coding conventions.
Add a missing semi-colon

For future reference on documenting records using JSDoc see the
differential.

Reviewed by: @elexis
Differential Revision: https://code.wildfiregames.com/D1848
This was SVN commit r22229.
2019-04-25 20:05:53 +00:00
vladislavbelov 9f5494cb87 Fixes a misprint that was introduced in cb83d494e0.
This was SVN commit r22228.
2019-04-25 18:59:41 +00:00
Imarok 06fae58904 Reload wheel-adjusted batchsize immediately
Commented by: elexis
Differential Revision: https://code.wildfiregames.com/D1742
This was SVN commit r22227.
2019-04-25 17:19:47 +00:00
Imarok bc93f51a1c Add an experience status bar
Earlier version reviewed by: bb
Comments by: elexis
Differential Revision: https://code.wildfiregames.com/D1460
This was SVN commit r22226.
2019-04-25 15:58:54 +00:00
wraitii 98f4ed6cb8 Fix D1491 which introduced an ENSURE that should not have been there.
Reported by wowgetoffyourcellphone.

This was SVN commit r22225.
2019-04-25 07:08:19 +00:00
wackyserious fbfefa6063 New Texture: Celtic Druid
Discussion:
https://wildfiregames.com/forum/index.php?/topic/23002-task-celtic-unit-textures/page/9/
Thread:
https://wildfiregames.com/forum/index.php?/topic/25402-task-celtic-druid-re-texture/

Reviewed by: Stanislas69, Genava55 and Sundiata
This was SVN commit r22223.
2019-04-25 04:55:11 +00:00
wackyserious b0bab436de Retexture: Illyrian helmet (Bronze and Gold variants)
- Reduced probability for gold and other variant.

Reviewed by Stanislas69

This was SVN commit r22222.
2019-04-25 03:38:44 +00:00
wackyserious d7e10a9617 New Texture: Elite Greek Hoplite (Bronze cuirass, Scale and Lamellar)
Thread:
https://wildfiregames.com/forum/index.php?/topic/22184-task-hellenic-unit-textures/page/7/#comments

Reviewed by several community and team members.

This was SVN commit r22221.
2019-04-25 02:02:02 +00:00
bb c6c439a81f Correct the grammer of 0ed704e791
Differential Revision: https://code.wildfiregames.com/D1841
This was SVN commit r22220.
2019-04-24 19:15:57 +00:00
wraitii fa726867f1 Const-Correct the long range pathfinder
Debug variables are kept mutable as one otherwise has to use a complex
system and this is really not worth it.

Reviewed By: vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1491
This was SVN commit r22219.
2019-04-24 19:07:32 +00:00
wraitii d3de36527d Hierarchical pathfinder: fix an issue with regions and some touch-ups
FindPassableRegions intends to return all passable regions in a chunk,
but did not as it used the number of regions in that chunk. In fact,
regions can have individual IDs higher than the number of regions (as
shown by the test), therefore FindPassableRegions might miss some.
This only affected the JPS pathfinder, when starting on an impassable
cell, which called FindNearestPassableNavcell with then possibly
returned a sub-optimal navcell. This is a limited impact but upcoming
patches will rely on that function more.

Fixed using a vector to store IDs, which also makes for-range loops
usable.

Differential Revision: https://code.wildfiregames.com/D1832
This was SVN commit r22218.
2019-04-24 19:02:09 +00:00
Itms 71125baf74 Fix tests on Visual Studio 2013, which doesn't deduce types when using std::map initializer lists.
Includes some style normalization.

Refs 60cfd2d16c.

Patch By: Stan
Reviewed By: vladislavbelov, Itms
Differential Revision: https://code.wildfiregames.com/D1845
This was SVN commit r22216.
2019-04-23 20:54:32 +00:00
vladislavbelov 3a031128f7 Refactor and cleanup of CGameView.
Commented By: asterix, elexis, Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D1571
This was SVN commit r22214.
2019-04-22 22:12:08 +00:00
vladislavbelov 285db48813 Simple cleanup of Shapes, removes old style format.
Reviewed By: wraitii
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1809
This was SVN commit r22213.
2019-04-22 21:53:11 +00:00
Stan eae5f11c5e Fix TLS Segfault on various mac versions
Accepted by: @wraitii
Tested by: Tobbi, Servo, HMS-Surprise
Thread:
https://wildfiregames.com/forum/index.php?/topic/25120-macos-osx-rc-bundles/page/2/&tab=comments#comment-368603

Fixes #5386

Differential Revision: https://code.wildfiregames.com/D1772
This was SVN commit r22212.
2019-04-22 21:49:55 +00:00
Stan fd719833ab Replace includes uniform_foo with uniform_foo_distribution as it's deprecated in newer versions of boost. It was added in the 1.47 version.
Reviewed by: @Angen, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1823
This was SVN commit r22211.
2019-04-22 21:45:23 +00:00
wraitii bc3fd69bf0 Const-correct the hierarchical pathfinder.
Use at() over find() as it makes the code neater and the performance
impact is negligible.
This forces an algorithm change in FindReachableRegions as the key
accessed is not guaranteed to exist.

Differential Revision: https://code.wildfiregames.com/D1830
This was SVN commit r22210.
2019-04-22 16:07:25 +00:00
wraitii a0ec66fc4a Fix portrait icons of mechanical units broken by d3a73f0611. Reported by Polakrity.
This was SVN commit r22209.
2019-04-22 15:53:34 +00:00
wraitii ccfae46042 Accidentally committed an upstream version of the hierarchical pathfinder tests in 60cfd2d16c.
This fixes that.

This was SVN commit r22208.
2019-04-22 14:31:19 +00:00
wraitii 60cfd2d16c Actually add the test file for ab5f63e087.
This was SVN commit r22207.
2019-04-22 12:44:28 +00:00
wraitii 4c7f14b7f3 Add a few assertions to pathfinder tests, fix the disabled tests.
Differential Revision: https://code.wildfiregames.com/D1831
This was SVN commit r22206.
2019-04-22 12:13:54 +00:00
wraitii ab5f63e087 Add tests for the hierarchical pathfinder.
These variously test some simple MakeGoalReachable and
FindNearestNavcell calls, as well as checking edges and regions when
updating the map.

Differential Revision: https://code.wildfiregames.com/D1833
This was SVN commit r22205.
2019-04-22 12:07:30 +00:00
wraitii d3a73f0611 Rename generic ballista template to boltshooter and onager to stonethrower to avoid ambiguity. Remove template_unit_mechanical.xml and remove '_mechanical' from ship and siege template paths.
The template tree included 'template_unit_mechanical.xml', which had two
children, '*_ship.xml' and '*_siege.xml'.
This template did little and implied a relevant common ancestor to ship
and siege units. As organic units do not descend from a generic
'Organic', this was not necessary.

This commit removes this template and the '_mechanical' bit from
children templates to simplify.

Additionally, this renames:
 - template_unit_mechanical_siege_ballista.xml to
template_unit_siege_boltshooter.xml
 - template_unit_mechanical_siege_onager.xml to
template_unit_siege_stonethrower.xml
This helps avoid ambiguity, as our Roman ballista for example throws
stones (even if it is a torsion engine), and 'ballista' refers to a bolt
shooter in Age of Empires 1 (and in AoE 2 for the Elephant Ballista,
confusingly not named a scorpion like other bolt shooters in that game).

Patch By: Nescio
Reviewers: Wraitii

Subscribers: Itms, O14 Maps, wraitii, elexis, Vulcan, Stan

Differential Revision: https://code.wildfiregames.com/D1760
This was SVN commit r22204.
2019-04-21 17:04:15 +00:00
bb 0ed704e791 Communicate field diminishing returns to the player in the fields tooltip
refs: #4669
Patch By: happyconcepts
Comments By: Nescio
Differential Revision: https://code.wildfiregames.com/D1803
This was SVN commit r22203.
2019-04-21 16:26:39 +00:00
bb a7c2f40ac5 Bring the palisade templates under their own parent (instead of the stone wall).
While at it:
- Remove the stone cost/loot from palisades
- Change the gate tooltip to not mention stone walls
- Standartize palisade armour (don't reuse the walls' armour)
- Demand village phase instead of town phase for all palisades
- Remove stone wall classes from palisades

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1796
This was SVN commit r22202.
2019-04-21 14:55:36 +00:00
wraitii f9b529f2fb Remove workaround in GetGUIObjectByName
f0d9806b3f added a problem: Engine.GetGuiObjectByName is unaware of the
caller GUI page.
So GUI pages in the background that still run the onTick and other event
code tried to look on the topmost GUI page, rather than their own GUI
page.
9674c3c0fe added a workaround that has to be copied to any place that
can call JS code.
If developers don't know about the reason for this workaround and add a
new place that can call JS code (#5369), they won't be able to implement
anything.

This removes this workaround by passing the pointer to the correct GUI
page as callback data.

Patch By: elexis
Reviewed By: wraitii
Refs #5369

Trac Tickets: #5369

Differential Revision: https://code.wildfiregames.com/D1701
This was SVN commit r22200.
2019-04-20 15:49:42 +00:00
wraitii 6225377c4d Cleanup deprecated SM-specific syntax in ExtractFormations in Commands.js
This piece of code used Array comprehensions, since deprecated, and
removed in Firefox 58. See
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Array_comprehensions

Patch By: smiley
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1724
This was SVN commit r22199.
2019-04-20 15:34:40 +00:00
wraitii def47cb7ae Change Run Speed into a Run multiplier.
This changes running speed into a running multiplier (of walk speed).

The advantage is that it simplifies code since you can setup a default
run multiplier at the template level and it'll work for all subsequent
templates, and technologies cannot forget to change it. It makes
specialised unit templates easier to maintain, too.

Formations have a 100 run multiplier which effectively sets their
maximal walking speed at 100

Reviewed By: bb, O2 JS Simulation
Differential Revision: https://code.wildfiregames.com/D438
This was SVN commit r22197.
2019-04-19 10:04:50 +00:00
wraitii 46fc204033 Correctly handle receiving 0 damage as not receiving any damage.
Do not flag a unit as injured when it receives 0 damage.
Do not flag dead units as injured.
Do not mark units as injured when they are full health and killed at one
shot.

Cleanup Reduce, introducing a separate function to handle deaths.

Patch By: Angen
Reviewed By: wraitii
Commented By: Stan
Differential Revision: https://code.wildfiregames.com/D1769
This was SVN commit r22196.
2019-04-19 09:13:31 +00:00
LordGood e678f4c151 cattails fix
This was SVN commit r22194.
2019-04-18 22:18:51 +00:00
Stan 3700e039af Remove useless files that contained placeholder objects (boxes)
This was SVN commit r22193.
2019-04-18 16:01:04 +00:00
Stan b127cba874 Add missing parenthesis in the Petra diplomacyManager. Else the requested tribute amount would always be wrong.
Reviewed by: @bb
Differential Revision: https://code.wildfiregames.com/D1826
This was SVN commit r22192.
2019-04-16 16:39:17 +00:00
bb 2c8efc9751 align the footprint an obstruction size with the model size for the kush range
This was SVN commit r22191.
2019-04-15 21:46:44 +00:00
bb 536d5e3af4 unparent the range from the barracks, and reduce the duplication in the civs' range templates
while at it, make the classes consistent and remove the cav from the
range

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1791
This was SVN commit r22190.
2019-04-15 21:39:21 +00:00
bb a2e522edcb Move tooltips on gamesetup dropdowns from xml to js, since by current gamestup design that is the way all tooltips are added.
While add it add some periods


Patch By: Polakrity
Differential Revision: https://code.wildfiregames.com/D594
This was SVN commit r22188.
2019-04-14 20:29:08 +00:00
bb 53bb9fa367 Handle orderone hotkey also for the minimap
refs D308, 62f07098ea
Patch By: luiko
Comments By: Angen, Stan
Differential Revision: https://code.wildfiregames.com/D1822
This was SVN commit r22187.
2019-04-14 19:29:02 +00:00
wackyserious 9621009360 New Texture: Iberian Units Retexture
Thread:
https://wildfiregames.com/forum/index.php?/topic/24988-task-iberian-units-update/

Reviewed by Genava55 and other community members

This was SVN commit r22186.
2019-04-14 04:28:18 +00:00
wraitii 89a8c9ca87 Fix broken test introduced by b1659e7618
This was SVN commit r22185.
2019-04-13 12:49:33 +00:00
wraitii b1659e7618 Move more things in the projectile part of the Attack/Ranged component
Following D945, I reckon more things should be moved from Attack/Ranged
to Attack/Ranged/Projectile.

In the long run, I think most things should be moved to the Projectile,
which would let us have several projectiles per attack (for example),
make it easier to abstract away from the Melee/Ranged attack types, and
would also be more coherent. This is the first step, as it adds the
Projectile to all templates.

This also makes the launch point a parameter, though I only add "y" as
implementing the rotation is left as an exercise to the reader.

Reviewed By: bb
Differential Revision: https://code.wildfiregames.com/D1171
This was SVN commit r22184.
2019-04-13 09:27:14 +00:00
Itms 4a5fb3ba94 Fix issue in 672d587bc0, detected by the checkrefs.pl script.
Patch By: Nescio
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1824
This was SVN commit r22183.
2019-04-13 09:20:29 +00:00
bb 672d587bc0 Add ConquestCritical to structures that want it, instead of removing it from those that don't want it.
While add it remove conquestCritical from benches/fences/tables/columns
etc.

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1626
This was SVN commit r22182.
2019-04-12 15:05:11 +00:00
bb c66962a2aa Reduce duplication in template_structure_military*
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1793
This was SVN commit r22181.
2019-04-12 14:12:16 +00:00
Stan 02a429bc7f Fix 4edcf21b98. Refs #5428
Differential Revision: https://code.wildfiregames.com/D1821
This was SVN commit r22178.
2019-04-10 06:05:34 +00:00
wackyserious f472199acb New Texture: Basic Celtic Infantry (Topless with pants) + Linothorax for Spartan Skiritai
Thread:
​https://wildfiregames.com/forum/index.php?/topic/23002-task-celtic-unit-textures/

Reviewed by Stanislas69 and other community members

This was SVN commit r22177.
2019-04-10 03:54:55 +00:00
wackyserious 1ea60ff35a New Texture: Greek Psiloi (Elite) and Athenian Epilektoi
Thread:
​https://wildfiregames.com/forum/index.php?/topic/22184-task-hellenic-unit-textures/

Reviewed by Stanislas69 and Wowgetoffyourcellphone

This was SVN commit r22176.
2019-04-10 02:35:15 +00:00
Stan 4edcf21b98 Remove useless class, test class and use boost instead of it in test_RangeManager.h. Use boost::random::uniform_real_distribution<double> instead of deprecated boost::uniform_real<> in that class as well.
Refs #5428
Reviewed by: @Angen, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1584
This was SVN commit r22175.
2019-04-09 21:50:10 +00:00
Itms c12b95d6f6 Corrections in game loading quotes.
Use English names for authors and titles, use American English rather
than British.

Patch By: Nescio
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1818
This was SVN commit r22174.
2019-04-09 19:54:32 +00:00
LordGood 96261e3023 fixed anchor points on quarry entities
This was SVN commit r22172.
2019-04-07 21:33:28 +00:00
LordGood 9cfbce2879 Quarry stone
This was SVN commit r22171.
2019-04-07 21:00:50 +00:00
vladislavbelov 3a7335d723 Removes unused iterator in Xeromyces. Its usage was removed in a07add11c6.
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1814
This was SVN commit r22170.
2019-04-07 18:23:04 +00:00
bb 0b1593e268 recieve -> receive
Reported by Stan in 13288df4f4

This was SVN commit r22169.
2019-04-07 16:06:10 +00:00
LordGood 493f6061cb Dead palms and some more stone cliff variation
This was SVN commit r22168.
2019-04-07 12:31:18 +00:00
bb 94716b9987 Remove an unused variable
The variable was introduced in 492e49da38 without being used, neither
did it become used in a later commit. To me it seems that it is a
left-over from a copy paste, as the ".left" functions do use the
variable.
Notice 74c420f658 did cleanup around these lines, but did not remove
this variable

Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1813
This was SVN commit r22166.
2019-04-06 22:04:13 +00:00
bb 13288df4f4 Update the wonder victory timer in case the wonder renames.
Reviewed By: smiley
Comment By: elexis
Differential Revision: https://code.wildfiregames.com/D1732
This was SVN commit r22165.
2019-04-06 21:58:20 +00:00
Imarok 359df88f1a [CSlider] On click move the slider-button to the mouse position
Reviewed By: vladislavbelov
Refs: #2593
Differential Revision: https://code.wildfiregames.com/D1622
This was SVN commit r22164.
2019-04-06 18:47:22 +00:00
bb 99e03b9311 Remove unneeded death sounds from structure templates, as they inherit from template_structure
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1795
This was SVN commit r22163.
2019-04-06 14:35:39 +00:00
Stan 2288943f91 Fixes
C4458 in AtlasObjectImpl.cpp line 292 and in AtlasUI/Object.cpp:547
C4456 in MapDialog.cpp:173 and in ScenarioEditor.cpp:742

Reviewed by: @Angen
Accepted by: @Itms
Comments by: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1741
This was SVN commit r22161.
2019-04-05 12:37:37 +00:00
Stan cac81d1e84 Fix berry bushes smoothing groups,
Reported by: @Angen, @vladislavbelov
This was SVN commit r22160.
2019-04-05 12:11:09 +00:00
Itms 734ea4fd6b Improve the error window on Windows by adding a link to https://trac.wildfiregames.com/wiki/GameDataPaths.
Patch By: Angen
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1799
This was SVN commit r22157.
2019-04-04 20:30:52 +00:00
Stan 9d2adaf514 Add missing berry bush mesh from 114015f4e9
Noticed by: @vladislavbelov
This was SVN commit r22156.
2019-04-03 06:02:11 +00:00
vladislavbelov 7182de3b20 Removes unused variable. It was introduced in f0615df318, an interface to control
the variable was removed in 12e2428495. A usage was removed in
9376609ee8.
And since then the usage is useless because we use infinity sky model.

This was SVN commit r22154.
2019-04-02 18:49:12 +00:00
LordGood b3e80c3870 I'm a huge fan of Mediterranean fan palms, which are themselves not very huge, mind you
This was SVN commit r22153.
2019-04-01 15:15:02 +00:00
Stan 114015f4e9 New berry bushes by BigTiger
Reviewed by: @Stan
Comments by: @borg
Thread:
https://wildfiregames.com/forum/index.php?/topic/25431-task-trees/

This was SVN commit r22151.
2019-04-01 07:19:01 +00:00
LordGood 390f573bef Giant reeds, rocks, fruiting date palms, few more date palm variations
This was SVN commit r22150.
2019-04-01 04:34:20 +00:00
Gallaecio 0a1cccc9b9 Improve team bonus descriptions consistency
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1720
This was SVN commit r22149.
2019-03-31 22:14:01 +00:00
Gallaecio 08966f8cde centre → center
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1802
This was SVN commit r22148.
2019-03-31 22:12:21 +00:00
Gallaecio 47c82fad4e can be bought → could be bought
As suggested by Nescio, I’ve actually copied the string from line 66,
which contains
the very same string.

Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1801
This was SVN commit r22147.
2019-03-31 11:34:00 +00:00
LordGood e6193c3f40 Updated date palms
This was SVN commit r22146.
2019-03-29 22:59:36 +00:00
vladislavbelov cb83d494e0 Refactor CBoundingSphere and add tests
Reviewed By: wraitii
Comments By: smiley, Stan
Differential Revision: https://code.wildfiregames.com/D1576
This was SVN commit r22143.
2019-03-25 21:17:43 +00:00
LordGood 8ee8faf54b Palmyra Palms
This was SVN commit r22142.
2019-03-25 04:58:43 +00:00
LordGood fd9e6ebfa7 Doum and Nipa palms, Normal maps and specmaps for the new trees
This was SVN commit r22141.
2019-03-25 00:11:43 +00:00
Gallaecio f202f22a29 Reword the tooltip of the Disable Treasures option
Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1532
This was SVN commit r22140.
2019-03-24 11:33:50 +00:00
LordGood 29196c3e21 Mangroves
This was SVN commit r22139.
2019-03-23 21:14:26 +00:00
Imarok c158785f13 Remove and Update some outdated tips and refactor tip displaying
Reviewed by: s0600204, Nescio, Imarok
Patch by: Angen
Refs: #4428
Differential Revision: https://code.wildfiregames.com/D1377
This was SVN commit r22137.
2019-03-20 22:27:54 +00:00
LordGood 3178973899 Baobab age variants, Bamboos and banyans
This was SVN commit r22136.
2019-03-20 13:38:31 +00:00
s0600204 9c5062147a Add a GetTextSize() method to GUI objects
Usage:
  let size = Engine.GetGUIObjectByName({gui_object_name}).GetTextSize()

Returns a JS object containing the height and width of the primary text
field within
the object, taking into account new lines, text wrapping, and font
changes.

Unless the object doesn't contain text, in which case the method will
return undefined.

Commented on by: vladislavbelov
Additional code by: elexis
Reviewed By: wraitii
Differential Revision: https://code.wildfiregames.com/D844
This was SVN commit r22134.
2019-03-18 22:15:40 +00:00
s0600204 a65f981545 Rename kush teambonus file to be consistent with the filenames of the other teambonuses
Change proposed in D1603 by Angen,
Committed seperately by request.

This was SVN commit r22133.
2019-03-18 20:32:49 +00:00
bb f8a0ea7023 seige to siege
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1797
This was SVN commit r22132.
2019-03-18 14:55:58 +00:00
LordGood cfc4e3ca20 Normal edit modified previous trees, small UV edits on the baobabs
This was SVN commit r22130.
2019-03-18 04:18:06 +00:00
bb 7aab37e01a Add "At Least" to the front of the disabledTooltips
Patch By: Angen
Differential Revision: https://code.wildfiregames.com/D1792
This was SVN commit r22129.
2019-03-17 20:02:01 +00:00
Gallaecio 1b656dfb41 rally-point → rally point
Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1527
This was SVN commit r22128.
2019-03-17 17:02:23 +00:00
Gallaecio 9d28b1945d Remove quotes made unnecessary by capitalization
Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1537
This was SVN commit r22127.
2019-03-17 16:56:19 +00:00
Stan 14a8ec3b20 Mirror (flips horizontally) five technology icons to ensure that all melee icons have the same orientation (bottom-left to top-right) and ranged a different one (bottom-right to top-left).
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D1779
This was SVN commit r22126.
2019-03-17 16:53:17 +00:00
Itms 993ddcfe3e Rotate entities during placement in Atlas with the keyboard only when the window has focus. Reported by Andrettin.
Patch By: Angen
Reviewed By: Itms, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1509
This was SVN commit r22125.
2019-03-17 16:04:06 +00:00
LordGood d4816df801 Mature and dead Baobab trees
This was SVN commit r22124.
2019-03-17 15:50:53 +00:00
Gallaecio 815b197b16 playername → player name
Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1537
This was SVN commit r22123.
2019-03-17 14:15:36 +00:00
Gallaecio 04047e4901 Rephrase the description of the wonder victory condition
Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1550
This was SVN commit r22122.
2019-03-17 14:13:12 +00:00
Gallaecio 91ff208e1d Do not generate duplicate biome strings for translation
Patch By: Gallaecio
Differential Revision: https://code.wildfiregames.com/D1579
This was SVN commit r22121.
2019-03-17 14:07:56 +00:00
bb 2af6fa6d20 Change structure_defense to structure_defensive so it is consistent with the other structure types. Nuking the weird defense_defense_tower name while at it
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1788
This was SVN commit r22120.
2019-03-17 13:05:27 +00:00
bb edc1b14ba4 Remove a misleading unit_fauna_decorative from the bird template
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1787
This was SVN commit r22118.
2019-03-16 21:18:01 +00:00
Itms 7e2b318a1e Add particle support to the Actor Editor, fixes #1590.
Patch By: shh
Differential Revision: https://code.wildfiregames.com/D1783
This was SVN commit r22117.
2019-03-16 21:16:04 +00:00
bb d7e88622d8 Nuke the misleading Structure_Defence from the wallset template name
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1733
This was SVN commit r22116.
2019-03-16 21:03:11 +00:00
bb 0287402eaa Move the fish template under template_gaia since fish is a resource like trees and mines.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1774
This was SVN commit r22115.
2019-03-16 20:56:53 +00:00
bb da3212c1ed Also align the chat, refs 9af3040b34
This was SVN commit r22114.
2019-03-16 16:07:39 +00:00
bb 9a73b7485d Fix a broken early return from a1ddf6114a
Reported By: Imarok
This was SVN commit r22113.
2019-03-16 14:39:51 +00:00
bb 702127b8df Add autostart conquest default description to readme.txt and add endless support for autostart in both readme.txt and GameSetup.cpp
Reported By: elexis
Fixes: 6d54ab4c1f, 22903b09a6

This was SVN commit r22112.
2019-03-16 14:20:28 +00:00
bb 9af3040b34 Align the settingspanel with its background, fixing te misalignment itroduced inrP20945 and made visible in 60092048e1.
fixes: 60092048e1

Based on Patch by: nani
Differential Revision: https://code.wildfiregames.com/D1755
This was SVN commit r22111.
2019-03-16 14:12:43 +00:00
Stan 5f78b3a0a1 Add the gaul assembly to the Sandbox - Gauls map
This was SVN commit r22109.
2019-03-11 22:54:47 +00:00
Stan 62a76eb136 Fix gaul assembly's template. The civ was incorrect and it was missing a specific name and a generic name.
Reported by: @Nescio
This was SVN commit r22108.
2019-03-11 22:40:35 +00:00
LordGood 8e2d11a69d Black Pines, Cattails, Atlas Cedars, and Saplings
This was SVN commit r22107.
2019-03-11 13:36:05 +00:00
Stan a36ff2e64e Add Gaul theatron (Unused for now)
Reviewed by: @Lordgood @Sundiata @Genava55
Authored by: @Stan
Forum thread:
https://wildfiregames.com/forum/index.php?/topic/25299-committed-gaul-theatron/

This was SVN commit r22105.
2019-03-10 00:03:51 +00:00
Stan 9dc6c46ab6 Clean ResourceSupply up.
Add documentation
Reviewed by: @Imarok
Authored by: @Stan
Differential Revision: https://code.wildfiregames.com/D1771
This was SVN commit r22103.
2019-03-06 16:44:24 +00:00
Imarok f9da484077 Linting: allow constant condition in loops
Reviewed by: Itms
Differential Revision: https://code.wildfiregames.com/D1364
This was SVN commit r22101.
2019-03-03 10:48:18 +00:00
LordGood 2dfa48fe1b Footpaths and papyrus files+actors
This was SVN commit r22098.
2019-02-25 07:23:06 +00:00
Alexandermb 899b67e664 Reduce Ships Update specular map texture size as conversed with Stan.
Move rome_civic_center ao from structural folder to AO folder.
Committ Mistletoe headdres for celtic faction's Healer "Druid"

Thread:
https://wildfiregames.com/forum/index.php?/topic/25402-task-celtic-druid-re-texture/&tab=comments#comment-369730

This was SVN commit r22097.
2019-02-25 06:03:07 +00:00
Stan 0cc034fa6f Improve and fix checkrefs.pl, add a readme for usage, add mod support, add command line arguments.
Reviewed by: @Itms
Comments by: @elexis
Differential Revision: https://code.wildfiregames.com/D1381
This was SVN commit r22096.
2019-02-24 21:19:20 +00:00
Alexandermb 9f2b761478 Ships update
Authored by Stan

This was SVN commit r22095.
2019-02-23 21:43:22 +00:00
Stan 5a5e498672 Fix a missed file in the previous commit.
This was SVN commit r22092.
2019-02-17 20:48:16 +00:00
Alexandermb 35264cba30 Fix double slash on phrygian mask's
Add helmets to ptol celtic infantry_swordsman_e.xml

This was SVN commit r22091.
2019-02-17 18:05:37 +00:00
Alexandermb 50852f6e46 Assign helmets to celtc infantry.
This was SVN commit r22090.
2019-02-17 16:34:25 +00:00
Stan 3be6a3a5b5 Fix a typo revealed by checkrefs.pl
See D1381

This was SVN commit r22089.
2019-02-17 16:01:20 +00:00
Imarok 6fb7479109 Acoustic notification when people join a hosted game
Patch by Polakrity.
Sound by Samulis.
Reviewed by: Imarok
Fixes: #4101
Differential Revision: https://code.wildfiregames.com/D932
This was SVN commit r22088.
2019-02-15 18:55:38 +00:00
Stan 3480608625 Fix two comments by @elexis on 700baef3b4
This was SVN commit r22084.
2019-02-07 15:51:03 +00:00
Stan ccd88ec5c8 Group civ bonuses into a single folder
Patch by: @Nescio
Reviewed by: @wraitii, @elexis, @Stan
Differential Revision: https://code.wildfiregames.com/D1472
This was SVN commit r22083.
2019-02-07 15:37:21 +00:00
Alexandermb 25d37cc632 Rome helmets (Also reverting a deleted song in rome civ template):
Reviewed by Stan

This was SVN commit r22082.
2019-02-06 19:22:29 +00:00
Alexandermb 06e01ef944 Rome Testudo & Anti-Cavalry formations animations:
Reviewed by Stan

This was SVN commit r22081.
2019-02-06 14:57:43 +00:00
Alexandermb 6ba5307655 Fix a typo in last commit
This was SVN commit r22080.
2019-02-05 19:18:40 +00:00
Alexandermb c60b20a17a Remove old naming schema of Celtic helmets.
This was SVN commit r22079.
2019-02-05 19:09:04 +00:00
Alexandermb cdf7d0fc8c Celtic helmets/celt_alesia_base_01.xml
Thread:
https://wildfiregames.com/forum/index.php?/topic/24465-committed-celtic-unit-helmets/&page=5

Fix to inconsistencies in celtic helmets pointed by user Genava55

This was SVN commit r22078.
2019-02-05 19:05:19 +00:00
Stan 700baef3b4 Health.js cleanup. Fixes Vulkan complaints
- Var → let
- Simplify some lines
- add break to

Reviewed by: @elexis
Differential Revision: https://code.wildfiregames.com/D1770
This was SVN commit r22075.
2019-01-31 13:34:13 +00:00
Imarok 111f850927 Don't let the duplicateplayernames setting break lobbied games (0fd8aa2a77)
Looked at by: elexis
Differential Revision: https://code.wildfiregames.com/D1748
This was SVN commit r22072.
2019-01-28 12:09:42 +00:00
Stan 040b367bc4 Fix wallsets throwing annoying errors when loaded in Atlas.
Refs: b05879e151, 490182ddd0, #786

This was SVN commit r22070.
2019-01-26 11:10:27 +00:00
Stan 5453adf7dd Improved pig animations and textures.
Thread:
https://wildfiregames.com/forum/index.php?/topic/21005-committed-pig/

This was SVN commit r22067.
2019-01-24 22:35:36 +00:00
vladislavbelov ac1a56e0cc Fix cell text wrapping inside COList.
Patch By: gentz
Tested By: vladislavbelov
Commented By: elexis
Differential Revision: https://code.wildfiregames.com/D1717
This was SVN commit r22066.
2019-01-24 20:00:31 +00:00
Stan 86cfe554b4 Celtic structures' specific names update
Thread:
https://wildfiregames.com/forum/index.php?/topic/25268-specific-name-review-structures/&page=2&tab=comments#comment-367917
Patch by: @Nescio
Reviewed by: @Stan, @Genava55
Differential Revision: https://code.wildfiregames.com/D1757
This was SVN commit r22065.
2019-01-23 22:46:57 +00:00
Stan 9229ed6c42 Fix a little bug with the boar, remove the old files.
This was SVN commit r22064.
2019-01-21 22:05:04 +00:00
Alexandermb 74be5f03c8 Hele Phrygian Helmet commit
Updated sele_hero_seleucus_nikator helmet texture.

Thread:
https://wildfiregames.com/forum/index.php?/topic/25179-task-phrygian-helmet/

Reviewed by Stan

This was SVN commit r22062.
2019-01-19 20:39:24 +00:00
Stan 0d00866c8f Merge entity templates, removing two templates with non descriptive names.
Patch by: @Nescio
Discussed with: @elexis

Differential Revision: https://code.wildfiregames.com/D1734
This was SVN commit r22061.
2019-01-19 12:47:39 +00:00
Stan 14810ca5bf manual/intro.txt corrections
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D1744
This was SVN commit r22060.
2019-01-19 12:43:43 +00:00
wraitii 8bab09d37c Fix UnitAI infinite loop following a16e7c0a56
As reported by Angen and Gurken Khan on the forums, there is a crash
following a16e7c0a56 caused by an infinite loop in UnitAI. The reason is
that IDLE.enter can order us to attack, which can fail, switching us
right away back to idle.

FinishOrder's behaviour allows us to have IDLE as a default state and
lets us not lose a turn when becoming idle, so to keep this behaviour
explicitely check that we are not already in IDLE before switching
states.

Reported by: Angen, Gurken Khan
Commented by: elexis, Itms
Differential Revision: https://code.wildfiregames.com/D1743
This was SVN commit r22059.
2019-01-19 07:44:40 +00:00
Alexandermb 3e66aa093b Resize celtic/hellenic helmet textures from 512 to 256.
Tweaks to some celtic helmets actors.
Invert battersea shield Mesh for proper AO as mentioned by Wow

Approved by Stan

This was SVN commit r22058.
2019-01-18 18:41:35 +00:00
Imarok 79a41098c3 Update AI difficulty level description.
Reviewed by: Stan, Imarok
Differential Revision: https://code.wildfiregames.com/D1749
This was SVN commit r22056.
2019-01-17 23:02:11 +00:00
Stan 2b3c829e74 Update Kushite stable, range, workshop, and elephant stable's specific names.
Patch by: @Nescio
Names by: @Sundiata
Differential Revision: https://code.wildfiregames.com/D1750
This was SVN commit r22055.
2019-01-15 20:35:49 +00:00
Itms db5d4bb5f1 SpiderMonkey-related changes in preparation for the upgrade to SpiderMonkey 45, refs #4893.
- Remove JSVAL_ZERO and JSVAL_NULL
https://bugzilla.mozilla.org/show_bug.cgi?id=1177825
- Remove *_TO_JSVAL https://bugzilla.mozilla.org/show_bug.cgi?id=1177892
- Drop support for parent object in the deserializer
https://bugzilla.mozilla.org/show_bug.cgi?id=1136345,
https://bugzilla.mozilla.org/show_bug.cgi?id=805052
- Correctly use boolean values in JS::RuntimeOptionsRef
- Use JS_FN instead of JS_FS: in future versions, JS_FS is not public
because it isn't supposed to be used in JSAPI code
- Allow to select flags for global objects, and correctly mark progress
bars in the loading screen as not readonly+permanent
- Remove empty JSI_props in IGUIObject

Reviewed By: wraitii, elexis
Differential Revision: https://code.wildfiregames.com/D1716
This was SVN commit r22052.
2019-01-13 16:37:41 +00:00
vladislavbelov 651cf8b364 Split CColor from Shapes.
Reviewed By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1515
This was SVN commit r22051.
2019-01-13 15:38:41 +00:00
vladislavbelov 43a291a071 Simple refactoring of Singleton. Make it non-copyable.
Reviewed By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1564
This was SVN commit r22050.
2019-01-13 15:11:40 +00:00
Stan 43758bcb92 Fix warnings in vs2015 when building tests.
Reviewed by: @Angen, @Itms
Differential Revision: https://code.wildfiregames.com/D1678
This was SVN commit r22048.
2019-01-12 16:23:47 +00:00
s0600204 c7485492c5 Use setStringTags in credits.js
As pointed out by elexis in D1695:
> "font=" strings are superseded by setStringTags()

So while we're doing work in that file, let's fix that.

This was SVN commit r22046.
2019-01-10 16:49:36 +00:00
s0600204 3e1361e5a5 Show translations of the labels of the tab-buttons in the credits gui page.
Mistake introduced in bcf2c75513, made apparent in 19a218cd48, and not
caught in 4223fad060.

Reported by: thekolian1996 (forums)
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1695
This was SVN commit r22045.
2019-01-10 16:20:29 +00:00
Stan fef1b4122c New historically accurate library icon. Move the old one to old public.
Forum Thread:
https://wildfiregames.com/forum/index.php?/topic/25203-library-icon-wrong/
Portrait made by: Me, @sundiata, @vladislavbelov, Anaxandridas ho
Skandiates

This was SVN commit r22043.
2019-01-08 00:06:00 +00:00
Stan 74a26820f2 Add a confirmation message when packaging ends.
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1585
This was SVN commit r22042.
2019-01-07 23:57:18 +00:00
vladislavbelov 9376609ee8 Remove hardcoded SkyBox sizes and use the infinity sky. No we render
the skybox at the current camera location, so that the skybox appears
indefinitely far away. Refs #3458.

Reviewed By: wraitii
Tested By: elexis, Stan
Differential Revision: https://code.wildfiregames.com/D1683
This was SVN commit r22039.
2019-01-06 21:55:30 +00:00
vladislavbelov 14a7147540 Removes active values from UserReport, they are not hardware statistics.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1621
This was SVN commit r22038.
2019-01-06 21:18:55 +00:00
vladislavbelov d5668cfb99 Add an error message for crashes without required UV sets.
Reviewed By: Stan, wraitii
Differential Revision: https://code.wildfiregames.com/D433
This was SVN commit r22037.
2019-01-06 21:04:01 +00:00
wraitii c1027f478c Test we can destroy INVALID_ENTITY
This is part of the spec and wasn't unit-tested for.

Differential Revision: https://code.wildfiregames.com/D1735
This was SVN commit r22036.
2019-01-06 16:32:50 +00:00
vladislavbelov 2d56e62e11 Refactor build information getters and remove the useless code.
Reviewed By: elexis, Stan
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1348
This was SVN commit r22035.
2019-01-06 14:32:54 +00:00
vladislavbelov 276050bcad Cleanup Camera code for projections.
Reviewd By: wraitii
Tested By: Stan
Differential Revision: https://code.wildfiregames.com/D1514
This was SVN commit r22033.
2019-01-05 22:40:56 +00:00
wraitii 24812b06d7 Revert b56f7f39d4 as it triggers an assertion failure.
This was SVN commit r22032.
2019-01-05 22:38:00 +00:00
Stan a1c3629874 Templates for domestic horse and camel
Add two templates for mapmakers that don't want horses and camels
roaming around. Will be useful for scenarios.
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D1524
This was SVN commit r22031.
2019-01-05 21:53:15 +00:00
bb 7b50eac868 Fix missing assignment from a1ddf6114a
Patch By: OptimusShepard
Reported By: OptimusShepard
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1656
This was SVN commit r22030.
2019-01-05 20:46:42 +00:00
wraitii b56f7f39d4 Change internals of EntityMap to use an std::vector
This generally makes this code cleaner and easier to maintain, while
also being more modern and fully tested.

Looked at by: leper
Differential Revision: https://code.wildfiregames.com/D8
This was SVN commit r22029.
2019-01-05 18:19:59 +00:00
FeXoR f21d79640c Remove excess argument from shift call
Fixes #5345

Author: FeXoR
Reviewed by: elexis, smiley
Differential Revision: https://code.wildfiregames.com/D1675
This was SVN commit r22028.
2019-01-05 16:54:37 +00:00
wraitii af39d45973 Add tests for the Entitymap helper.
In preparation for D8.

Differential Revision: https://code.wildfiregames.com/D1722
This was SVN commit r22027.
2019-01-05 16:37:09 +00:00
Stan 241bdba34a Remove unnecessary gaia from other/ structures
Patch by: @Nescio
Differential Revision: https://code.wildfiregames.com/D1728
This was SVN commit r22026.
2019-01-05 15:38:25 +00:00
Stan bd189de430 Move the old fox texture to the old public mod in the animal and do the same for the boar
This was SVN commit r22025.
2019-01-05 14:38:27 +00:00
Stan 155ffb24bb Move the old boar texture to the old public folder.
This was SVN commit r22024.
2019-01-05 14:34:33 +00:00
wraitii a16e7c0a56 Always leave/reenter the top-most FSM state when SetNextState is called with the current FSM state.
When SetNextState is called with the current state, it will leave and
re-enter so that any relevant cleanup will get called and things work as
expected.
It will prevent possibly awkward code issues in UnitAI, which already
called SetNextStateAlwaysEntering in a number of places to work around
them.

This should most likely have been the default behaviour in the first
place.

Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D1488
This was SVN commit r22023.
2019-01-05 09:01:51 +00:00
Itms 2c167153e9 Upgrade premake5 from alpha12 to alpha13, refs #3729.
Fixes an issue on macOS Mojave that was patched in fa1c281e79.

The list of changes can be found under
build/premake/premake5/CHANGES.txt.

This was SVN commit r22021.
2019-01-04 21:20:45 +00:00
bb 060eb35bb8 Improve fishing net description
Patch By: Gallaecio
Proposed By: Itms
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1549
This was SVN commit r22020.
2019-01-04 20:51:41 +00:00
bb b3487dfb60 Handle entity renames in regicide
This allows heroes to be upgraded

Patch By: smiley
Comments By: elexis
Differential Revision: https://code.wildfiregames.com/D1694
This was SVN commit r22019.
2019-01-04 20:09:28 +00:00
Stan 6ef0c2b4b3 Properly reset rally points on ownership changes.
Fixes #5352
Reviewed by: @wraitii
Comments by: @Angen, @elexis
Differential Revision: https://code.wildfiregames.com/D1681
This was SVN commit r22016.
2019-01-03 19:32:45 +00:00
Imarok 7cc45c40a5 Clarify the purpose of the Replay button in the summary
Reviewed by: ffffffff, elexis
Differential Revision: https://code.wildfiregames.com/D1485
This was SVN commit r22015.
2019-01-03 13:22:27 +00:00
Stan 24f0cc7695 Fix inconsistencies between specific name and generic name
Patch by: Nescio
Differential Revision: https://code.wildfiregames.com/D1523
This was SVN commit r22014.
2019-01-03 11:03:28 +00:00
Imarok da62d0b149 [NetServer] Split OnInGame function
Reviewed by: elexis
Differential Revision: https://code.wildfiregames.com/D1516
This was SVN commit r22012.
2019-01-03 00:15:31 +00:00
Itms 38da2f88bc Rename the Viking longboat into longship, and fix the form of the specific name of the Roman bireme.
Based on patch by: Phormio
Differential Revision: https://code.wildfiregames.com/D507
This was SVN commit r22011.
2019-01-02 23:34:51 +00:00
vladislavbelov b2669131b5 Add Coala Bear for the license header check.
Reviewed By: Itms
Differential Revision: https://code.wildfiregames.com/D404
This was SVN commit r22010.
2019-01-02 23:12:51 +00:00
Stan 8b05f551f8 SoundGroup cleanup.
Reviewed by: @vladislavbelov @wraitii
Differential Revision: https://code.wildfiregames.com/D1270
This was SVN commit r22009.
2019-01-02 22:31:46 +00:00
Stan aa40c57d85 Fix mesh leftovers. There were a few logs under the ground.
Add a projectile prop, and a garrisoned prop if someone wants to use it
for garrisoning.
Set the EOL to Native

Reported by: @vladislavbelov
This was SVN commit r22008.
2019-01-02 21:06:06 +00:00
wraitii 38c096896b Disable back-face culling when rendering the Sides of the map, preventing a graphical artifact at the edge of water maps.
By rendering sides even when they are back-facing, the water shader is
on top of a mesh instead of emptiness and this solves an old
"edge-of-map" graphical issue.

Taken out from D359 with vlad's agreement. See screenshots there for
more information on the exact issue.

This was SVN commit r22007.
2019-01-02 15:32:19 +00:00
wraitii 9903fd8a6c Clean up and speed up the water manager distance computations
The water manager computations for "fancy water effects" have always
been quite slow. I've updated one of the functions to be much faster,
and the other doesn't need to be called (apparently, since I removed
coastal foam, which tbh I don't remember doing).

This should all be redone entirely to be honest, as it's generally
terrible, but in the short-term™ this makes this function almost usable
in real-time.

Differential Revision: https://code.wildfiregames.com/D78
This was SVN commit r22006.
2019-01-02 15:23:02 +00:00
Itms 807468482a Correct Mauryans into Mauryas.
The name of the faction is the dynasty name "Maurya". The plural should
be "Maurya" as well, but "Mauryas" is commonly accepted and less likely
to confuse people. On the other hand, "Mauryan" is the adjective, and
cannot get a plural mark in English.
All instances of "Mauryans" were removed, including in file names and
paths.

Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1342
This was SVN commit r22005.
2019-01-02 14:56:31 +00:00
vladislavbelov 24a523504a Clean up and fix height of water vertex shader.
Reviewed By: wraitii
Tested By: Stan, aeonios
Differential Revision: https://code.wildfiregames.com/D1402
This was SVN commit r22004.
2019-01-02 14:53:42 +00:00
wraitii 19f600cfa2 Add "mul_round" op to template parsing to support multiplying-then-rounding.
This allows using arbitrary 'mul' values with Integer types, instead of
having to switch them to Decimal types.
The ParamNode is not aware of validation (thus types) so a better
solution is incredibly non-trivial.

Differential Revision: https://code.wildfiregames.com/D268
This was SVN commit r22003.
2019-01-02 14:46:17 +00:00
Stan d91702a16b Fix missing refs in sound files.
Reported by: A script and Fork AD
Path by: Fork AD
Differential Revision: https://code.wildfiregames.com/D1725
This was SVN commit r22001.
2019-01-01 20:26:40 +00:00
Stan 85cc5776f3 Remove a useless file introduced in 9a4fcd55a8
Reexport it using the 0AD Skeleton Generator:
https://github.com/StanleySweet/0AD-Skeleton-Generator
Reported by: Angen
This was SVN commit r22000.
2019-01-01 18:49:15 +00:00
Stan 8835a11ec7 Add a donkey fauna template, to be able to place it in Atlas
- Use the rotary mill icon (copy it)
- Fix the walking speed.
- Add a material.

This was SVN commit r21999.
2019-01-01 16:09:39 +00:00
wraitii 9536f0a5cc Do not actually Kill in debug_break() in non-debug binaries
Revelead by the A23 crash when hosting a game in the lobby. We have a
debug_break() call that calls "kill" with SIGTRAP, which generally
doesn't get handled correctly in release versions, particularly on OSX.

Differential Revision: https://code.wildfiregames.com/D1499
This was SVN commit r21998.
2019-01-01 16:06:20 +00:00
wackyserious 429dfac82f New Texture: Ptolemaic Royal Agema and Royal Companion
Thread:
https://wildfiregames.com/forum/index.php?/topic/22184-task-hellenic-unit-textures/&do=findComment&comment=350382

Reviewed by Stanislas69, Wowgetoffyourcellhpone and Prodigal Son

This was SVN commit r21997.
2019-01-01 00:31:45 +00:00
wackyserious 7ec4978eb5 Actor file cleanup: celt/cavalry_sworsman_e_r.xml
Reported and reviewed by Stanislas69

This was SVN commit r21996.
2018-12-31 16:54:18 +00:00
wackyserious 6d88146d87 New Texture: Celtic Elite Units
Thread:
https://wildfiregames.com/forum/index.php?/topic/23002-task-celtic-unit-textures/&do=findComment&comment=366615

Reviewed by Lordgood and Genava55

This was SVN commit r21995.
2018-12-31 14:18:07 +00:00
wackyserious b275380bec New Texture: Hellenistic Military Settlers
Thread:
https://wildfiregames.com/forum/index.php?/topic/22184-task-hellenic-unit-textures/&do=findComment&comment=344057

Reviewed by Stanislas69 and the forum community.

This was SVN commit r21993.
2018-12-31 01:40:43 +00:00
Stan a180a47e9e manual/intro.txt corrections
Patch by: @Nescio
Differential Revision: ​https://code.wildfiregames.com/D1719
This was SVN commit r21992.
2018-12-30 16:00:13 +00:00
wackyserious 892154db2f Celtic Unit Texture Update
Thread:
https://wildfiregames.com/forum/index.php?/topic/23002-task-celtic-unit-textures/

Reviewed by Stanislas69 and other community members

-Rework on the previous textures from Delenda Est
-New female textures
-New cape textures

This was SVN commit r21991.
2018-12-30 07:58:58 +00:00
Stan 41267c9f96 Improve the description of the Teacher aura
Patch by: @Gallaecio
Reported by: GunChleoc
Accepteby by: @bb
Differential Revision: https://code.wildfiregames.com/D1580
This was SVN commit r21990.
2018-12-29 21:24:34 +00:00
Stan d56ef7b4b3 Reword the description of the Temple at Naqa aura
Patch by: @Gallaecio
Reported by: Zephyros256 and GunChleoc
Accepted by: bb
Differential Revision: https://code.wildfiregames.com/D1533
This was SVN commit r21989.
2018-12-29 18:28:50 +00:00
Stan 7e67fcf9de BackSlash → Backslash
Patch by: @Gallaecio
Reported by: pilino1234  on Transifex.
Differential Revision: https://code.wildfiregames.com/D1529
This was SVN commit r21988.
2018-12-29 18:26:41 +00:00
Stan dcbec6a895 Fix a typo cit-states → city-states
Patch by: @Gallaecio
Reported by: xtother90 on Transifex.
Differential Revision: https://code.wildfiregames.com/D1536
This was SVN commit r21987.
2018-12-29 18:20:34 +00:00
Stan 9442c927fc Fix imperative of choose
Differential Revision: https://code.wildfiregames.com/D1528
This was SVN commit r21986.
2018-12-29 18:15:09 +00:00
Stan 25e71d9235 Split a sentence
Patch by: @Gallaecio
Reported by: kingu on Transifex.
Differential Revision: ​​​​​​https://code.wildfiregames.com/D1539
This was SVN commit r21985.
2018-12-29 17:56:45 +00:00
Alexandermb 8ea29bd710 Corinthian Helmet Update:
Thread:
https://wildfiregames.com/forum/index.php?/topic/24129-task-hellenic-helmet-part-i/&page=3

Reviewed by Stanislas69

This was SVN commit r21984.
2018-12-29 17:17:02 +00:00
Stan e9520f8fce barracks → Barracks
Patch by: @Gallaecio
Reported by: kingu on Transifex.
Differential Revision: ​​​​​https://code.wildfiregames.com/D1536
This was SVN commit r21983.
2018-12-29 16:43:56 +00:00
Stan 7df4a60719 constructed → ready (a field)
Patch by: @Gallaecio
Reported by: kingu on Transifex.
Differential Revision: ​​​​​https://code.wildfiregames.com/D1534
This was SVN commit r21982.
2018-12-29 16:21:20 +00:00
Stan dba5a59f81 reaffect → reassign
Patch by: @Gallaecio
Reported by: GunChleoc on Transifex
Differential Revision: ​​​​​https://code.wildfiregames.com/D1526
This was SVN commit r21981.
2018-12-29 16:10:06 +00:00
Stan 88b4d0da66 multi-coloured → multi-colored
Reported by: pilino1234 on Transifex
Patch by: @Gallaecio
Differential Revision: ​​​​​https://code.wildfiregames.com/D1553
This was SVN commit r21980.
2018-12-29 15:34:52 +00:00
Stan 43be7823b8 north-west africa → Northwest Africa
Patch by: @Gallaecio
Reported by: Shamann at Transifex.
Differential Revision: https://code.wildfiregames.com/D1612
This was SVN commit r21979.
2018-12-29 15:19:11 +00:00
Stan 8ef095bfc9 aide → aid
It was reported by GunChleoc on Transifex.
Patch by @Gallaecio
Accepted by: bb, Stan
Differential Revision: ​​​​​https://code.wildfiregames.com/D1531
This was SVN commit r21978.
2018-12-29 14:47:12 +00:00
Stan 6e7624c1df Temple for Athena → Temple of Athena Nike
Reported by kingu on Transifex.
Patch by Gallaecio
Differential Revision: ​​​​https://code.wildfiregames.com/D1541
This was SVN commit r21977.
2018-12-29 14:01:58 +00:00
Stan b175c068e1 Selecus → Seleucus
Patch by Gallaecio

Differential Revision: ​​​https://code.wildfiregames.com/D1645
This was SVN commit r21976.
2018-12-29 13:52:22 +00:00
Stan 5887e6a79e Remove gaia from the civ for a few templates to simplify them
Patch by: Nescio
Differential Revision: ​​https://code.wildfiregames.com/D1645
This was SVN commit r21975.
2018-12-29 12:09:53 +00:00
Stan 580fca73e1 Rename the Maur flag banner Template
Patch by: Nescio
Differential Revision: ​https://code.wildfiregames.com/D1712
This was SVN commit r21974.
2018-12-29 11:14:17 +00:00
Stan c7821f274a Rephrase the bonus.
Patch by Nescio
Differential Revision: https://code.wildfiregames.com/D1715
This was SVN commit r21973.
2018-12-29 11:03:17 +00:00
Stan 57cb903090 Fix another typo noticed by Nescio on D1551
This was SVN commit r21972.
2018-12-29 10:49:13 +00:00
Stan dead55527a Fix a typo slaugther → slaughter
Reported by: Shamann on Transifex
Patch by: Gallaecio
Committing on his behalf because he will be away for some time.
Differential Revision: https://code.wildfiregames.com/D1551
This was SVN commit r21971.
2018-12-29 10:45:27 +00:00
Alexandermb 2fcccb6669 Celtic helmet's Update (Including New Battersea Shield)
Thread:
https://wildfiregames.com/forum/index.php?/topic/24465-task-celtic-unit-helmets/

Reviewed by: Stanislas69
This was SVN commit r21970.
2018-12-28 23:06:52 +00:00
Alexandermb 97a3f41238 Fox Update:
Thread: https://wildfiregames.com/forum/index.php?/topic/19226-task-fox/

Reviewed by: Stanislas69
Including:
New Animations
New Model
New Textures

This was SVN commit r21968.
2018-12-28 22:43:02 +00:00
Itms 577671f92e Complete 5561327d3f by removing an obsolete reference.
Reviewed By: elexis
Differential Revision: https://code.wildfiregames.com/D1714
This was SVN commit r21967.
2018-12-28 19:16:11 +00:00
Stan 0b386cb69c Fix an incorrect credit due to a misunderstanding.
This was SVN commit r21966.
2018-12-28 17:49:47 +00:00
Stan c54581e0fb New Persian Farsi voices by dMZeroCold & dMAthena.
Post SFX Treatment by Samulis.

Add all three to the credits.

Thread:
https://wildfiregames.com/forum/index.php?/topic/24821-persian-farsi-sound/&page=3&tab=comments#comment-366367

This was SVN commit r21965.
2018-12-28 16:52:45 +00:00
vladislavbelov 962815c898 Fix build without PCH for some targets.
Patch By: Angen
Reviewed By: vladislavbelov
Tested By: Stan, vladislavbelov
Differential Revision: https://code.wildfiregames.com/D1361
This was SVN commit r21964.
2018-12-28 14:58:35 +00:00
Itms 28dff528ec Rename the file of the Kushite emblem for consistency with the other emblems, taken from D1342.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1710
This was SVN commit r21963.
2018-12-28 13:37:45 +00:00
Itms a8ef07ae47 Update the War Elephants loading screen tip, which missed some factions, taken from D1342.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1709
This was SVN commit r21962.
2018-12-28 13:17:52 +00:00
Itms 0c9d5d8a2a Fix orthography of "Seleucus" and a typo, taken from D1342.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1708
This was SVN commit r21961.
2018-12-28 13:15:13 +00:00
Itms 5561327d3f Fix some untranslated strings, fixes #5155.
Patch By: Stan
Differential Revision: https://code.wildfiregames.com/D1560
This was SVN commit r21960.
2018-12-28 13:07:22 +00:00
bb 60092048e1 Only update the gamesetup settings panel position when it actually changes.
refs ac7b5ce861

Differential Revision: https://code.wildfiregames.com/D1693
Patch By: nani
Comments By: Angen, smiley
This was SVN commit r21957.
2018-12-26 22:35:25 +00:00
Stan 4534360e5b New Boudicca icon by dmAthena.
Forum
thread:https://wildfiregames.com/forum/index.php?/topic/21299-portraits-for-heroes/&page=7

This was SVN commit r21956.
2018-12-26 20:40:40 +00:00
Itms 46ddffdd3f Drop premake4 support, refs #3729. premake4 has been unused for a long time now, and was only left available as a safety net.
Differential Revision: https://code.wildfiregames.com/D1275
This was SVN commit r21955.
2018-12-26 16:00:53 +00:00
Stan b87b7d4ed4 Fix the deer feeling like it runs in slow motion, it is now like the gazelle.
This was SVN commit r21954.
2018-12-26 15:50:02 +00:00
Stan 62266ca54c New Kushite Background by Pedro Blanco
This was SVN commit r21953.
2018-12-26 13:31:54 +00:00
vladislavbelov 1e9c0f8378 Cleanup and simple refactor the SkyManager.
Differential Revision: https://code.wildfiregames.com/D1672
Reviewed By: Imarok
This was SVN commit r21952.
2018-12-26 13:13:52 +00:00
elexis 6fe427664b Bump version to alpha 24.
Last alpha 23 commit was 0044c5c2e8.

Differential Revision: https://code.wildfiregames.com/D1705
Reviewed By: Itms
Comments By: Stan, smiley, bb
This was SVN commit r21951.
2018-12-26 11:28:37 +00:00
Stan f46b290bec New Amanirenas' portrait by Victor Rossi
Thread:
https://wildfiregames.com/forum/index.php?/topic/21299-portraits-for-heroes/&page=8&tab=comments#comment-365831

This was SVN commit r21950.
2018-12-26 10:04:47 +00:00
Stan 025229ce92 Reduce existing rome barracks footprint and use a more recognizable layout. Move the old file to the art source.
This was SVN commit r21949.
2018-12-26 09:53:24 +00:00
Stan b09d2ab6b9 Improved deer textures by Wijitmaker and I.
This was SVN commit r21948.
2018-12-26 09:20:38 +00:00
Stan 0044c5c2e8 Improve existing boar texture to make it less cartoony.
Add blendfile for the boar so that it can be reexported more easily in
the future.
Reduce the boar's max range so it attacks its enemies closer.
Add a feeding animation variant.

This was SVN commit r21947.
2018-12-26 09:04:28 +00:00
17772 changed files with 310409 additions and 261292 deletions
+1
View File
@@ -1,6 +1,7 @@
{
"exclude": [
"(^binaries/system/)",
"(^build/premake/premake5/)",
"(^source/third_party/)",
"(^libraries/)"
],
+5 -4
View File
@@ -1,10 +1,11 @@
[Source]
bears = CPPCheckBear
bears = CPPCheckBear, LicenseYearBear
language = c++
files = source/**.(cpp|h)
ignore = source/third_party/**
ignore = source/third_party
[JS]
bears = ESLintBear, JSHintBear
eslint_config = build/jenkins/lint-config/eslintrc.json
jshint_config = build/jenkins/lint-config/jshintrc.json
eslint_config = build/coala/lint-config/eslintrc.json
jshint_config = build/coala/lint-config/jshintrc.json
files = binaries/data/**.js
+6 -4
View File
@@ -26,6 +26,12 @@ in particular, let us know and we can try to clarify it.
/binaries/data/mods/*/maps/
see LICENSE.txt within those directories
/binaries/data/mods/public/shaders/glsl/fxaa.fs
BSD
/binaries/data/mods/public/shaders/glsl/cas.fs
MIT
/binaries/system
Various (unspecified)
@@ -36,7 +42,6 @@ in particular, let us know and we can try to clarify it.
/build
Various (unspecified)
/build/premake/premake4
/build/premake/premake5
BSD
@@ -58,9 +63,6 @@ in particular, let us know and we can try to clarify it.
/source/scriptinterface/third_party
MPL 2.0
/source/third_party/cppformat
BSD
/source/third_party/encryption
GPL version 2 (or later)
ISC (pkcs5_pbkdf2.cpp)
+26
View File
@@ -45,3 +45,29 @@ Reporting problems
Bugs should be reported on Trac. For information on reporting problems
and finding logs, see http://trac.wildfiregames.com/wiki/ReportingErrors
------------------
Contributing Code
------------------
If you want to help out programming for the game, have a look at
https://trac.wildfiregames.com/wiki/GettingStartedProgrammers
or contact us on #0ad-dev on irc.quakenet.org
--------------------
Contributing Artwork
--------------------
If you want to make artwork for the game, have a look at
https://trac.wildfiregames.com/#Forartists:
or visit the forums http://www.wildfiregames.com/forum
-----------
Translating
-----------
You can help translating the game at https://www.transifex.com/projects/p/0ad
for more information, see https://trac.wildfiregames.com/wiki/Localization
+111 -74
View File
@@ -53,6 +53,17 @@ bpp = 0
; Preferred display (for multidisplay setups, only works with SDL 2.0)
display = 0
; Allows to force GL version for SDL
forceglversion = false
forceglprofile = "compatibility" ; Possible values: compatibility, core, es
forceglmajorversion = 3
forceglminorversion = 3
; Big screenshot tiles
screenshot.tiles = 4
screenshot.tilewidth = 480
screenshot.tileheight = 270
; Emulate right-click with Ctrl+Click on Mac mice
macmouse = false
@@ -66,30 +77,25 @@ waterfancyeffects = false
waterrealdepth = true
waterrefraction = true
waterreflection = true
shadowsonwater = false
shadows = true
shadowquality = 0 ; Shadow map resolution. (-2 - Very Low, -1 - Low, 0 - Medium, 1 - High, 2 - Very High)
; High values can crash the game when using a graphics card with low memory!
shadowpcf = true
shadowsfixed = false ; When enabled shadows are rendered only on the
shadowsfixeddistance = 300.0 ; fixed distance and without swimming effect.
vsync = false
particles = true
fog = true
silhouettes = true
showsky = true
nos3tc = false
noautomipmap = true
novbo = false
noframebufferobject = false
; Disable hardware cursors
nohwcursor = false
; Linux only: Set the driconf force_s3tc_enable option at startup,
; for compressed texture support
force_s3tc_enable = true
; Specify the render path. This can be one of:
; default Automatically select one of the below, depending on system capabilities
; fixed Only use OpenGL fixed function pipeline
@@ -111,6 +117,13 @@ smoothlos = false
; Use screen-space postprocessing filters (HDR, bloom, DOF, etc). Incompatible with fixed renderpath.
postproc = false
; Use anti-aliasing techniques.
antialiasing = "disabled"
; Use sharpening techniques.
sharpening = "disabled"
sharpness = 0.3
; Quality level of shader effects (set to 10 to display all effects)
materialmgr.quality = 2.0
@@ -130,7 +143,12 @@ skycolor = "0 0 0"
[adaptivefps]
session = 60 ; Throttle FPS in running games (prevents 100% CPU workload).
menu = 30 ; Throttle FPS in menus only.
menu = 60 ; Throttle FPS in menus only.
[profiler2]
server = "127.0.0.1"
server.port = "8000" ; Use a free port on your machine.
server.threads = "6" ; Enough for the browser's parallel connection limit
[hotkey]
; Each one of the specified keys will trigger the action on the left
@@ -138,18 +156,16 @@ menu = 30 ; Throttle FPS in menus only.
; See keys.txt for the list of key names.
; > SYSTEM SETTINGS
exit = "Ctrl+Break", "Super+Q" ; Exit to desktop
exit = "Ctrl+Break", "Super+Q", "Alt+F4" ; Exit to desktop
cancel = Escape ; Close or cancel the current dialog box/popup
leave = Escape ; End current game or Exit
confirm = Return ; Confirm the current command
pause = Pause ; Pause/unpause game
pause = Pause, "Shift+Space" ; Pause/unpause game
screenshot = F2 ; Take PNG screenshot
bigscreenshot = "Shift+F2" ; Take large BMP screenshot
togglefullscreen = "Alt+Return" ; Toggle fullscreen/windowed mode
screenshot.watermark = "Alt+K" ; Toggle product/company watermark for official screenshots
wireframe = "Alt+Shift+W" ; Toggle wireframe mode
silhouettes = "Alt+Shift+S" ; Toggle unit silhouettes
showsky = "Alt+Z" ; Toggle sky
; > DIALOG HOTKEYS
summary = "Ctrl+Tab" ; Toggle in-game summary
@@ -168,15 +184,8 @@ console.toggle = BackQuote, F9 ; Open/close console
; > OVERLAY KEYS
fps.toggle = "Alt+F" ; Toggle frame counter
realtime.toggle = "Alt+T" ; Toggle current display of computer time
session.devcommands.toggle = "Alt+D" ; Toggle developer commands panel
timeelapsedcounter.toggle = "F12" ; Toggle time elapsed counter
session.showstatusbars = Tab ; Toggle display of status bars
session.highlightguarding = PgDn ; Toggle highlight of guarding units
session.highlightguarded = PgUp ; Toggle highlight of guarded units
session.toggleattackrange = "Alt+C" ; Toggle display of attack range overlays of selected defensive structures
session.toggleaurasrange = "Alt+V" ; Toggle display of aura range overlays of selected units and structures
session.togglehealrange = "Alt+B" ; Toggle display of heal range overlays of selected units
session.diplomacycolors = "Alt+X" ; Toggle diplomacy colors
ceasefirecounter.toggle = "" ; Toggle ceasefire counter
; > HOTKEYS ONLY
chat = Return ; Toggle chat window
@@ -190,8 +199,8 @@ quickload = "Shift+F8"
[hotkey.camera]
reset = "R" ; Reset camera rotation to default.
follow = "F" ; Follow the first unit in the selection
rallypointfocus = unused ; Focus the camera on the rally point of the selected building
zoom.in = Plus, Equals, NumPlus ; Zoom camera in (continuous control)
rallypointfocus = "" ; Focus the camera on the rally point of the selected building
zoom.in = Plus, NumPlus ; Zoom camera in (continuous control)
zoom.out = Minus, NumMinus ; Zoom camera out (continuous control)
zoom.wheel.in = WheelUp ; Zoom camera in (stepped control)
zoom.wheel.out = WheelDown ; Zoom camera out (stepped control)
@@ -243,60 +252,63 @@ save = "Shift+F11" ; Save current profiler data to logs/profile.txt
toggle = "Ctrl+F11" ; Enable/disable HTTP/GPU modes for new profiler
[hotkey.selection]
add = Shift ; Add units to selection
militaryonly = Alt ; Add only military units to the selection
nonmilitaryonly = "Alt+Y" ; Add only non-military units to the selection
idleonly = "I" ; Select only idle units
woundedonly = "O" ; Select only wounded units
remove = Ctrl ; Remove units from selection
cancel = Esc ; Un-select all units and cancel building placement
idleworker = Period ; Select next idle worker
idlewarrior = ForwardSlash ; Select next idle warrior
idleunit = BackSlash ; Select next idle unit
offscreen = Alt ; Include offscreen units in selection
cancel = Esc ; Un-select all units and cancel building placement
add = Shift ; Add units to selection
militaryonly = Alt ; Add only military units to the selection
nonmilitaryonly = "Alt+Y" ; Add only non-military units to the selection
idleonly = "I" ; Select only idle units
woundedonly = "O" ; Select only wounded units
remove = Ctrl ; Remove units from selection
idleworker = Period, NumDecimal ; Select next idle worker
idlewarrior = Slash, NumDivide ; Select next idle warrior
idleunit = BackSlash ; Select next idle unit
offscreen = Alt ; Include offscreen units in selection
[hotkey.selection.group.add]
0 = "Shift+0"
1 = "Shift+1"
2 = "Shift+2"
3 = "Shift+3"
4 = "Shift+4"
5 = "Shift+5"
6 = "Shift+6"
7 = "Shift+7"
8 = "Shift+8"
9 = "Shift+9"
0 = "Shift+0", "Shift+Num0"
1 = "Shift+1", "Shift+Num1"
2 = "Shift+2", "Shift+Num2"
3 = "Shift+3", "Shift+Num3"
4 = "Shift+4", "Shift+Num4"
5 = "Shift+5", "Shift+Num5"
6 = "Shift+6", "Shift+Num6"
7 = "Shift+7", "Shift+Num7"
8 = "Shift+8", "Shift+Num8"
9 = "Shift+9", "Shift+Num9"
[hotkey.selection.group.save]
0 = "Ctrl+0"
1 = "Ctrl+1"
2 = "Ctrl+2"
3 = "Ctrl+3"
4 = "Ctrl+4"
5 = "Ctrl+5"
6 = "Ctrl+6"
7 = "Ctrl+7"
8 = "Ctrl+8"
9 = "Ctrl+9"
0 = "Ctrl+0", "Ctrl+Num0"
1 = "Ctrl+1", "Ctrl+Num1"
2 = "Ctrl+2", "Ctrl+Num2"
3 = "Ctrl+3", "Ctrl+Num3"
4 = "Ctrl+4", "Ctrl+Num4"
5 = "Ctrl+5", "Ctrl+Num5"
6 = "Ctrl+6", "Ctrl+Num6"
7 = "Ctrl+7", "Ctrl+Num7"
8 = "Ctrl+8", "Ctrl+Num8"
9 = "Ctrl+9", "Ctrl+Num9"
[hotkey.selection.group.select]
0 = 0
1 = 1
2 = 2
3 = 3
4 = 4
5 = 5
6 = 6
7 = 7
8 = 8
9 = 9
0 = 0, Num0
1 = 1, Num1
2 = 2, Num2
3 = 3, Num3
4 = 4, Num4
5 = 5, Num5
6 = 6, Num6
7 = 7, Num7
8 = 8, Num8
9 = 9, Num9
[hotkey.gamesetup]
mapbrowser.open = "M"
[hotkey.session]
kill = Delete ; Destroy selected units
kill = Delete, Backspace ; Destroy selected units
stop = "H" ; Stop the current action
backtowork = "Y" ; The unit will go back to work
unload = "U" ; Unload garrisoned units when a building/mechanical unit is selected
move = unused ; Modifier to move to a point instead of another action (e.g. gather)
move = "" ; Modifier to move to a point instead of another action (e.g. gather)
attack = Ctrl ; Modifier to attack instead of another action (e.g. capture)
attackmove = Ctrl ; Modifier to attackmove when clicking on a point
attackmoveUnit = "Ctrl+Q" ; Modifier to attackmove targeting only units when clicking on a point (should contain the attackmove keys)
attackmoveUnit = "Ctrl+Q" ; Modifier to attackmove targeting only units when clicking on a point
garrison = Ctrl ; Modifier to garrison when clicking on building
autorallypoint = Ctrl ; Modifier to set the rally point on the building itself
guard = "G" ; Modifier to escort/guard when clicking on unit/building
@@ -313,15 +325,28 @@ unloadtype = Shift ; Modifier to unload all units of type
deselectgroup = Ctrl ; Modifier to deselect units when clicking group icon, instead of selecting
rotate.cw = RightBracket ; Rotate building placement preview clockwise
rotate.ccw = LeftBracket ; Rotate building placement preview anticlockwise
snaptoedges = Ctrl ; Modifier to align new structures with nearby existing structure
toggledefaultformation = "" ; Switch between null default formation and the last default formation used (defaults to "box")
; Overlays
showstatusbars = Tab ; Toggle display of status bars
devcommands.toggle = "Alt+D" ; Toggle developer commands panel
highlightguarding = PageDown ; Toggle highlight of guarding units
highlightguarded = PageUp ; Toggle highlight of guarded units
diplomacycolors = "Alt+X" ; Toggle diplomacy colors
toggleattackrange = "Alt+C" ; Toggle display of attack range overlays of selected defensive structures
toggleaurasrange = "Alt+V" ; Toggle display of aura range overlays of selected units and structures
togglehealrange = "Alt+B" ; Toggle display of heal range overlays of selected units
[hotkey.session.gui]
toggle = "Alt+G" ; Toggle visibility of session GUI
menu.toggle = "F10" ; Toggle in-game menu
diplomacy.toggle = "Ctrl+H" ; Toggle in-game diplomacy page
barter.toggle = "Ctrl+B" ; Toggle in-game barter/trade page
objectives.toggle = "Ctrl+O" ; Toggle in-game objectives page
tutorial.toggle = "Ctrl+P" ; Toggle in-game tutorial panel
[hotkey.session.savedgames]
delete = Delete ; Delete the selected saved game asking confirmation
delete = Delete, Backspace ; Delete the selected saved game asking confirmation
noconfirmation = Shift ; Do not ask confirmation when deleting a game
[hotkey.session.queueunit] ; > UNIT TRAINING
@@ -336,7 +361,7 @@ noconfirmation = Shift ; Do not ask confirmation when deleting a game
[hotkey.session.timewarp]
fastforward = Space ; If timewarp mode enabled, speed up the game
rewind = Backspace ; If timewarp mode enabled, go back to earlier point in the game
rewind = "Shift+Backspace" ; If timewarp mode enabled, go back to earlier point in the game
[hotkey.tab]
next = "Tab", "Alt+S" ; Show the next tab
@@ -359,6 +384,9 @@ aidifficulty = 3 ; Difficulty level, from 0 (easiest) to 5 (har
aibehavior = "random" ; Default behavior of the AI (random, balanced, aggressive or defensive)
settingsslide = true ; Enable/Disable settings panel slide
[gui.loadingscreen]
progressdescription = false ; Whether to display the progress percent or a textual description
[gui.session]
camerajump.threshold = 40 ; How close do we have to be to the actual location in order to jump back to the previous one?
timeelapsedcounter = false ; Show the game duration in the top right corner
@@ -370,7 +398,13 @@ attackrange = true ; Display attack range overlays of selected de
aurasrange = true ; Display aura range overlays of selected units and structures
healrange = true ; Display heal range overlays of selected units
rankabovestatusbar = true ; Show rank icons above status bars
experiencestatusbar = true ; Show an experience status bar above each selected unit
respoptooltipsort = 0 ; Sorting players in the resources and population tooltip by value (0 - no sort, -1 - ascending, 1 - descending)
snaptoedges = "disabled" ; Possible values: disabled, enabled.
snaptoedgesdistancethreshold = 15 ; On which distance we don't snap to edges
disjointcontrolgroups = "true" ; Whether control groups are disjoint sets or entities can be in multiple control groups at the same time.
defaultformation = "special/formations/box" ; For walking orders, automatically put units into this formation if they don't have one already.
formationwalkonly = "true" ; Formations are disabled when giving gather/attack/... orders.
[gui.session.minimap]
blinkduration = 1.7 ; The blink duration while pinging
@@ -411,7 +445,7 @@ extended = true ; Whether to display the chat history
[lobby]
history = 0 ; Number of past messages to display on join
room = "arena23b" ; Default MUC room to join
room = "arena24" ; Default MUC room to join
server = "lobby.wildfiregames.com" ; Address of lobby server
tls = true ; Whether to use TLS encryption when connecting to the server.
verify_certificate = false ; Whether to reject connecting to the lobby if the TLS certificate is invalid (TODO: wait for Gloox GnuTLS trust implementation to be fixed)
@@ -419,8 +453,8 @@ terms_url = "https://trac.wildfiregames.com/browser/ps/trunk/binaries/data/mods/
terms_of_service = "0" ; Version (hash) of the Terms of Service that the user has accepted
terms_of_use = "0" ; Version (hash) of the Terms of Use that the user has accepted
privacy_policy = "0" ; Version (hash) of the Privacy Policy that the user has accepted
xpartamupp = "wfgbot23b" ; Name of the server-side XMPP-account that manage games
echelon = "echelon23b" ; Name of the server-side XMPP-account that manages ratings
xpartamupp = "wfgbot24" ; Name of the server-side XMPP-account that manage games
echelon = "echelon24" ; Name of the server-side XMPP-account that manages ratings
buddies = "," ; Comma separated list of playernames that the current user has marked as buddies
rememberpassword = true ; Whether to store the encrypted password in the user config
@@ -439,7 +473,7 @@ delay = 200 ; Duration in milliseconds that is waited b
enabledmods = "mod public"
[modio]
public_key = "RWTsHxQMrRq4xwHisyBa2rNQfAedcINzbTT83jeX4/ZcfVxqLfWB4y8w" ; Public key corresponding to the private key valid mods are signed with
public_key = "RWRcbM/EwV7bucTiQVCcRBhCkYkXmJEO7s4ktyufkB+gW/NxHhOZ38xh" ; Public key corresponding to the private key valid mods are signed with
disclaimer = "0" ; Version (hash) of the Disclaimer that the user has accepted
[modio.v1]
@@ -451,7 +485,6 @@ name_id = "0ad"
duplicateplayernames = false ; Rename joining player to "User (2)" if "User" is already connected, otherwise prohibit join.
lateobservers = everyone ; Allow observers to join the game after it started. Possible values: everyone, buddies, disabled.
observerlimit = 8 ; Prevent further observer joins in running games if this limit is reached
gamestarttimeout = 60000 ; Don't disconnect clients timing out in the loading screen and rejoin process before exceeding this timeout.
[overlay]
fps = "false" ; Show frames per second in top right corner
@@ -464,6 +497,9 @@ gpu.arb.enable = true ; Allow GL_ARB_timer_query timing mode when av
gpu.ext.enable = true ; Allow GL_EXT_timer_query timing mode when available
gpu.intel.enable = true ; Allow GL_INTEL_performance_queries timing mode when available
[rlinterface]
address = "127.0.0.1:6000"
[sound]
mastergain = 0.9
musicgain = 0.2
@@ -473,6 +509,7 @@ uigain = 0.7
[sound.notify]
nick = true ; Play a sound when someone mentions your name in the lobby or game
gamesetup.join = false ; Play a sound when a new client joins the game setup
[tinygettext]
debug = false ; Print error messages each time a translation for an English string is not found.
+174 -128
View File
@@ -1,107 +1,39 @@
## This file documents keynames that can be used in .cfg files for specifying hotkeys
## Note: all are case-insensitive.
## Note: the keynames are not actually configured or implemented here
## Also note: if your keyboard supports keys that do not appear here (such as the French é letter),
## you should be able to use it directly.
## Note: those names map to 'scancodes', i.e. positions on a classic QWERTY keyboard.
## The in-game hotkey editor will show you what that corresponds to.
Backspace, BkSp
Tab
Clear
Return, Ret
Pause
MouseLeft
MouseRight
MouseMiddle
MouseX1
MouseX2
WheelUp
WheelDown
WheelLeft
WheelRight
A-Z
0-9
Return, Enter
Break
Escape, Esc
Space, Spc
!, Exclaim
", DoubleQuote
#, Hash
$, Dollar
&, Ampersand
', SingleQuote
(, LeftParen
), RightParen
*, Asterisk
+, Plus
,, Comma
Backspace
Tab
Space
-, Minus
., Period
/, ForwardSlash
0
1
2
3
4
5
6
7
8
9
:, Colon
;, Semicolon
<, LessThan
=, Equals
>, GreaterThan
?, Question
@, At
=, Plus ## Appears as "Equals" in-game, but "Equals" is not a recognised keyname
[, LeftBracket
\, BackSlash
], RightBracket
^, Caret
_, Underscore
\\, Backslash ## You do need the escaping in the first case.
;, Semicolon
', Quote ## Maps to the quote/doubleQuote key on QWERTY.
`, BackQuote
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Delete, Del
Numpad 0, Num0
Numpad 1, Num1
Numpad 2, Num2
Numpad 3, Num3
Numpad 4, Num4
Numpad 5, Num5
Numpad 6, Num6
Numpad 7, Num7
Numpad 8, Num8
Numpad 9, Num9
Numpad ., NumPoint
Numpad /, NumDivide
Numpad *, NumMultiply
Numpad -, NumMinus
Numpad +, NumPlus
Numpad Enter, NumEnter
Numpad =, NumEquals
Arrow Up, UpArrow
Arrow Down, DownArrow
Arrow Right, RightArrow
Arrow Left, LeftArrow
Insert, Ins
Home
End
Page Up, PgUp
Page Down, PgDn
,, Comma
., Period
/, Slash
F1
F2
F3
@@ -114,41 +46,155 @@ F9
F10
F11
F12
PrintScreen
ScrollLock
Pause
Insert
Home
PageUp
Delete, Del
End
PageDown
Right, RightArrow
Left, LeftArrow
Down, DownArrow
Up, UpArrow
Numlock
NumPlus ## "Keypad +" is not a recognised keyname
Keypad /, NumDivide
Keypad *, NumMultiply
Keypad -, NumMinus
Keypad =, NumEquals
Keypad Enter, NumEnter
Keypad 1, Num1
Keypad 2, Num2
Keypad 3, Num3
Keypad 4, Num4
Keypad 5, Num5
Keypad 6, Num6
Keypad 7, Num7
Keypad 8, Num8
Keypad 9, Num9
Keypad 0, Num0
Keypad ., NumDecimal
Application
Power
F13
F14
F15
Num Lock, NumLock
Caps Lock, CapsLock
Scroll Lock, ScrlLock
Right Shift, RightShift
Left Shift, LeftShift
Shift, AnyShift
Right Ctrl, RightCtrl
Left Ctrl, LeftCtrl
Ctrl, AnyCtrl
Right Alt, RightAlt
Left Alt, LeftAlt
Alt, AnyAlt
Left Super, LeftWin
Right Super, RightWin
Super, AnyWindows ## Windows key, also Command/meta key on Macs
Alt Gr, AltGr
Compose
F16
F17
F18
F19
F20
F21
F22
F23
F24
Execute
Help
Print Screen, PrtSc
SysRq
Break
Menu
Power
Euro
Select
Stop
Again
Undo
Left Mouse Button, MouseLeft
Right Mouse Button, MouseRight
Middle Mouse Button, MouseMiddle
Mouse Wheel Up, WheelUp
Mouse Wheel Down, WheelDown
MouseButtonX, MouseNX # where X is a number 1-255, for extra mouse buttons
## (note that some mice start numbering their buttons at higher numbers
## so the first extra button on your mouse might be #8 here)
Cut
Copy
Paste
Find
Mute
VolumeUp
VolumeDown
Keypad ,
AltErase
SysReq
Cancel
Clear
Prior
Return
Separator
Out
Oper
Clear / Again
CrSel
ExSel
Keypad 00
Keypad 000
ThousandsSeparator
DecimalSeparator
CurrencyUnit
CurrencySubUnit
Keypad (
Keypad )
Keypad {
Keypad }
Keypad Tab
Keypad Backspace
Keypad A
Keypad B
Keypad C
Keypad D
Keypad E
Keypad F
Keypad XOR
Keypad ^
Keypad %
Keypad <
Keypad >
Keypad &
Keypad &&
Keypad |
Keypad ||
Keypad :
Keypad #
Keypad Space
Keypad @
Keypad !
Keypad MemStore
Keypad MemRecall
Keypad MemClear
Keypad MemAdd
Keypad MemSubtract
Keypad MemMultiply
Keypad MemDivide
Keypad +/-
Keypad Clear
Keypad ClearEntry
Keypad Binary
Keypad Octal
Keypad Decimal
Keypad Hexadecimal
Left Ctrl, Ctrl
Left Shift, Shift
Left Alt, Alt
Left GUI, Super
Right Ctrl, Ctrl
Right Shift, Shift
Right Alt, Alt
Right GUI, Super
ModeSwitch
AudioNext
AudioPrev
AudioStop
AudioPlay
AudioMute
MediaSelect
WWW
Mail
Calculator
Computer
AC Search
AC Home
AC Back
AC Forward
AC Stop
AC Refresh
AC Bookmarks
BrightnessDown
BrightnessUp
DisplaySwitch
KBDIllumToggle
KBDIllumDown
KBDIllumUp
Eject
Sleep
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<styles>
<style name="default"/>
</styles>
+15
View File
@@ -0,0 +1,15 @@
var called1 = 0;
var called2 = 0;
var called3 = 0;
var called4 = 0;
var obj1 = Engine.GetGUIObjectByName("obj1");
var obj3 = Engine.GetGUIObjectByName("obj3");
obj1.onTick = () => { ++called1; };
Engine.GetGUIObjectByName("obj2").onTick = () => {
++called2;
delete obj1.onTick;
delete obj3.onTick;
Engine.GetGUIObjectByName("obj4").onTick = () => { ++called4; };
};
obj3.onTick = () => { ++called3; };
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<object name="obj1"/>
<object name="obj2"/>
<object name="obj3"/>
<object name="obj4"/>
<script file="gui/event/event.js"/>
</objects>
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>common/styles.xml</include>
<include>event/event.xml</include>
</page>
+57
View File
@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="UTF-8"?>
<grammar xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0" datatypeLibrary="http://www.w3.org/2001/XMLSchema-datatypes">
<start>
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<choice>
<ref name="objects"/>
<ref name="styles"/>
</choice>
</start>
<define name="objects">
<element name="objects">
<zeroOrMore>
<choice>
<ref name="script"/>
<ref name="object"/>
</choice>
</zeroOrMore>
</element>
</define>
<define name="script">
<element name="script">
<interleave>
<text/>
<optional>
<attribute name="file"/>
</optional>
<optional>
<attribute name="directory"/>
</optional>
</interleave>
</element>
</define>
<define name="object">
<element name="object">
<optional>
<attribute name="name"/>
</optional>
</element>
</define>
<define name="styles">
<element name="styles">
<zeroOrMore>
<ref name="style"/>
</zeroOrMore>
</element>
</define>
<define name="style">
<element name="style">
<attribute name="name"/>
</element>
</define>
</grammar>
+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<element name="page" xmlns:a="http://relaxng.org/ns/compatibility/annotations/1.0" xmlns="http://relaxng.org/ns/structure/1.0">
<a:documentation/>
<!--
NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
and use a converter tool like trang to generate the Relax NG XML (.rng) file
-->
<a:documentation/>
<zeroOrMore>
<element name="include">
<text/>
</element>
</zeroOrMore>
</element>
+14
View File
@@ -0,0 +1,14 @@
var state_before;
var state_after;
function handleInputBeforeGui(ev) {
if ((ev.type == "hotkeydown" || ev.type == "hotkeyup") && ev.hotkey == "test")
state_before = Engine.HotkeyIsPressed("test");
return false;
}
function handleInputAfterGui(ev) {
if ((ev.type == "hotkeydown" || ev.type == "hotkeyup") && ev.hotkey == "test")
state_after = Engine.HotkeyIsPressed("test");
return false;
}
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<objects>
<script file="gui/hotkey/hotkey.js"/>
</objects>
+4
View File
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<page>
<include>hotkey/hotkey.xml</include>
</page>
@@ -39,7 +39,3 @@ Vector3D.prototype.add = function(v)
this.z += v.z;
return this;
};
// make the prototypes easily accessible to C++
const Vector2Dprototype = Vector2D.prototype;
const Vector3Dprototype = Vector3D.prototype;
@@ -1,11 +1,6 @@
function TestScript1A() {}
try {
Engine.RegisterComponentType(12345, "TestScript1A", TestScript1A);
Engine.TS_FAIL("Missed exception");
} catch (e) {
// print("Caught exception: " + e + "\n");
}
TS_ASSERT_EXCEPTION(() => { Engine.RegisterComponentType(12345, "TestScript1A", TestScript1A); });
var n = Engine.QueryInterface(12345, IID_Test1);
if (n !== null)
@@ -16,11 +16,11 @@ Engine.RegisterComponentType(IID_Test1, "HotloadA", HotloadA);
function HotloadB() {}
HotloadB.prototype.Init = function() {
this.x = +this.template.x;
this.x = +this.template.x;
};
HotloadB.prototype.GetX = function() {
return this.x*2;
return this.x * 2;
};
Engine.RegisterComponentType(IID_Test1, "HotloadB", HotloadB);
@@ -0,0 +1,13 @@
function Modding() {}
Modding.prototype.Schema = "<ref name='anything'/>";
Modding.prototype.Init = function() {
this.x = +this.template.x;
};
Modding.prototype.GetX = function() {
return this.x;
};
Engine.RegisterComponentType(IID_Test1, "Modding", Modding);
@@ -0,0 +1,5 @@
Modding.prototype.GetX = function() {
return this.x * 10;
};
Engine.ReRegisterComponentType(IID_Test1, "Modding", Modding);
@@ -3,7 +3,7 @@ function TestScript1_values() {}
TestScript1_values.prototype.Init = function() {
this.x = +this.template.x;
this.str = "this is a string";
this.things = { a: 1, b: "2", c: [3, "4", [5, []]] };
this.things = { "a": 1, "b": "2", "c": [3, "4", [5, []]] };
};
TestScript1_values.prototype.GetX = function() {
@@ -22,11 +22,11 @@ TestScript1_entity.prototype.GetX = function() {
try {
delete this.entity;
Engine.TS_FAIL("Missed exception");
} catch (e) { }
} catch (e) { /* OK */ }
try {
this.entity = -1;
Engine.TS_FAIL("Missed exception");
} catch (e) { }
} catch (e) { /* OK */ }
// and return the value
return this.entity;
@@ -40,7 +40,7 @@ function TestScript1_nontree() {}
TestScript1_nontree.prototype.Init = function() {
var n = [1];
this.x = [n, n, null, { y: n }];
this.x = [n, n, null, { "y": n }];
this.x[2] = this.x;
};
@@ -48,7 +48,7 @@ TestScript1_nontree.prototype.GetX = function() {
// print(uneval(this)+"\n");
this.x[0][0] += 1;
return this.x[0][0] + this.x[1][0] + this.x[2][0][0] + this.x[3].y[0];
}
};
Engine.RegisterComponentType(IID_Test1, "TestScript1_nontree", TestScript1_nontree);
@@ -61,7 +61,11 @@ TestScript1_custom.prototype.Init = function() {
};
TestScript1_custom.prototype.Serialize = function() {
return {c:1};
return { "c": 1 };
};
TestScript1_custom.prototype.Deserialize = function(data) {
this.c = data.c;
};
Engine.RegisterComponentType(IID_Test1, "TestScript1_custom", TestScript1_custom);
@@ -72,7 +76,7 @@ function TestScript1_getter() {}
TestScript1_getter.prototype.Init = function() {
this.x = 100;
this.__defineGetter__('x', function () { print("FAIL\n"); die(); return 200; });
this.__defineGetter__('x', function() { print("FAIL\n"); die(); return 200; });
};
Engine.RegisterComponentType(IID_Test1, "TestScript1_getter", TestScript1_getter);
@@ -83,8 +87,18 @@ function TestScript1_consts() {}
TestScript1_consts.prototype.Schema = "<ref name='anything'/>";
TestScript1_consts.prototype.Init = function() {
this.cached = (+this.entity) + (+this.template.x);
};
TestScript1_consts.prototype.Serialize = null;
TestScript1_consts.prototype.Deserialize = function(data) {
this.Init();
};
TestScript1_consts.prototype.GetX = function() {
return (+this.entity) + (+this.template.x);
return this.cached;
};
Engine.RegisterComponentType(IID_Test1, "TestScript1_consts", TestScript1_consts);
@@ -18,7 +18,7 @@ Engine.RegisterComponentType(IID_Test1, "TestScript1A", TestScript1A);
function TestScript1B() {}
TestScript1B.prototype = new TestScript1A();
TestScript1B.prototype = Object.create(TestScript1A.prototype);
TestScript1B.prototype.Init = function() {
this.x = 102000;
@@ -1,12 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<Entity filtered="">
<AIProxy merge=""/>
<Armour merge=""/>
<BuildRestrictions merge=""/>
<!-- Don't provide population bonuses yet (but still do take up population cost) -->
<Cost merge="">
<PopulationBonus>0</PopulationBonus>
</Cost>
<Cost merge=""/>
<Decay merge=""/>
<Health>
<Initial>1</Initial>
@@ -24,9 +20,14 @@
</Obstruction>
<OverlayRenderer merge=""/>
<Ownership merge=""/>
<!-- Don't provide population bonuses yet. -->
<Population>
<Bonus>0</Bonus>
</Population>
<Position merge=""/>
<RallyPoint merge=""/>
<RallyPointRenderer merge=""/>
<Resistance merge=""/>
<Selectable merge=""/>
<Sound merge=""/>
<StatusBars merge=""/>
Binary file not shown.
+147 -111
View File
@@ -1,5 +1,5 @@
/**
sprintf() for JavaScript v1.0.2
sprintf() for JavaScript v1.1.2
https://github.com/alexei/sprintf.js
Copyright (c) 2007-2013, Alexandru Marasteanu <hello [at) alexei (dot] ro>
@@ -28,145 +28,183 @@ ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
**/
/* global window, exports, define */
!function(window)
{
'use strict'
(function(window) {
var re = {
not_string: /[^s]/,
number: /[dief]/,
not_bool: /[^t]/,
not_type: /[^T]/,
not_primitive: /[^v]/,
number: /[diefg]/,
numeric_arg: /[bcdiefguxX]/,
json: /[j]/,
not_json: /[^j]/,
text: /^[^\x25]+/,
modulo: /^\x25{2}/,
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^\)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-fiosuxX])/,
placeholder: /^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,
key: /^([a-z_][a-z_\d]*)/i,
key_access: /^\.([a-z_][a-z_\d]*)/i,
index_access: /^\[(\d+)\]/,
sign: /^[\+\-]/
sign: /^[+-]/
}
function sprintf() {
var key = arguments[0], cache = sprintf.cache
if (!(cache[key] && cache.hasOwnProperty(key))) {
cache[key] = sprintf.parse(key)
}
return sprintf.format.call(null, cache[key], arguments)
function sprintf(key) {
// `arguments` is not an array, but should be fine for this call
return sprintf_format(sprintf_parse(key), arguments)
}
sprintf.format = function(parse_tree, argv) {
var cursor = 1, tree_length = parse_tree.length, node_type = "", arg, output = [], i, k, match, pad, pad_character, pad_length, is_positive = true, sign = ""
function vsprintf(fmt, argv) {
return sprintf.apply(null, [fmt].concat(argv || []))
}
function sprintf_format(parse_tree, argv) {
var cursor = 1, tree_length = parse_tree.length, arg, output = '', i, k, ph, pad, pad_character, pad_length, is_positive, sign
for (i = 0; i < tree_length; i++) {
node_type = get_type(parse_tree[i])
if (node_type === "string") {
output[output.length] = parse_tree[i]
if (typeof parse_tree[i] === 'string') {
output += parse_tree[i]
}
else if (node_type === "array") {
match = parse_tree[i] // convenience purposes only
if (match[2]) { // keyword argument
else if (typeof parse_tree[i] === 'object') {
ph = parse_tree[i] // convenience purposes only
if (ph.keys) { // keyword argument
arg = argv[cursor]
for (k = 0; k < match[2].length; k++) {
if (!arg.hasOwnProperty(match[2][k])) {
throw new Error(sprintf("[sprintf] property '%s' does not exist", match[2][k]))
for (k = 0; k < ph.keys.length; k++) {
if (arg == undefined) {
throw new Error(sprintf('[sprintf] Cannot access property "%s" of undefined value "%s"', ph.keys[k], ph.keys[k-1]))
}
arg = arg[match[2][k]]
arg = arg[ph.keys[k]]
}
}
else if (match[1]) { // positional argument (explicit)
arg = argv[match[1]]
else if (ph.param_no) { // positional argument (explicit)
arg = argv[ph.param_no]
}
else { // positional argument (implicit)
arg = argv[cursor++]
}
if (get_type(arg) == "function") {
if (re.not_type.test(ph.type) && re.not_primitive.test(ph.type) && arg instanceof Function) {
arg = arg()
}
if (re.not_string.test(match[8]) && (get_type(arg) != "number" && isNaN(arg))) {
throw new TypeError(sprintf("[sprintf] expecting number but found %s", get_type(arg)))
if (re.numeric_arg.test(ph.type) && (typeof arg !== 'number' && isNaN(arg))) {
throw new TypeError(sprintf('[sprintf] expecting number but found %T', arg))
}
if (re.number.test(match[8])) {
if (re.number.test(ph.type)) {
is_positive = arg >= 0
}
switch (match[8]) {
case "b":
arg = arg.toString(2)
break
case "c":
arg = String.fromCharCode(arg)
break
case "d":
case "i":
switch (ph.type) {
case 'b':
arg = parseInt(arg, 10).toString(2)
break
case 'c':
arg = String.fromCharCode(parseInt(arg, 10))
break
case 'd':
case 'i':
arg = parseInt(arg, 10)
break
case "e":
arg = match[7] ? arg.toExponential(match[7]) : arg.toExponential()
break
case "f":
arg = match[7] ? parseFloat(arg).toFixed(match[7]) : parseFloat(arg)
break
case "o":
arg = arg.toString(8)
break
case "s":
arg = ((arg = String(arg)) && match[7] ? arg.substring(0, match[7]) : arg)
break
case "u":
arg = arg >>> 0
break
case "x":
arg = arg.toString(16)
break
case "X":
arg = arg.toString(16).toUpperCase()
break
break
case 'j':
arg = JSON.stringify(arg, null, ph.width ? parseInt(ph.width) : 0)
break
case 'e':
arg = ph.precision ? parseFloat(arg).toExponential(ph.precision) : parseFloat(arg).toExponential()
break
case 'f':
arg = ph.precision ? parseFloat(arg).toFixed(ph.precision) : parseFloat(arg)
break
case 'g':
arg = ph.precision ? String(Number(arg.toPrecision(ph.precision))) : parseFloat(arg)
break
case 'o':
arg = (parseInt(arg, 10) >>> 0).toString(8)
break
case 's':
arg = String(arg)
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
break
case 't':
arg = String(!!arg)
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
break
case 'T':
arg = Object.prototype.toString.call(arg).slice(8, -1).toLowerCase()
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
break
case 'u':
arg = parseInt(arg, 10) >>> 0
break
case 'v':
arg = arg.valueOf()
arg = (ph.precision ? arg.substring(0, ph.precision) : arg)
break
case 'x':
arg = (parseInt(arg, 10) >>> 0).toString(16)
break
case 'X':
arg = (parseInt(arg, 10) >>> 0).toString(16).toUpperCase()
break
}
if (re.number.test(match[8]) && (!is_positive || match[3])) {
sign = is_positive ? "+" : "-"
arg = arg.toString().replace(re.sign, "")
if (re.json.test(ph.type)) {
output += arg
}
else {
sign = ""
if (re.number.test(ph.type) && (!is_positive || ph.sign)) {
sign = is_positive ? '+' : '-'
arg = arg.toString().replace(re.sign, '')
}
else {
sign = ''
}
pad_character = ph.pad_char ? ph.pad_char === '0' ? '0' : ph.pad_char.charAt(1) : ' '
pad_length = ph.width - (sign + arg).length
pad = ph.width ? (pad_length > 0 ? pad_character.repeat(pad_length) : '') : ''
output += ph.align ? sign + arg + pad : (pad_character === '0' ? sign + pad + arg : pad + sign + arg)
}
pad_character = match[4] ? match[4] === "0" ? "0" : match[4].charAt(1) : " "
pad_length = match[6] - (sign + arg).length
pad = match[6] ? (pad_length > 0 ? str_repeat(pad_character, pad_length) : "") : ""
output[output.length] = match[5] ? sign + arg + pad : (pad_character === "0" ? sign + pad + arg : pad + sign + arg)
}
}
return output.join("")
return output
}
sprintf.cache = {}
var sprintf_cache = Object.create(null)
sprintf.parse = function(fmt) {
var _fmt = fmt, match = [], parse_tree = [], arg_names = 0
function sprintf_parse(fmt) {
if (sprintf_cache[fmt]) {
return sprintf_cache[fmt]
}
var _fmt = fmt, match, parse_tree = [], arg_names = 0
while (_fmt) {
if ((match = re.text.exec(_fmt)) !== null) {
parse_tree[parse_tree.length] = match[0]
parse_tree.push(match[0])
}
else if ((match = re.modulo.exec(_fmt)) !== null) {
parse_tree[parse_tree.length] = "%"
parse_tree.push('%')
}
else if ((match = re.placeholder.exec(_fmt)) !== null) {
if (match[2]) {
arg_names |= 1
var field_list = [], replacement_field = match[2], field_match = []
if ((field_match = re.key.exec(replacement_field)) !== null) {
field_list[field_list.length] = field_match[1]
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== "") {
field_list.push(field_match[1])
while ((replacement_field = replacement_field.substring(field_match[0].length)) !== '') {
if ((field_match = re.key_access.exec(replacement_field)) !== null) {
field_list[field_list.length] = field_match[1]
field_list.push(field_match[1])
}
else if ((field_match = re.index_access.exec(replacement_field)) !== null) {
field_list[field_list.length] = field_match[1]
field_list.push(field_match[1])
}
else {
throw new SyntaxError("[sprintf] failed to parse named argument key")
throw new SyntaxError('[sprintf] failed to parse named argument key')
}
}
}
else {
throw new SyntaxError("[sprintf] failed to parse named argument key")
throw new SyntaxError('[sprintf] failed to parse named argument key')
}
match[2] = field_list
}
@@ -174,53 +212,51 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
arg_names |= 2
}
if (arg_names === 3) {
throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported")
throw new Error('[sprintf] mixing positional and named placeholders is not (yet) supported')
}
parse_tree[parse_tree.length] = match
parse_tree.push(
{
placeholder: match[0],
param_no: match[1],
keys: match[2],
sign: match[3],
pad_char: match[4],
align: match[5],
width: match[6],
precision: match[7],
type: match[8]
}
)
}
else {
throw new SyntaxError("[sprintf] unexpected placeholder")
throw new SyntaxError('[sprintf] unexpected placeholder')
}
_fmt = _fmt.substring(match[0].length)
}
return parse_tree
}
var vsprintf = function(fmt, argv, _argv) {
_argv = (argv || []).slice(0)
_argv.splice(0, 0, fmt)
return sprintf.apply(null, _argv)
}
/**
* helpers
*/
function get_type(variable) {
return Object.prototype.toString.call(variable).slice(8, -1).toLowerCase()
}
function str_repeat(input, multiplier) {
return Array(multiplier + 1).join(input)
return sprintf_cache[fmt] = parse_tree
}
/**
* export to either browser or node.js
*/
if (typeof exports !== "undefined") {
exports.sprintf = sprintf
exports.vsprintf = vsprintf
/* eslint-disable quote-props */
if (typeof exports !== 'undefined') {
exports['sprintf'] = sprintf
exports['vsprintf'] = vsprintf
}
else {
window.sprintf = sprintf
window.vsprintf = vsprintf
if (typeof window !== 'undefined') {
window['sprintf'] = sprintf
window['vsprintf'] = vsprintf
if (typeof define === "function" && define.amd) {
if (typeof define === 'function' && define['amd']) {
define(function() {
return {
sprintf: sprintf,
vsprintf: vsprintf
'sprintf': sprintf,
'vsprintf': vsprintf
}
})
}
}
})(typeof window === "undefined" ? this : window);
/* eslint-enable quote-props */
}(this); // eslint-disable-line
@@ -1,50 +1,18 @@
// We want to pass callback functions for the different buttons in a convenient way.
// Because passing functions accross compartment boundaries is a pain, we just store them here together with some optional arguments.
// The messageBox page will return the code of the pressed button and the according function will be called.
var g_MessageBoxBtnFunctions = [];
var g_MessageBoxCallbackArgs = [];
function messageBoxCallbackFunction(btnCode)
{
if (btnCode !== undefined && g_MessageBoxBtnFunctions[btnCode])
{
// Cache the variables to make it possible to call a messageBox from a callback function.
let callbackFunction = g_MessageBoxBtnFunctions[btnCode];
let callbackArgs = g_MessageBoxCallbackArgs[btnCode];
g_MessageBoxBtnFunctions = [];
g_MessageBoxCallbackArgs = [];
if (callbackArgs !== undefined)
callbackFunction(callbackArgs);
else
callbackFunction();
return;
}
g_MessageBoxBtnFunctions = [];
g_MessageBoxCallbackArgs = [];
};
function messageBox(mbWidth, mbHeight, mbMessage, mbTitle, mbButtonCaptions, mbBtnCode, mbCallbackArgs)
{
if (g_MessageBoxBtnFunctions && g_MessageBoxBtnFunctions.length)
{
warn("A messagebox was called when a previous callback function is still set, aborting!");
return;
}
g_MessageBoxBtnFunctions = mbBtnCode;
g_MessageBoxCallbackArgs = mbCallbackArgs || g_MessageBoxCallbackArgs;
Engine.PushGuiPage("page_msgbox.xml", {
"width": mbWidth,
"height": mbHeight,
"message": mbMessage,
"title": mbTitle,
"buttonCaptions": mbButtonCaptions,
"callback": mbBtnCode && "messageBoxCallbackFunction"
});
Engine.PushGuiPage(
"page_msgbox.xml",
{
"width": mbWidth,
"height": mbHeight,
"message": mbMessage,
"title": mbTitle,
"buttonCaptions": mbButtonCaptions
},
btnCode => {
if (mbBtnCode !== undefined && mbBtnCode[btnCode])
mbBtnCode[btnCode](mbCallbackArgs ? mbCallbackArgs[btnCode] : undefined);
});
}
function openURL(url)
@@ -32,7 +32,7 @@
textcolor="255 255 255"
/>
<tooltip name="sliderTooltip"
<tooltip name="tooltipInstant"
anchor="top"
buffer_zone="4"
delay="0"
@@ -522,7 +522,7 @@
- Misc. -
==========================================
-->
<sprite name = "ModernWindowCornerBottomRight">
<sprite name = "ModernDarkBoxOpaque">
<!-- background -->
<image backcolor = "12 12 12"/>
<image texture = "global/modern/background.png"
@@ -532,14 +532,8 @@
<!-- shading -->
<image texture = "global/modern/shadow-high.png"
texture_size = "0 0 1024 256"
size = "0 100%-268 100%-12 100%-12"
/>
<!-- bottom edge -->
<image texture = "global/modern/border.png"
real_texture_placement = "0 0 2048 8"
size = "0 100%-16 100%-10 100%-8"
texture_size = "0 0 1024 128"
size = "0 100%-140 100%-12 100%-12"
/>
</sprite>
<sprite name = "ModernDropDownArrow">
@@ -6,6 +6,7 @@
- DEFAULT STYLE: The style with the name 'default' is special, it will
- be called by every object before any other style is loaded.
==========================================
Note that the default z value is determined by GUI engine regardless of what is specified here.
-->
<style name="default"
absolute="false"
@@ -13,27 +14,18 @@
ghost="false"
hidden="false"
size="0 0 100% 100%"
z="0"
font="sans-14"
buffer_zone="5"
multiline="false"
/>
<style name="ModernWindow"
sprite="ModernWindow"
buffer_zone="12"
text_align="left"
text_valign="top"
/>
<style name="ModernDialog"
sprite="ModernDialog"
buffer_zone="12"
text_align="left"
text_valign="top"
/>
<style name="ModernList"
buffer_zone="5"
font="sans-bold-stroke-14"
heading_height="25"
scrollbar="true"
scrollbar_style="ModernScrollBar"
sprite="ModernDarkBoxGoldNoTop"
@@ -42,13 +34,11 @@
textcolor="white"
textcolor_selected="white"
text_align="left"
text_valign="center"
sound_selected="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernSortedList"
buffer_zone="5"
font="sans-bold-stroke-14"
heading_height="25"
scrollbar="true"
scrollbar_style="ModernScrollBar"
sprite="ModernDarkBoxGoldNoTop"
@@ -60,7 +50,6 @@
textcolor="white"
textcolor_selected="white"
text_align="left"
text_valign="center"
sound_selected="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernDropDown"
@@ -143,20 +132,21 @@
sprite_selectarea="color:150 0 0"
textcolor="white"
textcolor_selected="white"
placeholder_color="gray"
/>
<style name="ModernTickBox"
sprite="ModernTickOff"
sprite2="ModernTickOn"
sprite_disabled="ModernTickDisabledOff"
sprite2_disabled="ModernTickDisabledOn"
square_side="22"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernSlider"
sprite="ModernSliderButton"
sprite_bar="ModernSliderLine"
button_width="20"
tooltip_style="sliderTooltip"
tooltip_style="tooltipInstant"
sound_pressed="audio/interface/ui/ui_button_click.ogg"
/>
<style name="ModernButtonRed"
sprite="ModernButtonRed"
+21 -19
View File
@@ -7,27 +7,29 @@ function initTerms(terms)
function openTerms(page)
{
Engine.PushGuiPage("page_termsdialog.xml", {
"file": g_Terms[page].file,
"title": g_Terms[page].title,
"sprintf": g_Terms[page].sprintf,
"urlButtons": g_Terms[page].urlButtons || [],
"termsURL": g_Terms[page].termsURL || undefined,
"page": page,
"callback": "acceptTerms"
});
}
Engine.PushGuiPage(
"page_termsdialog.xml",
{
"file": g_Terms[page].file,
"title": g_Terms[page].title,
"sprintf": g_Terms[page].sprintf,
"urlButtons": g_Terms[page].urlButtons || [],
"termsURL": g_Terms[page].termsURL || undefined,
"page": page
},
data => {
g_Terms[data.page].accepted = data.accepted;
function acceptTerms(data)
{
g_Terms[data.page].accepted = data.accepted;
Engine.ConfigDB_CreateAndWriteValueToFile(
"user",
g_Terms[data.page].config,
data.accepted ? getTermsHash(data.page) : "0",
"config/user.cfg");
let value = data.accepted ? getTermsHash(data.page) : "0";
Engine.ConfigDB_CreateValue("user", g_Terms[data.page].config, value);
Engine.ConfigDB_WriteValueToFile("user", g_Terms[data.page].config, value, "config/user.cfg");
if (g_Terms[data.page].callback)
g_Terms[data.page].callback(data);
if (g_Terms[data.page].callback)
g_Terms[data.page].callback(data);
}
);
}
function checkTerms()
+3 -1
View File
@@ -61,7 +61,6 @@ ex_settings =
attribute format_x { text }?&
attribute format_y { text }?&
attribute fov_wedge_color { ccolor }?&
attribute heading_height { text }?&
attribute hotkey { text }?&
attribute cell_id { xsd:integer }?&
attribute independent { bool }?&
@@ -72,6 +71,8 @@ ex_settings =
attribute maxwidth { xsd:decimal }? &
attribute multiline { bool }?&
attribute offset { pos }?&
attribute placeholder_text { text }?&
attribute placeholder_color { ccolor }?&
attribute readonly { bool }?&
attribute scrollbar { bool }?&
attribute scrollbar_style { text }?&
@@ -133,6 +134,7 @@ object =
| \include
| item
| repeat
| script
| translatableAttribute)*
| text),
unique_settings,
+9 -3
View File
@@ -250,9 +250,6 @@
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="heading_height"/>
</optional>
<optional>
<attribute name="hotkey"/>
</optional>
@@ -437,6 +434,14 @@
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="placeholder_text"/>
</optional>
<optional>
<attribute name="placeholder_color">
<ref name="ccolor"/>
</attribute>
</optional>
<optional>
<attribute name="text_align">
<ref name="align"/>
@@ -493,6 +498,7 @@
<ref name="include"/>
<ref name="item"/>
<ref name="repeat"/>
<ref name="script"/>
<ref name="translatableAttribute"/>
</choice>
</zeroOrMore>
+29 -12
View File
@@ -167,6 +167,8 @@ function displayMods()
let filterColumns = ["name", "name_id", "summary"];
let filterText = Engine.GetGUIObjectByName("modFilter").caption.toLowerCase();
if (Engine.GetGUIObjectByName("compatibilityFilter").checked)
displayedMods = displayedMods.filter(mod => !mod.invalid);
displayedMods = displayedMods.filter(mod => filterColumns.some(column => mod[column].toLowerCase().indexOf(filterText) != -1));
displayedMods.sort((mod1, mod2) =>
@@ -175,11 +177,11 @@ function displayMods()
mod1.filesize - mod2.filesize :
String(mod1[modsAvailableList.selected_column]).localeCompare(String(mod2[modsAvailableList.selected_column]))));
modsAvailableList.list_name = displayedMods.map(mod => mod.name);
modsAvailableList.list_name_id = displayedMods.map(mod => mod.name_id);
modsAvailableList.list_version = displayedMods.map(mod => mod.version);
modsAvailableList.list_filesize = displayedMods.map(mod => filesizeToString(mod.filesize));
modsAvailableList.list_dependencies = displayedMods.map(mod => (mod.dependencies || []).join(" "));
modsAvailableList.list_name = displayedMods.map(mod => compatibilityColor(mod.name, !mod.invalid));
modsAvailableList.list_name_id = displayedMods.map(mod => compatibilityColor(mod.name_id, !mod.invalid));
modsAvailableList.list_version = displayedMods.map(mod => compatibilityColor(mod.version || "", !mod.invalid));
modsAvailableList.list_filesize = displayedMods.map(mod => compatibilityColor(mod.filesize !== undefined ? filesizeToString(mod.filesize) : filesizeToString(mod.filesize), !mod.invalid));
modsAvailableList.list_dependencies = displayedMods.map(mod => compatibilityColor((mod.dependencies || []).join(" "), !mod.invalid));
modsAvailableList.list = displayedMods.map(mod => mod.i);
modsAvailableList.selected = modsAvailableList.list.indexOf(selectedMod);
}
@@ -188,8 +190,12 @@ function clearModList()
{
let modsAvailableList = Engine.GetGUIObjectByName("modsAvailableList");
modsAvailableList.selected = -1;
for (let listIdx of Object.keys(modsAvailableList).filter(key => key.startsWith("list")))
modsAvailableList[listIdx] = [];
modsAvailableList.list_name = [];
modsAvailableList.list_name_id = [];
modsAvailableList.list_version = [];
modsAvailableList.list_filesize = [];
modsAvailableList.list_dependencies = [];
modsAvailableList.list = [];
}
function selectedModIndex()
@@ -202,11 +208,19 @@ function selectedModIndex()
return +modsAvailableList.list[modsAvailableList.selected];
}
function isSelectedModInvalid(selected)
{
return selected !== undefined && !!g_ModsAvailableOnline[selected].invalid && g_ModsAvailableOnline[selected].invalid == "true";
}
function showModDescription()
{
let selected = selectedModIndex();
Engine.GetGUIObjectByName("downloadButton").enabled = selected !== undefined;
Engine.GetGUIObjectByName("modDescription").caption = selected !== undefined ? g_ModsAvailableOnline[selected].summary : "";
let isSelected = selected !== undefined;
let isInvalid = isSelectedModInvalid(selected);
Engine.GetGUIObjectByName("downloadButton").enabled = isSelected && !isInvalid;
Engine.GetGUIObjectByName("modDescription").caption = isSelected && !isInvalid ? g_ModsAvailableOnline[selected].summary : "";
Engine.GetGUIObjectByName("modError").caption = isSelected && isInvalid ? sprintf(translate("Invalid mod: %(error)s"), {"error": g_ModsAvailableOnline[selected].error }) : "";
}
function cancelModListUpdate()
@@ -244,6 +258,9 @@ function downloadMod()
{
let selected = selectedModIndex();
if (isSelectedModInvalid(selected))
return;
progressDialog(
sprintf(translate("Downloading “%(modname)s”"), {
"modname": g_ModsAvailableOnline[selected].name
@@ -268,9 +285,9 @@ function cancelRequest()
hideDialog();
}
function closePage(data)
function closePage()
{
Engine.PopGuiPageCB(undefined);
Engine.PopGuiPage();
}
function showErrorMessageBox(caption, title, buttonCaptions, buttonActions)
@@ -312,7 +329,7 @@ function progressDialog(dialogCaption, dialogTitle, showProgressBar, buttonCapti
function updateProgressBar(progress, totalSize)
{
let progressPercent = Math.ceil(progress * 100);
Engine.GetGUIObjectByName("downloadDialog_progressBar").caption = progressPercent;
Engine.GetGUIObjectByName("downloadDialog_progressBar").progress = progressPercent;
let transferredSize = progress * totalSize;
let transferredSizeObj = filesizeToObj(transferredSize);
+17 -3
View File
@@ -5,7 +5,7 @@
<script directory="gui/common/"/>
<script directory="gui/modio/"/>
<object type="image" sprite="ModernFade" z="0"/>
<object type="image" sprite="ModernFade"/>
<object name="modio" type="image" style="ModernDialog" size="10% 10% 90% 90%">
@@ -19,7 +19,7 @@
</object>
<!-- Available Mods Wrapper -->
<object name="modsAvailable" size="16 20 100%-16 100%-70" style="ModmodScrollbar">
<object name="modsAvailable" size="16 20 100%-16 100%-70">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Available Mods</translatableAttribute>
@@ -65,7 +65,21 @@
<translatableAttribute id="heading">Dependencies</translatableAttribute>
</column>
</object>
<object name="modDescription" type="text" style="ModmodScrollbar" size="0 100% 100%-16 100%+28" />
<object name="modError" type="text" style="ModmodScrollbar" textcolor="255 0 0" size="0 100% 100%-16 100%+28" />
</object>
<!-- Right Panel: Compatibility Filter-->
<object name="rightPanel" size="100%-250 20 100%-10 40" >
<!-- Compatibility Filter Checkbox -->
<object name="compatibilityFilter" type="checkbox" checked="true" style="ModernTickBox" size="0 4 20 100%">
<action on="Press">displayMods();</action>
</object>
<!-- Compatibility Filter Label -->
<object type="text" size="20 2 100% 100%" text_align="left" textcolor="white">
<translatableAttribute id="caption">Filter valid mods</translatableAttribute>
</object>
</object>
<!-- Buttons -->
@@ -89,7 +103,7 @@
<!-- Download/Request-in-progress Dialog -->
<!-- Captions are supplied in modio.js -->
<!-- This must be after the buttons, and with "z" > 20, else it and/or other objects will not be drawn correctly -->
<object name="downloadDialog" type="image" sprite="ModernFade" z="30" size="0 0 100% 100%">
<object name="downloadDialog" type="image" sprite="ModernFade" z="30">
<object type="image" style="ModernDialog" size="50%-210 50%-96 50%+210 50%+96">
<object name="downloadDialog_title" type="text" style="ModernLabelText" size="50%-128 0%-16 50%+128 16"/>
@@ -6,7 +6,7 @@
<script directory="gui/modmod/help/"/>
<!-- Add a translucent black background to fade out the menu page -->
<object type="image" z="0" sprite="ModernFade"/>
<object type="image" sprite="ModernFade"/>
<object type="image" style="ModernDialog" size="50%-466 50%-316 50%+466 50%+316">
<object name="title" style="ModernLabelText" type="text" size="50%-128 -18 50%+128 14">
+73 -28
View File
@@ -6,7 +6,7 @@
* A mod is defined by a mod.json file, for example
* {
* "name": "0ad",
* "version": "0.0.23",
* "version": "0.0.24",
* "label": "0 A.D. - Empires Ascendant",
* "url": "https://wildfiregames.com/",
* "description": "A free, open-source, historical RTS game.",
@@ -19,7 +19,7 @@
* "label": "Mod 2",
* "version": "1.1",
* "description": "",
* "dependencies": ["0ad<=0.0.23", "rote"]
* "dependencies": ["0ad<=0.0.24", "rote"]
* }
*
* A mod is identified by the directory name.
@@ -48,6 +48,9 @@ var g_Mods = {};
var g_ModsEnabled = [];
var g_ModsDisabled = [];
var g_ModsEnabledFiltered = [];
var g_ModsDisabledFiltered = [];
/**
* Name of the mods installed by the ModInstaller.
*/
@@ -88,6 +91,8 @@ function loadEnabledMods()
{
g_ModsEnabled = Engine.ConfigDB_GetValue("user", "mod.enabledmods").split(/\s+/).filter(folder => !!g_Mods[folder]);
g_ModsDisabled = Object.keys(g_Mods).filter(folder => g_ModsEnabled.indexOf(folder) == -1);
g_ModsEnabledFiltered = g_ModsEnabled;
g_ModsDisabledFiltered = g_ModsDisabled;
}
function validateMods()
@@ -99,7 +104,6 @@ function validateMods()
function initGUIFilters()
{
Engine.GetGUIObjectByName("negateFilter").checked = false;
Engine.GetGUIObjectByName("modGenericFilter").caption = translate("Filter");
displayModLists();
}
@@ -110,6 +114,7 @@ function initGUIButtons(data)
let cancelButton = !data || data.cancelbutton;
Engine.GetGUIObjectByName("cancelButton").hidden = !cancelButton;
Engine.GetGUIObjectByName("quitButton").hidden = cancelButton;
Engine.GetGUIObjectByName("toggleModButton").caption = translateWithContext("mod activation", "Enable");
}
function saveMods()
@@ -128,8 +133,8 @@ function startMods()
function displayModLists()
{
displayModList("modsEnabledList", g_ModsEnabled);
displayModList("modsDisabledList", g_ModsDisabled);
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled);
g_ModsDisabledFiltered = displayModList("modsDisabledList", g_ModsDisabled);
}
function displayModList(listObjectName, folders)
@@ -146,6 +151,8 @@ function displayModList(listObjectName, folders)
folders = folders.filter(filterMod);
let selected = listObject.selected !== -1 ? listObject.list_name[listObject.selected] : null;
listObject.list_name = folders.map(folder => g_Mods[folder].name).map(name => g_InstalledMods.indexOf(name) == -1 ? name : coloredText(name, "green"));
listObject.list_folder = folders;
listObject.list_label = folders.map(folder => g_Mods[folder].label);
@@ -153,6 +160,15 @@ function displayModList(listObjectName, folders)
listObject.list_version = folders.map(folder => g_Mods[folder].version);
listObject.list_dependencies = folders.map(folder => g_Mods[folder].dependencies.join(" "));
listObject.list = folders;
listObject.selected = selected ? listObject.list_name.indexOf(selected) : -1;
return folders;
}
function reloadDisabledMods()
{
g_ModsDisabled = Object.keys(g_Mods).filter(folder => g_ModsEnabled.indexOf(folder) == -1);
}
function enableMod()
@@ -160,17 +176,17 @@ function enableMod()
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let pos = modsDisabledList.selected;
if (pos == -1 || !areDependenciesMet(g_ModsDisabled[pos]))
if (pos == -1 || !areDependenciesMet(g_ModsDisabledFiltered[pos]))
return;
g_ModsEnabled.push(g_ModsDisabled.splice(pos, 1)[0]);
g_ModsEnabled.push(g_ModsDisabledFiltered.splice(pos, 1)[0]);
reloadDisabledMods();
if (pos >= g_ModsDisabled.length)
if (pos >= g_ModsDisabledFiltered.length)
--pos;
modsDisabledList.selected = pos;
displayModLists();
modsDisabledList.selected = pos;
}
function disableMod()
@@ -180,7 +196,16 @@ function disableMod()
if (pos == -1)
return;
g_ModsDisabled.push(g_ModsEnabled.splice(pos, 1)[0]);
// Find true position of disabled mod and remove it
let disabledMod = g_ModsEnabledFiltered[pos];
for (let i = 0; i < g_ModsEnabled.length; ++i)
if (g_ModsEnabled[i] == disabledMod)
{
g_ModsEnabled.splice(i, 1);
break;
}
g_ModsDisabled.push(disabledMod);
// Remove mods that required the removed mod and cascade
// Sort them, so we know which ones can depend on the removed mod
@@ -195,9 +220,8 @@ function disableMod()
--i;
}
modsEnabledList.selected = Math.min(pos, g_ModsEnabled.length - 1);
displayModLists();
modsEnabledList.selected = Math.min(pos, g_ModsEnabledFiltered.length - 1);
}
function applyFilters()
@@ -230,7 +254,6 @@ function filterMod(folder)
let searchText = Engine.GetGUIObjectByName("modGenericFilter").caption;
if (searchText &&
searchText != translate("Filter") &&
folder.indexOf(searchText) == -1 &&
mod.name.indexOf(searchText) == -1 &&
mod.label.indexOf(searchText) == -1 &&
@@ -248,11 +271,23 @@ function closePage()
Engine.SwitchGuiPage("page_pregame.xml", {});
}
function areFilters()
{
let searchText = Engine.GetGUIObjectByName("modGenericFilter").caption;
return searchText && searchText != translate("Filter");
}
/**
* Moves an item in the list up or down.
*/
function moveCurrItem(objectName, up)
{
// Prevent moving while filters are applied
// because we would need to map filtered positions
// to not filtered positions so changes will persist.
if (areFilters())
return;
let obj = Engine.GetGUIObjectByName(objectName);
let idx = obj.selected;
if (idx == -1)
@@ -267,10 +302,8 @@ function moveCurrItem(objectName, up)
g_ModsEnabled[idx] = g_ModsEnabled[idx2];
g_ModsEnabled[idx2] = tmp;
obj.list = g_ModsEnabled;
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled);
obj.selected = idx2;
displayModList("modsEnabledList", g_ModsEnabled);
}
function areDependenciesMet(folder)
@@ -351,9 +384,9 @@ function sortEnabledMods()
g_ModsEnabled.sort((folder1, folder2) =>
dependencies[folder1].indexOf(g_Mods[folder2].name) != -1 ? 1 :
dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
dependencies[folder2].indexOf(g_Mods[folder1].name) != -1 ? -1 : 0);
displayModList("modsEnabledList", g_ModsEnabled);
g_ModsEnabledFiltered = displayModList("modsEnabledList", g_ModsEnabled);
}
function selectedMod(listObjectName)
@@ -362,33 +395,45 @@ function selectedMod(listObjectName)
let otherListObject = Engine.GetGUIObjectByName(listObjectName == "modsDisabledList" ?
"modsEnabledList" : "modsDisabledList");
if (listObject.selected != -1)
let toggleModButton = Engine.GetGUIObjectByName("toggleModButton");
let modSelected = listObject.selected != -1;
if (modSelected)
{
otherListObject.selected = -1;
Engine.GetGUIObjectByName("visitWebButton").enabled = true;
let toggleModButton = Engine.GetGUIObjectByName("toggleModButton");
toggleModButton.caption = listObjectName == "modsDisabledList" ? "Enable" : "Disable";
toggleModButton.enabled = true;
toggleModButton.onPress = listObjectName == "modsDisabledList" ? enableMod : disableMod;
Engine.GetGUIObjectByName("enabledModUp").enabled = listObjectName == "modsEnabledList";
Engine.GetGUIObjectByName("enabledModDown").enabled = listObjectName == "modsEnabledList";
}
Engine.GetGUIObjectByName("visitWebButton").enabled = modSelected && !!getSelectedModUrl();
toggleModButton.caption = listObjectName == "modsDisabledList" ?
translateWithContext("mod activation", "Enable") :
translateWithContext("mod activation", "Disable");
toggleModButton.enabled = modSelected;
Engine.GetGUIObjectByName("enabledModUp").enabled = modSelected && listObjectName == "modsEnabledList" && !areFilters();
Engine.GetGUIObjectByName("enabledModDown").enabled = modSelected && listObjectName == "modsEnabledList" && !areFilters();
Engine.GetGUIObjectByName("globalModDescription").caption =
listObject.list[listObject.selected] ?
g_Mods[listObject.list[listObject.selected]].description :
'[color="' + g_ColorNoModSelected + '"]' + translate("No mod has been selected.") + '[/color]';
}
function visitModWebsite()
/**
* @returns {string} The url of the currently selected mod.
*/
function getSelectedModUrl()
{
let modsEnabledList = Engine.GetGUIObjectByName("modsEnabledList");
let modsDisabledList = Engine.GetGUIObjectByName("modsDisabledList");
let list = modsEnabledList.selected == -1 ? modsDisabledList : modsEnabledList;
let folder = list.list_folder[list.selected];
let url = folder && g_Mods[folder] && g_Mods[folder].url;
return folder && g_Mods[folder] && g_Mods[folder].url || undefined;
}
function visitModWebsite()
{
let url = getSelectedModUrl();
if (!url)
return;
+11 -13
View File
@@ -5,7 +5,7 @@
<script directory="gui/common/"/>
<script directory="gui/modmod/"/>
<object type="image" style="ModernWindow" size="0 0 100% 100%">
<object type="image" style="ModernWindow">
<!-- Page Title -->
<object style="ModernLabelText" type="text" size="50%-128 4 50%+128 36">
@@ -21,6 +21,7 @@
>
<action on="Press">applyFilters();</action>
<action on="TextEdit">applyFilters();</action>
<translatableAttribute id="placeholder_text">Filter</translatableAttribute>
</object>
<!-- Checkboxes -->
@@ -29,7 +30,6 @@
checked="false"
style="ModernTickBox"
size="186 0 206 100%"
font="serif-bold-13"
>
<action on="Press">applyFilters();</action>
</object>
@@ -50,7 +50,7 @@
</object>
<!-- Available Mods Wrapper -->
<object size="16 66 100%-15 62%" style="ModmodScrollbar">
<object size="16 66 100%-15 62%">
<object style="ModernLabelText" type="text" size="0 5 100% 25">
<translatableAttribute id="caption">Available Mods</translatableAttribute>
@@ -163,10 +163,8 @@
</object>
<!-- MOD-SPECIFIC BUTTONS -->
<object name="toggleModButton" type="button" style="ModernButtonRed" size="16 100%-80 236 100%-52" enabled="false">
<translatableAttribute id="caption">Enable/Disable</translatableAttribute>
</object>
<object name="visitWebButton" type="button" style="ModernButtonRed" size="240 100%-80 460 100%-52" enabled="false">
<object name="toggleModButton" type="button" style="ModernButtonRed" size="16 100%-80 196 100%-52" enabled="false"/>
<object name="visitWebButton" type="button" style="ModernButtonRed" size="200 100%-80 380 100%-52" enabled="false">
<translatableAttribute id="caption">Visit Website</translatableAttribute>
<action on="Press">visitModWebsite();</action>
</object>
@@ -175,32 +173,32 @@
<object name="message" type="text" size="466 100%-78 100%-15 100%-52" text_align="left" textcolor="white"/>
<!-- BUTTONS -->
<object name="quitButton" type="button" style="ModernButtonRed" size="100%-994 100%-44 100%-804 100%-16">
<object name="quitButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16">
<translatableAttribute id="caption">Quit</translatableAttribute>
<action on="Press">Engine.Exit();</action>
</object>
<object name="cancelButton" type="button" style="ModernButtonRed" size="100%-994 100%-44 100%-804 100%-16" hotkey="cancel">
<object name="cancelButton" type="button" style="ModernButtonRed" size="100%-932 100%-44 100%-752 100%-16" hotkey="cancel">
<translatableAttribute id="caption">Cancel</translatableAttribute>
<action on="Press">closePage();</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-800 100%-44 100%-610 100%-16">
<object type="button" style="ModernButtonRed" size="100%-748 100%-44 100%-568 100%-16">
<translatableAttribute id="caption">Help</translatableAttribute>
<action on="Press">Engine.PushGuiPage("page_modhelp.xml");</action>
</object>
<object type="button" style="ModernButtonRed" size="100%-606 100%-44 100%-412 100%-16">
<object type="button" style="ModernButtonRed" size="100%-564 100%-44 100%-384 100%-16">
<translatableAttribute id="caption">Download Mods</translatableAttribute>
<action on="Press">downloadModsButton();</action>
</object>
<object name="saveConfigurationButton" type="button" style="ModernButtonRed" size="100%-408 100%-44 100%-214 100%-16">
<object name="saveConfigurationButton" type="button" style="ModernButtonRed" size="100%-380 100%-44 100%-200 100%-16">
<translatableAttribute id="caption">Save Configuration</translatableAttribute>
<action on="Press">saveMods();</action>
</object>
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-210 100%-44 100%-16 100%-16">
<object name="startModsButton" type="button" style="ModernButtonRed" size="100%-196 100%-44 100%-16 100%-16">
<translatableAttribute id="caption">Start Mods</translatableAttribute>
<action on="Press">startMods();</action>
</object>
@@ -26,7 +26,5 @@ function downloadModsButton()
function openModIo(data)
{
if (data.accepted)
Engine.PushGuiPage("page_modio.xml", {
"callback": "initMods"
});
Engine.PushGuiPage("page_modio.xml", {}, initMods);
}
@@ -8,7 +8,6 @@
scrollbar_style="ModernScrollBar"
scroll_bottom="true"
textcolor="white"
textcolor_selected="gold"
text_align="left"
text_valign="center"
/>
@@ -5,7 +5,7 @@ const g_ModProperties = {
"type": "string",
"validate": validateName
},
// example: "0.0.23"
// example: "0.0.24"
"version": {
"required": true,
"type": "string",
+4 -11
View File
@@ -28,22 +28,15 @@ function init(data)
let mbButton = [];
captions.forEach((caption, i) => {
mbButton[i] = Engine.GetGUIObjectByName("mbButton" + (i + 1));
let action = function()
{
if (data.callback)
Engine.PopGuiPageCB(i);
else
Engine.PopGuiPage();
};
mbButton[i].caption = caption;
mbButton[i].onPress = action;
mbButton[i].hidden = false;
mbButton[i].onPress = () => {
Engine.PopGuiPage(i);
};
// Convention: Cancel is the first button
if (i == 0)
mbCancelHotkey.onPress = action;
mbCancelHotkey.onPress = mbButton[i].onPress;
});
// Distribute buttons horizontally
+1 -1
View File
@@ -6,7 +6,7 @@
<script directory="gui/msgbox/"/>
<!-- Fade out the background because it's non-interactable -->
<object sprite="ModernFade" type="image" z="0"/>
<object sprite="ModernFade" type="image"/>
<object name="mbCancelHotkey" hotkey="cancel" />
<object name="mbMain"
style="ModernDialog"
@@ -47,7 +47,7 @@ function initURLButtons(termsURL, urlButtons)
function initLanguageSelection()
{
let languageLabel = Engine.GetGUIObjectByName("languageLabel");
let languageLabelWidth = Engine.GetTextWidth(languageLabel.font, languageLabel.caption)
let languageLabelWidth = Engine.GetTextWidth(languageLabel.font, languageLabel.caption);
languageLabel.size = "0 0 " + languageLabelWidth + " 100%";
let languageDropdown = Engine.GetGUIObjectByName("languageDropdown");
@@ -82,7 +82,7 @@ function initLanguageSelection()
function closeTerms(accepted)
{
Engine.PopGuiPageCB({
Engine.PopGuiPage({
"page": g_TermsPage,
"accepted": accepted
});
@@ -4,7 +4,7 @@
<script directory="gui/common/"/>
<script directory="gui/termsdialog/"/>
<object type="image" z="0" sprite="ModernFade"/>
<object type="image" sprite="ModernFade"/>
<object type="image" style="ModernDialog" size="50%-360 50%-290 50%+360 50%+290">
+25 -12
View File
@@ -1,4 +1,4 @@
/* Copyright (C) 2015 Wildfire Games.
/* Copyright (C) 2020 Wildfire Games.
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
@@ -219,6 +219,11 @@ function RunDetection(settings)
if (GL_VERSION.match(/^[3-9]/))
enable_glsl = true;
// Enable GLSL on OpenGL ES 2.0+, which doesnt support the fixed
// function fallbacks
if (GL_VERSION.match(/^OpenGL ES /))
enable_glsl = true;
// Enable most graphics options on OpenGL 4+, which should be
// able to properly manage them
if (GL_VERSION.match(/^[4-9]/))
@@ -353,30 +358,38 @@ global.RunHardwareDetection = function(settings)
if (output.disable_audio !== undefined)
Engine.SetDisableAudio(output.disable_audio);
if (output.disable_s3tc !== undefined)
Engine.SetDisableS3TC(output.disable_s3tc);
if (output.disable_shadows !== undefined)
Engine.SetDisableShadows(output.disable_shadows);
Engine.ConfigDB_CreateValue("hwdetect", "shadows", (!output.disable_shadows).toString());
if (output.disable_shadowpcf !== undefined)
Engine.SetDisableShadowPCF(output.disable_shadowpcf);
Engine.ConfigDB_CreateValue("hwdetect", "shadowpcf", (!output.disable_shadowpcf).toString());
if (output.disable_allwater !== undefined)
Engine.SetDisableAllWater(output.disable_allwater);
{
Engine.ConfigDB_CreateValue("hwdetect", "watereffects", (!output.disable_allwater).toString());
Engine.ConfigDB_CreateValue("hwdetect", "waterfancyeffects", (!output.disable_allwater).toString());
Engine.ConfigDB_CreateValue("hwdetect", "waterrealdepth", (!output.disable_allwater).toString());
Engine.ConfigDB_CreateValue("hwdetect", "watershadows", (!output.disable_allwater).toString());
Engine.ConfigDB_CreateValue("hwdetect", "waterrefraction", (!output.disable_allwater).toString());
Engine.ConfigDB_CreateValue("hwdetect", "waterreflection", (!output.disable_allwater).toString());
}
if (output.disable_fancywater !== undefined)
Engine.SetDisableFancyWater(output.disable_fancywater);
{
Engine.ConfigDB_CreateValue("hwdetect", "waterfancyeffects", (!output.disable_fancywater).toString());
Engine.ConfigDB_CreateValue("hwdetect", "waterrealdepth", (!output.disable_fancywater).toString());
Engine.ConfigDB_CreateValue("hwdetect", "watershadows", (!output.disable_fancywater).toString());
}
if (output.enable_glsl !== undefined)
Engine.SetEnableGLSL(output.enable_glsl);
Engine.ConfigDB_CreateValue("hwdetect", "preferglsl", (output.enable_glsl).toString());
if (output.enable_postproc !== undefined)
Engine.SetEnablePostProc(output.enable_postproc);
Engine.ConfigDB_CreateValue("hwdetect", "postproc", (output.enable_postproc).toString());
if (output.enable_smoothlos !== undefined)
Engine.SetEnableSmoothLOS(output.enable_smoothlos);
Engine.ConfigDB_CreateValue("hwdetect", "smoothlos", (output.enable_smoothlos).toString());
if (output.override_renderpath !== undefined)
Engine.SetRenderPath(output.override_renderpath);
Engine.ConfigDB_CreateValue("hwdetect", "renderpath", (output.override_renderpath).toString());
};
+1 -1
View File
@@ -31,7 +31,7 @@ for (var settings of hwdetectTestData)
var disabled = [];
for (var d of ["disable_audio", "disable_s3tc", "disable_shadows", "disable_shadowpcf", "disable_allwater", "disable_fancywater", "override_renderpath"])
if (output[d] !== undefined)
disabled.push(d+"="+output[d])
disabled.push(d+"="+output[d]);
print("<tr>");
print("<td>" + os);
@@ -0,0 +1,15 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
PARAM add_color = program.local[1];
TEMP color;
MOV color, add_color;
MAD color.rgb, color, tex_color.a, tex_color;
MOV color.a, tex_color.a;
MOV result.color, color;
END
@@ -0,0 +1,16 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_add.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_add.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
<uniform name="color" loc="1" type="vec4"/>
</fragment>
</program>
@@ -0,0 +1,5 @@
!!ARBfp1.0
TEX result.color, fragment.texcoord[0], texture[0], 2D;
END
@@ -0,0 +1,16 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_basic.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_basic.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
</fragment>
</program>
@@ -0,0 +1,18 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
TEMP grayscale;
MOV grayscale.r, 0.3;
MOV grayscale.g, 0.59;
MOV grayscale.b, 0.11;
MOV grayscale.a, 0.0;
TEMP color;
DP3 color.rgb, tex_color, grayscale;
MOV color.a, tex_color.a;
MOV result.color, color;
END
@@ -0,0 +1,16 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_grayscale.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_grayscale.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
</fragment>
</program>
@@ -0,0 +1,7 @@
!!ARBfp1.0
PARAM color = program.local[0];
MOV result.color, color;
END
@@ -0,0 +1,14 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
END
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_solid.vp">
<uniform name="transform" loc="0" type="mat4"/>
<stream name="pos"/>
</vertex>
<fragment file="arb/gui_solid.fp">
<uniform name="color" loc="0" type="vec4"/>
</fragment>
</program>
@@ -0,0 +1,14 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
PARAM add_color = program.local[1];
TEMP color;
MOV color, add_color;
MUL color.a, color.a, tex_color.a;
MOV result.color, color;
END
@@ -0,0 +1,16 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_solid_mask.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_solid_mask.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
<uniform name="color" loc="1" type="vec4"/>
</fragment>
</program>
@@ -0,0 +1,15 @@
!!ARBfp1.0
TEMP tex_color;
TEX tex_color, fragment.texcoord[0], texture[0], 2D;
PARAM add_color = program.local[1];
PARAM mul_color = program.local[2];
TEMP color;
ADD color, tex_color, add_color;
MUL color, color, mul_color;
MOV result.color, color;
END
@@ -0,0 +1,16 @@
!!ARBvp1.0
PARAM transform[4] = { program.local[0..3] };
TEMP position;
DP4 position.x, transform[0], vertex.position;
DP4 position.y, transform[1], vertex.position;
DP4 position.z, transform[2], vertex.position;
MOV position.w, 1.0;
MOV result.position, position;
MOV result.texcoord[0], vertex.texcoord[0];
END
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<program type="arb">
<vertex file="arb/gui_text.vp">
<stream name="pos"/>
<stream name="uv0"/>
<uniform name="transform" loc="0" type="mat4"/>
</vertex>
<fragment file="arb/gui_text.fp">
<uniform name="tex" loc="0" type="sampler2D"/>
<uniform name="colorAdd" loc="1" type="vec4"/>
<uniform name="colorMul" loc="2" type="vec4"/>
</fragment>
</program>
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_add"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_add"/>
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_basic"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_basic"/>
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_grayscale"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_grayscale"/>
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_solid"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_solid"/>
@@ -1,6 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_solid_mask"/>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_solid"/>
@@ -1,6 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<effect>
<technique>
<require shaders="arb"/>
<pass shader="arb/gui_text">
<blend src="src_alpha" dst="one_minus_src_alpha"/>
</pass>
</technique>
<technique>
<require shaders="fixed"/>
<pass shader="fixed:gui_text">
@@ -1,7 +1,6 @@
#version 110
uniform sampler2D tex;
uniform vec4 color;
varying vec2 v_tex;
+71 -71
View File
@@ -1,71 +1,71 @@
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element actor {
attribute version { xsd:positiveInteger }, (
element group {
element variant {
attribute name { text }? &
attribute file { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
element mesh {
text
}? &
element textures {
element texture {
attribute file { text }? &
attribute name { text }
}*
}? &
element decal {
attribute width { xsd:float } & # X
attribute depth { xsd:float } & # Z
attribute angle { xsd:float } &
attribute offsetx { xsd:float } &
attribute offsetz { xsd:float }
}? &
element particles {
attribute file { text }
}? &
element color { list {
xsd:nonNegativeInteger, # R
xsd:nonNegativeInteger, # G
xsd:nonNegativeInteger # B
} }? &
element animations {
element animation {
attribute name { text } &
attribute id { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
attribute file { text }? &
attribute speed { xsd:nonNegativeInteger } &
attribute event { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute load { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute sound { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }?
}*
}? &
element props {
element prop {
(attribute actor { text }? &
attribute attachpoint { text } &
attribute minheight { xsd:float }? &
attribute maxheight { xsd:float }? &
attribute selectable { "true" | "false" }?)
}*
}?
}*
}* &
element castshadow { # flag; true if present
empty
}? &
element float { # flag; true if present
empty
}? &
element material {
text
}?
)
}
namespace a = "http://relaxng.org/ns/compatibility/annotations/1.0"
##
# NOTE: To modify this Relax NG grammar, edit the Relax NG Compact (.rnc) file
# and use a converter tool like trang to generate the Relax NG XML (.rng) file
##
element actor {
attribute version { xsd:positiveInteger }, (
element group {
element variant {
attribute name { text }? &
attribute file { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
element mesh {
text
}? &
element textures {
element texture {
attribute file { text }? &
attribute name { text }
}*
}? &
element decal {
attribute width { xsd:float } & # X
attribute depth { xsd:float } & # Z
attribute angle { xsd:float } &
attribute offsetx { xsd:float } &
attribute offsetz { xsd:float }
}? &
element particles {
attribute file { text }
}? &
element color { list {
xsd:nonNegativeInteger, # R
xsd:nonNegativeInteger, # G
xsd:nonNegativeInteger # B
} }? &
element animations {
element animation {
attribute name { text } &
attribute id { text }? &
attribute frequency { xsd:nonNegativeInteger }? &
attribute file { text }? &
attribute speed { xsd:nonNegativeInteger } &
attribute event { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute load { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }? &
attribute sound { xsd:decimal { minInclusive = "0" maxInclusive = "1" } }?
}*
}? &
element props {
element prop {
(attribute actor { text }? &
attribute attachpoint { text } &
attribute minheight { xsd:float }? &
attribute maxheight { xsd:float }? &
attribute selectable { "true" | "false" }?)
}*
}?
}*
}* &
element castshadow { # flag; true if present
empty
}? &
element float { # flag; true if present
empty
}? &
element material {
text
}?
)
}
@@ -1,22 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<mesh>skeletal/bear.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Fur-Brown">
<textures><texture file="skeletal/animal_bear_brown.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant name="death">
<props>
<prop actor="props/units/blood_01.xml" attachpoint="root"/>
</props>
</variant>
</group>
</actor>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Mesh">
<mesh>skeletal/bear.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Fur-Black">
<textures>
<texture file="skeletal/animal_bear_black.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant file="quadraped/base_bear.xml"/>
<variant file="quadraped/base_bear_death.xml"/>
</group>
<material>default.xml</material>
</actor>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Mesh">
<mesh>skeletal/bear.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Fur-Brown">
<textures>
<texture file="skeletal/animal_bear_brown.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant file="quadraped/base_bear.xml"/>
<variant file="quadraped/base_bear_death.xml"/>
</group>
<material>default.xml</material>
</actor>
@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Mesh">
<mesh>skeletal/bear_polar.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Fur-White">
<textures>
<texture file="skeletal/animal_bear_white.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant file="quadraped/base_bear.xml"/>
<variant file="quadraped/base_bear_death.xml"/>
</group>
<material>default.xml</material>
</actor>
@@ -2,21 +2,26 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Mesh">
<variant frequency="100" name="Boar">
<animations>
<animation file="quadraped/boar_idle_01.dae" name="Idle" speed="15"/>
<animation file="quadraped/boar_idle_02.dae" name="Idle" speed="60"/>
<animation file="quadraped/boar_attack.dae" name="attack_melee" speed="120"/>
<animation file="quadraped/boar_walk.dae" name="Walk" speed="25"/>
<animation file="quadraped/boar_run.dae" name="Run" speed="8"/>
<animation file="quadraped/boar_death.dae" name="Death" speed="75"/>
<animation file="quadraped/animal_boar_idle_02.dae" name="Idle" speed="10"/>
<animation file="quadraped/animal_boar_attack_01.dae" name="attack_melee" speed="120"/>
<animation file="quadraped/animal_boar_walk_01.dae" name="Walk" speed="10"/>
<animation file="quadraped/animal_boar_run_01.dae" name="Run" speed="8"/>
<animation file="quadraped/animal_boar_death_01.dae" name="Death" speed="50"/>
</animations>
<mesh>skeletal/boar.dae</mesh>
<mesh>skeletal/animal_boar.dae</mesh>
<textures>
<texture file="skeletal/animal_boar_01.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="texture">
<textures><texture file="skeletal/animal_boar.dds" name="baseTex"/></textures>
<variant frequency="100" name="normal"/>
<variant frequency="0" name="feeding">
<animations>
<animation file="quadraped/animal_boar_idle_01.dae" name="Idle" speed="10"/>
</animations>
</variant>
</group>
<group>
@@ -27,4 +32,5 @@
</props>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/base_bovidae_wild.xml" name="Base"/>
</group>
<group>
<variant frequency="1" name="Bull_a">
<mesh>skeletal/bull_a.dae</mesh>
</variant>
<variant frequency="1" name="Bull_a">
<mesh>skeletal/bull_b.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Black">
<textures>
<texture file="skeletal/animal_cattle_black.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant file="quadraped/base_bovidae_death.xml" name="death"/>
</group>
<material>default.xml</material>
</actor>
@@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" file="quadraped/base_camel_fauna.xml">
<variant>
<mesh>skeletal/camel.dae</mesh>
<props>
<prop actor="props/camel/teeths.xml" attachpoint="mouth_bot"/>
@@ -27,7 +27,7 @@
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant file="quadraped/base_camel_fauna.xml"/>
<variant file="quadraped/base_camel_run.xml" />
<variant file="quadraped/base_camel_death.xml" />
</group>
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/base_bovidae_wild.xml" name="Base"/>
</group>
<group>
<variant frequency="1" name="cattle_horned">
<mesh>skeletal/cattle_female_a.dae</mesh>
</variant>
<variant frequency="1" name="cattle_unhorned">
<mesh>skeletal/cattle_female_b.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Black and White">
<textures>
<texture file="skeletal/animal_cattle_black_and_white.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="1" name="beige">
<textures>
<texture file="skeletal/animal_cattle_beige.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="1" name="White and Brown">
<textures>
<texture file="skeletal/animal_zebu_white_and_brown.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="100" name="Idle"/>
<variant file="quadraped/base_bovidae_death.xml" name="death"/>
</group>
<material>default.xml</material>
</actor>
@@ -8,11 +8,27 @@
<animation file="quadraped/deer_idle_02.dae" name="idle" speed="20"/>
<animation file="quadraped/deer_idle_03.dae" name="idle" speed="20"/>
<animation file="quadraped/deer_walk_01.dae" name="walk" speed="35"/>
<animation file="quadraped/deer_run_01.dae" name="run" speed="20"/>
<animation file="quadraped/deer_run_01.dae" name="run" speed="15"/>
<animation file="quadraped/deer_attack_01.dae" name="attack_melee" speed="20"/>
</animations>
<mesh>skeletal/deer_mesh.dae</mesh>
<textures><texture file="skeletal/animal_deer.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Base-Grey">
<textures>
<texture file="skeletal/animal_deer_01.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown">
<textures>
<texture file="skeletal/animal_deer_02.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown-Freckles">
<textures>
<texture file="skeletal/animal_deer_03.png" name="baseTex"/>
</textures>
</variant>
</group>
<group>
@@ -47,4 +63,5 @@
</props>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" name="Male-Vigilant">
<mesh>gaia/temp_deer_1.dae</mesh>
@@ -14,11 +12,22 @@
<mesh>gaia/temp_deer_3.dae</mesh>
</variant>
</group>
<group>
<variant frequency="1" name="Fur">
<textures><texture file="skeletal/animal_deer.dds" name="baseTex"/></textures>
<variant frequency="100" name="Base-Grey">
<textures>
<texture file="skeletal/animal_deer_01.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown">
<textures>
<texture file="skeletal/animal_deer_02.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown-Freckles">
<textures>
<texture file="skeletal/animal_deer_03.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -1,13 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<mesh>gaia/temp_deer_2.dae</mesh>
<textures><texture file="skeletal/animal_deer.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Base-Grey">
<textures>
<texture file="skeletal/animal_deer_01.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown">
<textures>
<texture file="skeletal/animal_deer_02.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown-Freckles">
<textures>
<texture file="skeletal/animal_deer_03.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -1,13 +1,27 @@
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<actor version="1">
<castshadow/>
<group>
<variant frequency="100" name="Base">
<mesh>gaia/temp_deer_3.dae</mesh>
<textures><texture file="skeletal/animal_deer.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="Base-Grey">
<textures>
<texture file="skeletal/animal_deer_01.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown">
<textures>
<texture file="skeletal/animal_deer_02.png" name="baseTex"/>
</textures>
</variant>
<variant frequency="100" name="Base-Brown-Freckles">
<textures>
<texture file="skeletal/animal_deer_03.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -6,10 +6,12 @@
<animations>
<animation file="quadraped/donkey_idle_01.dae" name="idle" speed="10"/>
<animation file="quadraped/donkey_death_01.dae" name="death" speed="40"/>
<animation file="quadraped/donkey_walk_01.dae" name="walk" speed="15"/>
<animation file="quadraped/donkey_walk_01.dae" name="walk" speed="25"/>
</animations>
<mesh>skeletal/donkey.dae</mesh>
<textures><texture file="skeletal/animal_donkey.dds" name="baseTex"/></textures>
<textures>
<texture file="skeletal/animal_donkey.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
@@ -20,4 +22,5 @@
</props>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -18,5 +18,5 @@
</textures>
</variant>
</group>
<material>basic_trans.xml</material>
<material>default.xml</material>
</actor>
@@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/base_elephant_african_bush_infant.xml">
<variant file="quadraped/base_elephant_infant.xml">
<mesh>skeletal/elephant_african_baby.dae</mesh>
<textures>
<texture file="skeletal/animal-elephant-base-baby.dds" name="baseTex"/>
@@ -14,5 +14,5 @@
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_trans.xml</material>
<material>default.xml</material>
</actor>
@@ -15,5 +15,5 @@
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_trans_spec.xml</material>
<material>no_trans_spec.xml</material>
</actor>
@@ -2,7 +2,7 @@
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/base_elephant_asian_armor.xml">
<variant file="quadraped/base_elephant_african.xml">
<mesh>skeletal/elephant_african_forest.dae</mesh>
<textures>
<texture file="skeletal/animal-elephant-base.dds" name="baseTex"/>
@@ -15,5 +15,5 @@
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_trans_spec.xml</material>
<material>no_trans_spec.xml</material>
</actor>
@@ -16,5 +16,5 @@
<variant file="quadraped/base_elephant_death.xml"/>
<variant file="quadraped/base_elephant_run.xml"/>
</group>
<material>basic_trans_parallax_spec.xml</material>
<material>no_trans_parallax_spec.xml</material>
</actor>
@@ -2,9 +2,13 @@
<actor version="1">
<castshadow/>
<group>
<variant name="Fox (Arctic)">
<variant file="quadraped/base_fox.xml" frequency="1" name="Fox">
<mesh>skeletal/fox.dae</mesh>
<textures><texture file="skeletal/animal_fox_arctic.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="1" name="Arctic">
<textures><texture file="skeletal/animal_fox_arctic.png" name="baseTex"/></textures>
</variant>
</group>
<group>
@@ -2,9 +2,13 @@
<actor version="1">
<castshadow/>
<group>
<variant name="Fox (Red)">
<variant file="quadraped/base_fox.xml" frequency="1" name="Fox">
<mesh>skeletal/fox.dae</mesh>
<textures><texture file="skeletal/animal_fox_red.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="1" name="Red">
<textures><texture file="skeletal/animal_fox_red.png" name="baseTex"/></textures>
</variant>
</group>
<group>
@@ -2,38 +2,43 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="2" name="male">
<variant frequency="100" name="base">
<animations>
<animation file="quadraped/deer_idle_01.dae" name="idle" speed="20"/>
<animation file="quadraped/deer_idle_02.dae" name="idle" speed="20"/>
<animation file="quadraped/deer_idle_03.dae" name="idle" speed="20"/>
<animation file="quadraped/deer_idle_04.dae" name="idle" speed="20"/>
<animation file="quadraped/deer_death_01.dae" name="death" speed="40"/>
<animation file="quadraped/deer_walk_01.dae" name="walk" speed="20"/>
<animation file="quadraped/deer_walk_02.dae" name="walk" speed="20"/>
<animation file="quadraped/deer_walk_01.dae" name="walk" speed="35"/>
<animation file="quadraped/deer_run_01.dae" name="run" speed="15"/>
<animation file="quadraped/deer_attack_01.dae" name="attack_melee" speed="20"/>
</animations>
<mesh>skeletal/deer_mesh.dae</mesh>
<textures>
<texture file="skeletal/animal_gazelle_02.dds" name="baseTex"/>
</textures>
</variant>
</group>
<group>
<variant frequency="2" name="male">
<animations>
<animation file="quadraped/deer_death_01.dae" name="death" speed="40"/>
</animations>
<props>
<prop actor="props/fauna/gazelle_horns.xml" attachpoint="antler"/>
</props>
<textures><texture file="skeletal/animal_gazelle_02.dds" name="baseTex"/></textures>
</variant>
<variant frequency="5" name="female">
<animations>
<animation file="quadraped/deer_idle_01.dae" name="idle" speed="5"/>
<animation file="quadraped/deer_idle_02.dae" name="idle" speed="5"/>
<animation file="quadraped/deer_idle_03.dae" name="idle" speed="5"/>
<animation file="quadraped/deer_idle_04.dae" name="idle" speed="5"/>
<animation file="quadraped/deer_death_02.dae" name="death" speed="40"/>
<animation file="quadraped/deer_walk_01.dae" name="walk" speed="20"/>
<animation file="quadraped/deer_walk_02.dae" name="walk" speed="20"/>
<animation file="quadraped/deer_run_01.dae" name="run" speed="15"/>
<animation file="quadraped/deer_attack_01.dae" name="attack_melee" speed="20"/>
</animations>
<mesh>skeletal/deer_mesh.dae</mesh>
<textures><texture file="skeletal/animal_gazelle_02.dds" name="baseTex"/></textures>
</variant>
</group>
<group>
<variant frequency="100" name="normal"/>
<variant frequency="0" name="feeding">
<animations>
<animation file="quadraped/deer_idle_04.dae" name="idle" speed="20"/>
<animation file="quadraped/deer_walk_02.dae" name="walk" speed="20"/>
</animations>
</variant>
</group>
<group>
@@ -44,4 +49,5 @@
</props>
</variant>
</group>
<material>default.xml</material>
</actor>
@@ -4,24 +4,24 @@
<float/>
<group>
<variant>
<animations>
<animation file="other/hawk_flight.dae" name="Walk" speed="10"/>
<animation file="other/hawk_glide.dae" name="Walk" speed="3"/>
<animation file="other/hawk_flight.dae" name="Idle" speed="40"/>
<animation file="other/hawk_glide.dae" name="Idle" speed="3"/>
</animations>
<animations>
<animation file="other/hawk_flight.dae" name="Walk" speed="10"/>
<animation file="other/hawk_glide.dae" name="Walk" speed="3"/>
<animation file="other/hawk_flight.dae" name="Idle" speed="40"/>
<animation file="other/hawk_glide.dae" name="Idle" speed="3"/>
</animations>
<mesh>skeletal/hawk.dae</mesh>
</variant>
</group>
<group>
<variant name="hawk a">
<textures>
<texture file="skeletal/animal_hawk.png" name="baseTex"/>
<texture file="skeletal/animal_hawk.png" name="baseTex"/>
</textures>
</variant>
<variant name="hawk b">
<textures>
<texture file="skeletal/animal_hawk2.png" name="baseTex"/>
<texture file="skeletal/animal_hawk2.png" name="baseTex"/>
</textures>
</variant>
</group>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<actor version="1">
<castshadow/>
<group>
<variant file="quadraped/base_hippopotamus.xml">
<mesh>skeletal/fauna_hippopotamus.dae</mesh>
<textures>
<texture file="skeletal/fauna_hippopotamus_spec.png" name="specTex"/>
</textures>
</variant>
</group>
<group>
<variant name="Black" frequency="1">
<textures>
<texture file="skeletal/fauna_hippopotamus_01.png" name="baseTex"/>
</textures>
</variant>
<variant name="Brown" frequency="1">
<textures>
<texture file="skeletal/fauna_hippopotamus_02.png" name="baseTex"/>
</textures>
</variant>
</group>
<material>no_trans_spec.xml</material>
</actor>
@@ -2,46 +2,26 @@
<actor version="1">
<castshadow/>
<group>
<variant frequency="1" file="quadraped/base_horse_fauna.xml" name="fauna horse">
<mesh>skeletal/horse.dae</mesh>
<variant>
<mesh>skeletal/horse_celtic.dae</mesh>
</variant>
</group>
<group>
<variant frequency="16" name="black">
<textures>
<texture file="skeletal/horse_black_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="brown">
<textures>
<texture file="skeletal/horse_brown_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="16" name="chestnut">
<textures>
<texture file="skeletal/horse_chestnut_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="dun">
<textures>
<texture file="skeletal/horse_dun_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="gray">
<textures>
<texture file="skeletal/horse_gray_a.dds" name="baseTex"/>
</textures>
</variant>
<variant frequency="17" name="tan">
<textures>
<texture file="skeletal/horse_tan_a.dds" name="baseTex"/>
</textures>
</variant>
<variant file="quadraped/horse/brown.xml" frequency="1" name="brown"/>
<variant file="quadraped/horse/black.xml" frequency="1" name="black"/>
<variant file="quadraped/horse/beige.xml" frequency="1" name="beige"/>
<variant file="quadraped/horse/tan.xml" frequency="1" name="tan"/>
<variant file="quadraped/horse/cherrybay.xml" frequency="1" name="cherrybay"/>
<variant file="quadraped/horse/white.xml" frequency="1" name="white"/>
<variant file="quadraped/horse/gray.xml" frequency="1" name="gray"/>
<variant file="quadraped/horse/halflinger.xml" frequency="1" name="halflinger"/>
<variant file="quadraped/horse/bay_01.xml" frequency="1" name="bay_01"/>
<variant file="quadraped/horse/bay_02.xml" frequency="1" name="bay_02"/>
</group>
<group>
<variant frequency="1" name="Idle"/>
<variant file="quadraped/base_horse_fauna.xml" name="Horse-Fauna" frequency="1"/>
<variant file="quadraped/base_horse_death.xml"/>
<variant file="quadraped/base_horse_run.xml"/>
</group>
<material>basic_trans.xml</material>
<material>no_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant>
<mesh>skeletal/horse_breed.dae</mesh>
</variant>
</group>
<group>
<variant file="quadraped/horse/breed_brown.xml" frequency="1" name="brown"/>
<variant file="quadraped/horse/breed_black.xml" frequency="1" name="black"/>
<variant file="quadraped/horse/breed_beige.xml" frequency="1" name="beige"/>
<variant file="quadraped/horse/breed_tan.xml" frequency="1" name="tan"/>
<variant file="quadraped/horse/breed_cherrybay.xml" frequency="1" name="cherrybay"/>
<variant file="quadraped/horse/breed_white.xml" frequency="1" name="white"/>
<variant file="quadraped/horse/breed_gray.xml" frequency="1" name="gray"/>
<variant file="quadraped/horse/breed_halflinger.xml" frequency="1" name="halflinger"/>
<variant file="quadraped/horse/breed_bay_01.xml" frequency="1" name="bay_01"/>
<variant file="quadraped/horse/breed_bay_02.xml" frequency="1" name="bay_02"/>
</group>
<group>
<variant file="quadraped/base_horse_breed_fauna.xml" name="Horse-Fauna" frequency="1"/>
</group>
<material>no_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant>
<mesh>skeletal/horse_celtic.dae</mesh>
</variant>
</group>
<group>
<variant file="quadraped/horse/brown.xml" frequency="1" name="brown"/>
<variant file="quadraped/horse/black.xml" frequency="1" name="black"/>
<variant file="quadraped/horse/beige.xml" frequency="1" name="beige"/>
<variant file="quadraped/horse/tan.xml" frequency="1" name="tan"/>
<variant file="quadraped/horse/cherrybay.xml" frequency="1" name="cherrybay"/>
<variant file="quadraped/horse/white.xml" frequency="1" name="white"/>
<variant file="quadraped/horse/gray.xml" frequency="1" name="gray"/>
<variant file="quadraped/horse/halflinger.xml" frequency="1" name="halflinger"/>
<variant file="quadraped/horse/bay_01.xml" frequency="1" name="bay_01"/>
<variant file="quadraped/horse/bay_02.xml" frequency="1" name="bay_02"/>
</group>
<group>
<variant file="quadraped/base_horse_fauna.xml" name="Horse-Fauna" frequency="1"/>
<variant file="quadraped/base_horse_death.xml"/>
<variant file="quadraped/base_horse_run.xml"/>
</group>
<material>no_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant>
<mesh>skeletal/horse_lusitano.dae</mesh>
</variant>
</group>
<group>
<variant file="quadraped/horse/black.xml" frequency="1" name="black"/>
<variant file="quadraped/horse/pure_black.xml" frequency="1" name="pure_black"/>
<variant file="quadraped/horse/brown.xml" frequency="1" name="brown"/>
<variant file="quadraped/horse/beige.xml" frequency="1" name="beige"/>
<variant file="quadraped/horse/tan.xml" frequency="1" name="tan"/>
<variant file="quadraped/horse/cherrybay.xml" frequency="1" name="cherrybay"/>
<variant file="quadraped/horse/white.xml" frequency="1" name="white"/>
<variant file="quadraped/horse/gray.xml" frequency="1" name="gray"/>
<variant file="quadraped/horse/halflinger.xml" frequency="1" name="halflinger"/>
<variant file="quadraped/horse/lusitano_01.xml" frequency="1" name="lusitano-01"/>
<variant file="quadraped/horse/lusitano_02.xml" frequency="1" name="lusitano-02"/>
<variant file="quadraped/horse/brown_spotted_01.xml" frequency="1" name="Brown-Spotted-01"/>
</group>
<group>
<variant file="quadraped/base_horse_fauna.xml" name="Horse-Fauna" frequency="1"/>
<variant file="quadraped/base_horse_death.xml"/>
<variant file="quadraped/base_horse_run.xml"/>
</group>
<material>no_trans_parallax_spec.xml</material>
</actor>
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<actor version="1">
<castshadow/>
<group>
<variant>
<mesh>skeletal/horse_marwari.dae</mesh>
</variant>
</group>
<group>
<variant file="quadraped/horse/brown.xml" frequency="1" name="brown"/>
<variant file="quadraped/horse/beige.xml" frequency="1" name="beige"/>
<variant file="quadraped/horse/tan.xml" frequency="1" name="tan"/>
<variant file="quadraped/horse/cherrybay.xml" frequency="1" name="cherrybay"/>
<variant file="quadraped/horse/white.xml" frequency="1" name="white"/>
<variant file="quadraped/horse/gray.xml" frequency="1" name="gray"/>
<variant file="quadraped/horse/halflinger.xml" frequency="1" name="halflinger"/>
<variant file="quadraped/horse/brown_spotted_01.xml" frequency="1" name="Brown-Spotted-01"/>
</group>
<group>
<variant file="quadraped/base_horse_fauna.xml" name="Horse-Fauna" frequency="1"/>
<variant file="quadraped/base_horse_death.xml"/>
<variant file="quadraped/base_horse_run.xml"/>
</group>
<material>no_trans_parallax_spec.xml</material>
</actor>

Some files were not shown because too many files have changed in this diff Show More