Commit graph

25564 commits

Author SHA1 Message Date
phosit
314e2a58cf
Remove UpdateInitAttributes from CNetClient
The init-attributes can only be changed before the worker runs. It isn't
used before the worker runs. This changes it so that it has to be passed
when the server starts.
With this the `m_InitAttributesQueue` can be removed.
2026-04-11 13:45:00 +02:00
phosit
578aea3b09
Remove CNetClient::SetupServerData
It has to be called before `SetupConnection` is called. Now the
server-data is setup during the constructor.
When connecting using the lobby, the data isn't known at construction
time. Then it is done at the start of  `TryToConnectWithSTUN`.
2026-04-11 13:41:43 +02:00
phosit
19c6977872
Request connection-data in the client constructor
This way it doesn't has to be requested manually and it can't be
requested to late.
2026-04-11 13:41:43 +02:00
phosit
dbe89d10ae
Pass the controllerSecret to the CNet* constructor
It wasn't clear when to call `SetControllerSecret` now it can't be done
wrong. Also the mutex has to be locked less often.
2026-04-11 13:41:23 +02:00
phosit
d33fb147bc
Pass the game password at construction to Net*
CNetClient and CNetServer are constructed for a single match. The
password of a game can not be changed after creating the match. When the
password is passed to the constructor it's not possible to invoke the
functions in the wrong order and the `ENSURE` can be "checked at
compile-time" so to say.
2026-04-11 13:38:58 +02:00
phosit
040e0b29a2
Initialize members in the class of CNet*
Sometimes the order was wrong.
2026-04-11 13:38:53 +02:00
emholt1
96c0d45b14 Fixes for the proto-Germanic names of some units
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
Fixes #8870
2026-04-11 11:01:22 +02:00
Vladislav Belov
cb1fe07540
Removes GetDeviceCommandContext call from CFont
Some checks are pending
checkrefs / lfscheck (push) Waiting to run
checkrefs / checkrefs (push) Waiting to run
lint / cppcheck (push) Waiting to run
lint / copyright (push) Waiting to run
lint / jenkinsfiles (push) Waiting to run
pre-commit / build (push) Waiting to run
We need remove all occurences of GetDeviceCommandContext to be able to
add multithreading support in the future.
2026-04-10 23:53:23 +02:00
Vladislav Belov
68091177ac
Removes ArrayDeleter 2026-04-10 23:03:00 +02:00
phosit
6893654cfc
Do the gamestate compression in the task-manager
Some checks failed
checkrefs / lfscheck (push) Has been cancelled
checkrefs / checkrefs (push) Has been cancelled
lint / cppcheck (push) Has been cancelled
lint / copyright (push) Has been cancelled
lint / jenkinsfiles (push) Has been cancelled
pre-commit / build (push) Has been cancelled
This reduces the stutter when a client joins.
The decompression isn't put on the task manager. As the client would
have to wait for that either way. Also a new polling loop would have to
be introduced.

The compression code is moved to the file transferer so all data send
through it gits compressed.

Refs: #4210
2026-04-09 19:03:46 +02:00
Rodrigo Vegas Sánchez-Ferrero
6a3da535f3 Remove wrong newline in splashscreen.xml
The last new line character is not needed and is in conflict with the translation texts.
2026-04-08 11:21:12 +02:00
Atrik
17b9b6af2a Remove trainer from wagon
This was creating an entity that had a trainer component
without production queue. Which is hazardous.
2026-04-07 10:55:50 +02:00
Vantha
8a2a450686 Align text as usual if the scrollbar is invisible
Previously, while `scrollbar` was set to true, the text was always
vertically aligned to the top, no matter what its `text_valign` was, by
the scrolling logic. However, this was done even when the text's caption
was so short that no scrollbar was required in the first place (and not
rendered). Falling back to the specified `text_valign` value in that case
instead seems like the expected behavior.

On a few occasions in the GUI, the text was supposed to be aligned to
the top in either case, but still set `text_valign` to a different value
(for whatever reason), which didn't have any effect previously. But
now since it does, the values have to be corrected to specify what is
actually desired.
2026-04-06 21:39:18 +02:00
wowgetoffyourcellphone
15cabcf8fc Add waypoint/rally point feedback sound
Update unit_actions.js
Add author of rally sound to credits
Two rally click options
Use new rally_click sound.
2026-04-04 03:49:55 +02:00
Vantha
56a98fa5ee Fix error when toggling session GUI
A typo caused errors when toggling the in-game UI with the hotkey,
because GetGUIObjectByName failed. The issue was introduced in
64de934dd3.
2026-04-03 11:01:22 +02:00
Vantha
9ff42ccae6 Fix unresponsiveness after campaign game ends
Presumably since 094a7c2268, when a game played as part of a campaign
ended (by the player winning or loosing), after closing the victory
dialog by pressing "Stay", the session UI became completely unresponsive,
so that no buttons could be clicked. The cause for this was that the
child page campaigns/default_menu/endgame/page.xml was never closed, so
remained invisibly open above the session GUI and blocked all of the
inputs.
Additionally the Campaign session class tried to close the
page_session.xml page, which was not supposed to happen, it was
introduced by mistake in 094a7c2268 replacing the logic to close the
campaigns/default_menu/endgame/page.xml child page again.
2026-04-01 13:03:56 +02:00
obelix
54764733dd Fix incorrect Germ tech tooltip
Since ec19e5d663 German Support Wagons cannot train Units anymore so 
that Wagon Trains cannot unlock this ability as well.

