1
0
forked from mirrors/0ad

25616 Commits

Author SHA1 Message Date
Atrik 68e625ab7a Fix errors if promoted units change attack range
While in combat, if units are promoted and the promotion results
in a change in their attack range, this could trigger some errors
as 'this.template[type]' had a chance to be undefined when performing
a 'RepeatRangeCheck'.

Fixes #8670
2026-01-29 11:47:16 +01:00
obelix 8129b8ffc1 Fix a typo in Seleucid team bonus description
reported by @GurkenKhan in the forums on January 9:
https://wildfiregames.com/forum/topic/137892-release-28-branch
2026-01-27 17:55:11 +01:00
Ralph Sennhauser 0691e7f0ff Workaround renamed property in gamereport
The gendered citizen feature changed stat counter names in
3592814aa8 which are submitted to echelon
for rated games with the game report, the change in name for the property
means it no longer matches the database column name effectively breaking
rated games.

Translate the property name on the fly.

Fixes: #8687
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-26 08:57:42 +01:00
Vladislav Belov cce01f4d6c Fixes compilation after #8621
Fixes #8685
2026-01-25 16:29:16 +01:00
Olivier Tilloy 6436ba3af9 Spidermonkey build: cherry-pick an upstream commit to create thin archives
This saves a sizeable amount of disk space during the build, by not creating
a very large libjs_static.a (~1.5 GB) that contains a copy of all the symbols
in the object files generated during the build.

Upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=2008085
Upstream commit: https://hg.mozilla.org/mozilla-central/rev/a924182c4e55

Note that the upstream commit doesn't apply cleanly to Spidermonkey 128.13.0,
it had to be rebased.
2026-01-25 10:58:33 +01:00
phosit 13453a3c7b Remove ScriptContext::CreateContext
This function nudges one into using it instead of the constructor. Even
though a `std::shared_ptr` isn't required.
2026-01-24 12:03:05 +01:00
Chrzanof 5daae13525 Pass device command context by reference in DebugRenderer
Improve the DebugRenderer API by passing the IDeviceCommandContext
as a reference instead of calling g_Renderer.

