When playing a network game with at least one AI, and an AI dies, after
a while there will be an increasing lag on the system, eventually
freezing the screen for e.g. 4 seconds every 5 seconds.
It turned out that once the AI is dead, the savedEvents grew endlessly.
Causing issues down the line (hashing).
That is now fixed by discarding savedEvents when the AI is defeated.
Patch by: @lairkers
Differential revision: https://code.wildfiregames.com/D5042
Comments by: @phosit, @wraitii
This was SVN commit r27800.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful
Will add linter rule in seperate commit
Happy recompiling everyone!
Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
This differentiates Sparta by giving them P1 champions, a Hero-oriented
team bonus and a new unit.
Sparta should rely heavily on their extremely powerful melee infantry,
hence the focus is on that with choice and upgrade.
Patch by: @borg-
Differential revision: https://code.wildfiregames.com/D4736
Accepted by: @chrstgtr, @real_tabasco_sauce
Comments by: @Langbart, @marder, @wowgetoffyourcellphone
This was SVN commit r27775.
We were incorrectly comparing an object to a number.
I don't think this will drastically change the AI behaviour as it's
rather an edge case.
Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D5030
This was SVN commit r27732.
Since 281bb0b2ec, opening the 'Options' menu in-game will show that
there are pending changes, even if the user has done nothing.
Unfortunately the cinematic logic to hide silhouettes, which comes from
cfd08bbf28, is broken following those changes. We use the configuration
to hide them, which results in us, indeed, changing the configuration.
There isn't really a good short term fix. This change only attemps to
reset the setting if we changed it for a cinematic, which fixes the
issue, but has drawbacks.
Ideally, we would use a superior config level, but we need to be careful
about exposing that to JS.
Reported by: langbart
Fixes#6821
Differential Revision: https://code.wildfiregames.com/D5040
This was SVN commit r27730.
Who says only players should be able to conduct diplomacy?
Also separation of concerns, more maintainable files.
Differential revision: https://code.wildfiregames.com/D4921
Comments by: @elexis, @Stan
Refs. #5894
This was SVN commit r27722.
- Add explicit variables for magic values.
- `let`s to `const`.
- Don't start the regen timer when not needed.
Differential revision: https://code.wildfiregames.com/D4965
Comments by: @Stan
This was SVN commit r27707.
Similar trick to D3446 / c87229aa48 - we can short-circuit if we find
units that match our best possible preference.
This is, in particular, almost a 40% wall time improvement on Combat
Demo Huge, but it should apply in a number of more normal cases.
Differential Revision: https://code.wildfiregames.com/D5020
This was SVN commit r27701.
This functions is amongst the most called in JS, so it's important to
make it speedy.
- Bugfix: if 'originalValue' is falsy, the result was never cached. This
in particular affected the minRange of archers, which is 0. It's a large
optimisation on combatDemoHuge, but the effect elsewhere is less likely
to be noticeable.
- Don't go through the helper to get the player Entity ID, in this case
it's slower.
- Concat is slower than Flat() in this case according to my profiling.
- Some micro-optimisation by strict equality.
Differential Revision: https://code.wildfiregames.com/D5012
This was SVN commit r27696.
Mediterranean Bush (dry)
Stone and Rock fences by @Wow
New props for Briton and Gallic formation standards
New Kushite Shields by @Stan
Saharan capturable farmstead
Celtic Shrine (with improved textures)
Royal Palm tree
This was SVN commit r27677.
According to JIT profiling on SM 115, using ForEach is faster than
iterating.
This is a micro optimisation, maybe 2% faster for OnUpdate, which means
we might see an overall improvement < 0.4%.
The reason this is faster here is that Iterating needs to construct an
array to store the result, whereas ForEach just uses the values
directly. This means this probably doesn't apply to iterating if we
don't need both the key/value pair.
Differential Revision: https://code.wildfiregames.com/D5010
This was SVN commit r27674.
CmpPosition::TurnStart checks whether the territory changed underneath
each entityevery turn. The only user of this is TerritoryDecay
(structures, for the most part). It is rather inefficient to have this
done for all entities.
The simplest solution is to listen to position-changed messages in
TerritoryDecay instead. This should hardly ever happen in vanilla 0
A.D., except in Atlas, so it's basically free.
This sort of reverts 19965ce37a (original implementation) and
c44b48bd59.
Accepted By: Freagarach (concept only)
Differential Revision: https://code.wildfiregames.com/D5009
This was SVN commit r27673.
Right now usernames for the lobby can consist solely of numbers and
special characters. This can result in nonsensical usernames and is
prone to be abused. While we can't entirely prevent nonsensical
usernames, we can at least do a bit better.
Therefore, this adjusts the rules for the validation of new lobby
usernames in pyrogenesis. Previously these rules were:
- length: between 1 and 20 characters
- valid characters: lower- and uppercase letters, numbers, ".", "_", "-"
The new rules are:
- length: between 3 and 20 characters
- valid characters: lower- and uppercase letters, numbers, ".", "_", "-"
- must contain at least one letter
These validation changes are relevant for new user registrations only
and don't affect existing users. As this also just adjusts the
client-side validation, users will also still be able to register
usernames according to the old rules, e.g. when using an older version
of 0 A.D., until the same change gets rolled out at a later point in
time server-side as well.
This was SVN commit r27670.
- Move the Crush damage from Splash to direct hit.
- Reduce overall damage slightly
Accepted By: Feldfeld
Differential Revision: https://code.wildfiregames.com/D5008
This was SVN commit r27668.
Summary:
On macOS Ventura (at least version 13.2.1 and above), the game crashes
instantly when clicking on buttons communicating with the lobby.
This issue is solved by upgrading nettle to 3.9 and GNUTLS to 3.8.
Patch by: froissant
Accepted By: wraitii
Trac Tickets: #6807
Differential Revision: https://code.wildfiregames.com/D5018
This was SVN commit r27667.
Avoid duplication by moving the function to Transform.js.
Add tests to Transform.js
Add tests to TurretHolder.js
Optimize slightly Trainer.js by removing some useless
Engine.QueryInterface calls.
Refs #6784 (symptoms in TriggerHelper.js are fixed underlying cause not)
`SkirmishReplacer` is called before the Modifier Manager so it does not
suffer the same fate.
Entities using `ChangeEntityTemplate` function are still affected.
Maps calling Engine.AddEntity directly are still affected.
Ideally this should be handled by hotloading components instead of
creating new entities each time. See =>
https://code.wildfiregames.com/D4991
Tested using:
908dd631d9
Differential Revision: https://code.wildfiregames.com/D4984
This was SVN commit r27636.
Most of the shaders are explicitely interned by the engine except for
the one called "Model" which is not required (you can have maps with
just terrain for visualization)
The rng files are called by the engine to validate structure.
The game has two overrides for high quality and normal water to be
"ocean" and "default" respectively
The minimap flare folder is hardcoded see #6795
The default material now calls the dummy shader instead of the model one
when in modmod
Move the default skybox, it will be required by _default.xml
The terrain materials are moved as well, for completeness, although they
are currently not referenced.
This commit does not include atlas needed files as it cannot run without
the public mod anyway for now. It will be done in a separate commit when
we have the ingame editor that will require _default.xml for instance.
This commit is also needed to generate the spir-v shaders in the correct
mods, in order to be able to launch the game with mod mod only.
Refs: #6636#5366Fixes: #6294
Differential Revision: https://code.wildfiregames.com/D4906
This was SVN commit r27629.
This fixes packet loss issues on some VPN solutions.
Patch By: sera
Differential Revision: https://code.wildfiregames.com/D4967
This was SVN commit r27599.
Fixes: #6708
Reported by @borg- @andy5995, ticket creation & suggested solutions by
@Langbart
Previous version of the batch accepted by @real_tabasco_sauce, positive
comments from @chrstgtr
Differential Revision: https://code.wildfiregames.com/D4962
This was SVN commit r27585.
Also some cleaning in the statistics tracker.
(`total` is used by the lobby bots and hence not removed.)
References 215a102c27 and #3948.
Differential revision: Don't subtract lifestock from used/gathered
resources.
Tested by: @Langbart
Fixes#6744
This was SVN commit r27562.
Instead of merely walking (totally unwanted in the middle of a fight,
hence I call this a bugfix).
Differential revision: https://code.wildfiregames.com/D4955
This was SVN commit r27561.
When unable to garrison and that is the first rally point, the rest of
the rally point queue is not handled.
The check was introduced in df1d5d2260 because UnitAI didn't guard
garrisoning properly.
Patch by: @Langbart
Differential revision: https://code.wildfiregames.com/D4954Fixes#6746
This was SVN commit r27560.
Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4936
Refs. #6385 by fixing a part of it (the attack plan).
This was SVN commit r27551.
Causing units to not show the gathering animation when close to a
dropsite.
We might want to move this stuff to their respective components.
Differential revision: https://code.wildfiregames.com/D4937
Comments by: @StanFixes#6566
This was SVN commit r27550.
There is some unit-motion/unitAI bug that makes them not reach the
center and hence idleness.
Refs. #6735 by fixing the specific PetraAI <> catafalque case.
Reported and solution by: @Langbart
This was SVN commit r27544.
Introduced when changing the default behaviour to capturing
(82e2619ece).
Also fixes confusing the AI with catafalques (etc.), noticed by
@Langbart at D4933.
Differential revision: https://code.wildfiregames.com/D4934
Tested by: @Langbart, @phosit
This was SVN commit r27532.
Since it is not nice to make the game unusable (citation needed) we'll
emit a warning, which is less not nice.
Reported by: @Langbart
Differential revision: https://code.wildfiregames.com/D4930
Reviewed by: @Langbart
Fixes#6724
This was SVN commit r27531.
Walls should be more helpful as a defensive feature, currently they only
serve to limit movement.
Wall garrisoning is the primary defensive benefit of walls, but only
allowing eight to garrison in a long wall section means these eight
units are quickly dealt with, especially since they are stationary.
Doubling the wall garrison (by adding another row, not by cramming them
side-to-side) not only looks cooler, but also allows a more sizable army
to occupy walls.
Refs.
https://wildfiregames.com/forum/topic/105534-ai-and-the-walls-dilemma/.
Patch by: @real_tabasco_sauce
Differential revision: https://code.wildfiregames.com/D4914
Comments by: @Stan, @wowgetoffyourcellphone
This was SVN commit r27527.
- They had vertexes groups without weights.
- Both of them were unused one incorrectly so.
- Also fix the material while at it.
Refs #6714
This was SVN commit r27515.
Use tokens for required technologies, allowing `-tech` and easier
replacements.
Fixes requiring `replace=""` when replacing techs.
Also a minor fix in the TemplateParser.js for upgrade requirements.
Refs. 9bb9ff8b16.
Differential revision: https://code.wildfiregames.com/D4912
Comments by: @Stan
This was SVN commit r27505.
Reduces unnecessary text.
The corral defines the interval and the animal auras define the amount.
Patch by: @Grapjas
Differential revision: https://code.wildfiregames.com/D4896
Comments by: @Langbart, @StanFixes#6687
This was SVN commit r27487.
Done by creating a function for 'objections' and using that for any
unmet requirements.
Patch by: @abian
Differential revision: https://code.wildfiregames.com/D4899
Comments by: @Langbart
Fixes#6694
This was SVN commit r27484.
- Remove crossbow_training.json from the Han academy
- Adjust the cost of poison arrows and poison blades so that the ranged
upgrade should be the one to cost metal, since ranged units currently
dominate most battles.
- Reduce the obstruction area of rice paddies so that they are easier to
place.
Patch by: @real_tabasco_sauce
Accepted by: @chrstgtr, @wowgetoffyourcellphone
Differential Revision: https://code.wildfiregames.com/D4873
This was SVN commit r27406.
Makes elephants more effective against units and less of a siege weapon.
Animals should not be used as mechanical siege weapons.
Based on a patch by: @Kate
Differential revision: https://code.wildfiregames.com/D4137
Comments by: @marder, @wraitii
This was SVN commit r27391.
Complex requirements were not properly handled by the parsing code.
This makes it a bit more explicit while also handling multiple techs as
requirements.
Reported by: @wowgetoffyourcellphone
Differential revision: https://code.wildfiregames.com/D4833
This was SVN commit r27350.
These give vision to parts of the map to specified players.
Placed some on the skirmish map Miletus Peninsula as an example.
This was SVN commit r27347.