Reported by @xordspar0
Fixes #8799
2026-03-31 20:43:33 +02:00
obelix
dec3f9ab62 Add Generic name for German Catafalque
The Catafalques of the other Civilizations have proper Generic names.

Refs. #8755
2026-03-31 10:01:03 +02:00
obelix
7af2210a4f Fix incorrect Spart CivBonus description
Introduced with 3592814aa8, reported by forum user Emacz
2026-03-31 01:47:12 +02:00
Stan
b23c0794a5
New song for the germans.
Song by: @skymx
Reviewed by: Omri Lahav, @samulis
2026-03-29 22:30:24 +01:00
Vantha
e0db65ba1b Remove pointless const's from ICmpCinemaManager.h
Were mistakenly introduced in d882ab74a1
2026-03-24 11:15:27 +01:00
Atrik
73f7884b4a Fix oversight from 832501fc9b and b93634fb28
When merging twin formations, the calls to AddMembers()
and RemoveMembers() got inverted. RemoveMembers()
calls UnsetFormationController() on each member, which overwrites
the formation controller reference just set by AddMembers() to
INVALID_ENTITY.
2026-03-23 14:50:12 +01:00
Daniel Richard G.
8a9dd76bc0 Add "iskunk" (myself) to the list of contributors 2026-03-23 08:20:10 +01:00
Daniel Richard G.
4050c645ac Avoid SIGBUS error in the MD5 implementation on ARMv7 (armhf)
Encountered in the test-suite run. This is just a workaround; the
implementation needs to be reworked/replaced to accommodate
alignment-sensitive architectures.
2026-03-23 08:20:10 +01:00
Daniel Richard G.
eab11c247c Add nominal support for LoongArch64 and RISC-V 64
Fixes #6584, #6834
2026-03-23 08:20:10 +01:00
Vladislav Belov
b52fbb7c62
Fixes particle shader compilation
The problem was only in case of USE_DESCRIPTOR_INDEXING. Because it adds
additional data for textures to the end of draw uniforms.

Fixes #8780
2026-03-22 00:53:30 +01:00
DesertRose
19fe52f328 Allow Romans to produce civilian_house from start
Fix that Romans to produce Civilians from the start of a match

Fixes: #8735
2026-03-20 10:14:35 +01:00
DesertRose
a6a634c7ae Fix Ptolemies Military Colony inability to produce Civilians
The Ptolemies Military Cololy can now produce Civilians as intended

Fixes: #8802
2026-03-20 10:14:06 +01:00
phosit
46b27f22ca
Wait for autostart by promise
Since the completion is checked using the promise the `onTick` function
can be removed.
This replaces the `AutoStart` `AutoStartClient` and `AutoStartHost` by
async functions.
The functions can now return something to the engine. That is used to
inform the engine which page to open. That was previously done in
JavaScript. Which is ugly because it doesn't know whether it's in
visual-mode.
2026-03-19 18:44:52 +01:00
DesertRose
6805efc08a Correct Germans Cimbrian Clubman visible classes
In-Game the Germans Cimbrian Clubman unit is erroneously declared
Builder and Worker

This removes these two Classes from the visible Classes

Fixes: #8806
2026-03-19 00:00:43 +01:00
Ximirun
5104c81e9d
Introduce Boundary & Adjust Height Properly
Code is implemented relating to selecting the building starting from the surface and making Height functional.
Inbefore Height does not do anything and it is set by how tall the building is 3D wise.

Fixes: #8781
2026-03-16 20:22:37 +01:00
wowgetoffyourcellphone
67ee5aaeb5 Erechtheion & Caryatids by @nifa
Hence, my suggested title for Release 29 is "Caryatid"
2026-03-15 22:12:15 +01:00
Atrik
6f645fa48f Fix formation ordering oversight
Fixes #8827
2026-03-13 22:59:59 +01:00
phosit
262c5c037e
Use promises to fetch net messages
Refs: #5585
2026-03-13 18:07:56 +01:00
Atrik
56107e4e39 Fix formation controller flag reset during patrol
0ace1b44b2 added setting some animation into a controller state,
but formation controllers don't have any animations.
Probably some code intended for individuals has been copied there
by mistake.