Fixes: #6650
2026-01-24 11:54:01 +01:00
Ralph Sennhauser 8962e066c9 Remove mongoose
Remove sources and references in premake build script as it's no longer
used.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-24 10:45:48 +01:00
Ralph Sennhauser ba4ef61c15 Use cpp-httplib instead of mongoose
Use cpp-httplib for Profiler2 and RLInterface instead of mongoose.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-24 10:45:48 +01:00
Ralph Sennhauser 7e575aa855 Enable use of cpp-httplib
Add cpp-httplib to library build scripts and enable it's use in premake.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-24 10:45:48 +01:00
Ralph Sennhauser 9c1f133118 Package cpp-httplib
Intended as replacment for mongoose, which due to license change can't
be updated anymore.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-24 10:45:48 +01:00
phosit 03a5198ed3 Remove g_GUI usage in simulation2/*
This is the last remaining inclusion of a gui file in simulation2/.
2026-01-23 21:05:18 +01:00
phosit 153dfe7ef1 Don't use g_GUI in TurnManager
The turn-manager shouldn't know about the gui.
2026-01-23 21:05:14 +01:00
Atrik 2735cdc156 Add unit tests for multi-level class sorting 2026-01-23 17:20:11 +01:00
Atrik be2de39238 Use multi-level sorting in the default formation 2026-01-23 17:20:11 +01:00
Atrik 065ecdbdf8 Implement level class sorting for formations
Add support for multi-level priority sorting of entity classes
in formations.

fixes #7547

Change formation template's default sorting order
using multi-level sorting.

fixes #6873
2026-01-23 17:20:11 +01:00
Vantha 40dfde9890 Add the Germans to the fireship tip
Fixes #8660
2026-01-22 12:55:03 +01:00
phosit a6357322e9 Serialize canPlay property in Petra
This was forgotten in 7b1d4426aa.

Fixes: #8674
2026-01-21 19:40:38 +01:00
Vantha b93634fb28 Clean some rebase oversights of 832501fc9b 2026-01-21 19:05:58 +01:00
Dunedan f4c52e49a7 Fix string extraction of new game settings
5741f77c6e and b5256ce014 added new translatable strings for game
settings, but missed adding them to
binaries/data/mods/public/l10n/messages.json to get them properly
extracted into the PO-templates for translation. This commit fixes that.
2026-01-14 22:02:02 +01:00
Vantha 6a5baa1a68 Remove unused pop cap type appendage
Unused ever since they were added in 5741f77c6e.
2026-01-14 11:22:31 +01:00
Dunedan 93ce94655d Use @stylistic/brace-style for eslint
Up to now `eslint-plugin-brace-rules` was used to enforce a common brace
style for JavaScript code. This plugin was however updated the last time
over 9 years ago and will be incompatible with ESLint v10, as that
[removes `context.getSourceCode()`][1], the plugin relies on.

To keep the eslint config working with ESLint v10, this replaces
`eslint-plugin-brace-rules` with the [`@stylistic/brace-style`][2] rule
from `@stylistic/eslint-plugin`, a package we already use.

While `@stylistic/brace-style` doesn't offer an option to format braces
in exactly the same way as before, the "allman" style seems to be the
one closest to the existing code.

[1]: https://eslint.org/blog/2025/11/eslint-v10.0.0-alpha.0-released/#removed-deprecated-rule-context-members
[2]: https://eslint.style/rules/brace-style
2026-01-12 21:33:52 +01:00
Dunedan 8f8d1195c2 Fix translatable strings in XML files
Some translatable strings in XML files have leading and trailing line
breaks and tabs. As these characters are significant in text in XML
files, they don't belong there.

Refs: #8649
2026-01-12 07:59:59 +01:00
Ralph Sennhauser d070bf66b3 List reason for role change in MUC
Shows the reason for the role change in the status message. This is
mostly relevant for communicating the reason and possibly duration for a
moderator or bot muting a user.

Refs: #5679
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-09 19:07:45 +01:00
phosit 5255b919d9 Remove g_ServerId in gamesetup_mp.js
This variable was unused.
2026-01-08 20:23:42 +01:00
phosit 5325e6d00d Use exceptions in gamesetup_mp.js
In some places `false` was used to represent an error. In other places
`true` was used for that. With exceptions it's obvious which is the
error.
2026-01-08 20:23:42 +01:00
Cayleb-Ordo 4536190ab4 Update Icon handling of ActorEditor
Previously on non Windows Platforms the Programm would not get its
icon, as the *.rc is not used on e.g. Linux.
Use an xpm File for non Windows Platforms. Use the convenience macro
from wxWidgets to load the icon in a single call.

The icon was converted using GIMP 3.0.6. To avoid `-Wwrite-strings` the
static char* was converted to a const char*.
2026-01-08 11:12:24 +01:00
phosit b77ee3c5dc Update appdata for next RC 2026-01-05 20:48:20 +01:00
Ralph Sennhauser e92972d51c Simplify exchange in XMPPClient
Prime usecase for std::excahnge.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-03 20:30:31 +01:00
Ralph Sennhauser dcd12183e4 Label XMPP debug output
Prefix output of DbgXMPP so it is clearly assosiated. Furhter avoid
newlines in debug statements.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-03 20:30:31 +01:00
Vantha bb31e6b6b1 Prevent invalid GetEntityState GuiInterface calls
As long as there's no entity under the cursor, 11 calls were made per
tick with an undefined entity ID, which are now caught.

In general, an "entity state" can very well be null if the passed ID
is undefined, invalid or no entity with the ID exists (anymore). This
last case is only noticed by the GuiInterface and currently used to
detect destroyed entities.
2026-01-02 11:49:28 +01:00
phosit ba2351611c Remove LoadScripts from CSimualation2
`LoadScripts` and `LoadDefaultScripts` have to be called imediately
after the `CSimulation2` constructor.

By doing the necesarry work in the constructor and removing
`LoadScripts` and `LoadDefaultScripts` the interface of `CSimulation2`
is simplified.
2026-01-01 17:27:54 +01:00
phosit 0b83e24065 Close register-page before opening login-page
The `onTick` of the register-page was still running when connecting to
the lobby. This lead to an error when the `connect` message was
received.
With this commit returning from the login-page will always return to the
entrance-page. Previously it returned to the register-page when it was
opened by through that page.
2026-01-01 14:53:45 +01:00
Ralph Sennhauser bc021863af Query XMPP client for connection state
Instead of tracking the connection state separately just query the
client directly.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-01-01 11:42:23 +01:00
Olivier Tilloy 7f0486e18e Add myself to the community credits (for packaging work) 2025-12-31 13:35:03 +01:00
Olivier Tilloy 8bd0d0b84f Spidermonkey build: do not unpack unneeded test files
This change reduces the disk space requirement by 50%, from 1.1 GB down to 564 MB.
It is relevant when building 0AD in resource-constrained environments (e.g. in CI).
2025-12-31 13:34:09 +01:00
Itms d1319179f8 Build the Actor Editor during the nightly build
This is a regression of a fix in 7e481b73cd,
lost during the git migration. Refs #1819
2025-12-30 22:23:12 +01:00
Vantha 9b8ff77265 Complete the per-player pop cap implementation
The 'PopulationLimit' attribute of each player seems to have been
without effect for a long time, but this patch fixes it.

Fixes #7850
2025-12-29 21:29:34 +01:00
Vantha 3a73dffc1c Add fallback values for pop cap and pop cap type
Make InitGame.js responsible for providing proper (defined) values.

Refs #7850
Fixes #7695
2025-12-29 21:29:34 +01:00
Atrik f856565de9 Add formations paths to UnitMotionDebugOverlay
Formation controllers now display their movement paths when enabling
UnitMotion debug overlay.

Key changes:
- Formation controllers show long paths in blue and short paths in green
- Formation controllers path are rendered if selecting
  some of the formation's members
- Prevent the gui from making redundant calls to SetMotionDebugOverlay

Existing limitations (not regressions):
- Paths are often cleared before entities complete them
- Formation members have short paths that rarely get rendered
2025-12-29 14:30:14 +01:00
Vantha 2e450f0f52 Remove inconsistent override in CDropdown.h
It was added in 670f1e5d42 and, while not illegal, was inconsistent with the
rest of the header file, which caused compiler warnings.
As a quick solution the override keyword is simply removed again.
In the long run, it would be good to still modernise the style of all files
in that directory (at once).
2025-12-29 13:46:47 +01:00
trompetin17 8e820a988e Fix exceeding input boundaries in console
After 734386ce9f the new font system calculate height and cap height,
previously was having some magic number. Now we are using cap height
divide 2 to give a more nice space.

Remove an extra pixel in the buffer and improves background color for
better reading and eye care.

This also support the change console font option added in d549cbeeaa

Fixes: #8351
2025-12-28 20:35:20 +01:00
Vladislav Belov df9c6f510c Fixes ProfilerViewer when drawing empty cells
Currently CalculateStringSize can't handle empty string (see #8630).
As a simple fix for RC just avoid drawing empty texts.

Refs: #8630
2025-12-28 17:36:36 +01:00
Itms 771bf0ba08 Fix NSIS auto-uninstall
The NSIS script incorrectly passes the default installation dir as
argument for the auto-uninstaller of previous installs.

This is supposed to avoid moving the uninstaller to a temp file, but it
is unclear why that was done, as this leaves the uninstaller behind.

More importantly, now that we have changed the default installation
directory, the auto-uninstall tries to remove the previous install from
the new location, which does nothing and leaves behind several GB on the
disk.
2025-12-28 16:26:41 +01:00
Vladislav Belov cea77c497c Fixes TerrainTextureManager after refactoring
In fb98f5059a the manager was refactored
and the order of deinitialization was incorrectly changed.
2025-12-28 12:34:26 +01:00
real_tabasco_sauce 621b4f96cc update scenario map to account for changed template name for clubman 2025-12-27 23:25:07 +01:00
real_tabasco_sauce ec19e5d663 mixed improvements to germans
-Make clubmen champion macemen and remove buiding ability to ensure they are not mistaken for CS units.
-Decrease obstruction size of houses (clunky to place in staff match)
-Encampents only allowed in own/neutral territory
-'fear' icon used for Lugius vision aura instead of movement speed.
- Make covered wagons unable to research house techs and train civilians.
2025-12-27 23:25:07 +01:00
Vladislav Belov f43e98da09 Fixes uninitialized GPUSkinning in Atlas
Currently CRenderingOptions are initialized only once on the application
start. It means changed m_GPUSkinning wasn't reset on the switch to Atlas.

Fixes #8596
2025-12-27 21:02:48 +01:00
phosit e62eb96092 Allow swapped in pages to close themselves
This wasn't possible because init functions are called inside each
other and the outer one overwrites the result of the inner one.
Now the outer result doesn't overwrite the inner result but stores it to
the pointed to location.
2025-12-27 18:21:18 +01:00
phosit 426ec45751 Don't suspend loader after each finished task
By moving the common `goto done;` ouf of the if-block 5586802b86 changed
the code so that the loader suspend after each task.
This normally isn't a problem as it will continue in the next frame. But
when entering atlas it is treated as an error.
2025-12-27 17:17:06 +01:00