- remove `SDL_Delay(100)`
- the progress is now an `std::atomic` (not protected by the mutex
anymore)
Based On Patch By: @vladislavbelov
Accepted By: @wraitii
Differential Revision: https://code.wildfiregames.com/D3676
This was SVN commit r27717.
- 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.
SPECTRE attacks mitigations were added to SpiderMonkey's JIT output in
version 57. Turning these off is a very large speedup, around 10-20%
wall time (on my computer) depending on the map and the situation.
For the most part, from profiling on my machine, this is from memory
fences after JIT -> C++ calls. 0 A.D. does a lot of these.
The SPECTRE class of attack is a timing attack based on speculative
execution to leak sensitive information, and it seems extraordinarily
unlikely that something like this could be successfully mounted using 0
A.D.
Differential Revision: https://code.wildfiregames.com/D5014
This was SVN commit r27699.
Following the AI unthreading in 4df03ed2d2 / D3769, structured clones
are no longer needed to pass the gamestate around.
This is much faster, about 10-15% wall time on an AI 1v1 profile.
This also potentially reduces memory fragmentation and GC needs, as
writing clones allocated a lot of data.
Differential Revision: https://code.wildfiregames.com/D5019
This was SVN commit r27698.
This is unused and makes the function twice as slow as it needs to be.
Differential Revision: https://code.wildfiregames.com/D5015
This was SVN commit r27697.
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.
FaceTowardsTarget is called quite often by UnitAI, and we can skip some
un-necessary messages as an optimisation.
Differential Revision: https://code.wildfiregames.com/D5005
This was SVN commit r27695.
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.