This likely caused the visual system to reevaluate the actor somehow
because the animation didn't exist.

Fixes #8817
2026-03-13 12:22:31 +01:00
phosit
d29890efb0
Split NetSession into two files
Refs: #5212
2026-03-11 21:03:52 +01:00
phosit
789d24aa1c
Initialize members net-sessions in the class
With this members of `CNetClientSession` and `CNetServerSession` get
initialized within the class instead of the constructor.
2026-03-11 21:00:05 +01:00
ShadowOfHassen
0c4bcd9139 Update gitignore to add rules.json
Fixes #7133
2026-03-11 19:24:17 +01:00
Lancelot de Ferrière
25fd3aa93c Small optimisation for VertexPathfinder edge handling.
Previously, edges where bundled collected first then sorted in 4 AA and 1 unaligned bucket. We can separate the unaligned edges right away, which is a little faster.

Also make sure Vertex::pred is initialized.
2026-03-11 18:45:23 +01:00
Lancelot de Ferrière
a6e0a623b4 Avoid constructing temporaries for Edge objects in VertexPathfinder 2026-03-11 18:45:20 +01:00
wowgetoffyourcellphone
666685645b Athēna Parthenos by @nifa
Athēna Parthenos by @nifa
2026-03-10 21:58:17 +01:00
phosit
e2dbcea487
Remove INetSession
This was only used in the `CNetFileTransferer`. Only one function is
called. That can also be a `std::function`.
2026-03-05 21:09:14 +01:00
phosit
e0c189a43e
Fix string format in economy walkthrough
This has been introduced in 29ac569511.

Fixes: #8788
2026-03-05 20:20:19 +01:00
trompetin17
15076a4504
Relax font alias pattern to allow custom font families
Update the font alias regex pattern from:
    (mono|sans)-(bold-|italic-)?(stroke-)?[0-9]{1,3}
to:
    [a-z]+-(bold-|italic-)?(stroke-)?[0-9]{1,3}

Previously the pattern only allowed the `mono` and `sans` font families.
This change generalizes the pattern to accept any lowercase font family
name, making it compatible with the font alias convention described in:

https://gitea.wildfiregames.com/0ad/0ad/wiki/Adding_font_support

This allows new fonts to be registered through aliases without modifying
the regex each time a new family is introduced.
2026-03-05 11:58:52 -05:00
Vantha
01476b9836 Only render the minimap texture if it'll be displayed
This patch implements a way for minimap-type GUI objects to request the rendering
of the minimap texture each frame. If it wasn't requested the minimap
texture isn't rendered at all and the objects only request it while they are
being displayed. This saves unnecessary work and fixes a bug where the
minimap briefly showed the revealed map after a cinema path ended
playing, since it isn't updated every frame (only 2x per second).
2026-03-03 11:25:52 +01:00
Vantha
67c96094f0 Disable smooth LOS during cinema paths
The whole map is revealed when starting to play a cinema path and
then hidden again when it finished (if necessary).
This patch fixes the ugly fade in at the start and fade out after
the end previously caused by this.
2026-03-03 11:25:52 +01:00
Vantha
004fdfdb58 Initialise m_DrawPaths inside the class
Default values like this are better set inside the class already rather
than in the constructor.
2026-03-03 11:25:52 +01:00
Vantha
64de934dd3 Revamp the cinema GUI code
This patch introduces a new class for managing the cinema overlay (two
black bars) and cutscene mode. This makes it more extensible for the
future, e.g. allowing to display text on the bars.
Since <include> elements can only be placed inside an <object>, this
patch needs to restructure session.xml a bit and also adds some
explanation comments while at it.
2026-03-03 11:25:52 +01:00
Vantha
d882ab74a1 Revamp CinemaManager component
Clean up the the implementation, improve the naming, and
add some more documentation as well as more in-depth tests.
2026-03-03 11:25:52 +01:00
Vantha
1d3cdec48d Move cutscene mode to renderer
This patch splits "cutscene mode" (disabling silhouttes, territory
borders and other visual overlays) from the cinema manager component
and moves it to the renderer, since it doesn't influence the simulation
anyway. The mode can now be independently controlled by the GUI. This
is done so it can also be used for other narrative elements like speech
or dialogue in the future. Cutscene mode is still always enabled while
cinema paths are playing, though.
By design, this also fixes the issue that range overlays weren't hidden
during cutscene mode.
2026-03-03 11:25:52 +01:00