1
0
forked from mirrors/0ad
Commit Graph

25440 Commits

Author SHA1 Message Date
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
obelix b7247ae7fb Rename Neareastern Badlands to Cappadocian Badlands
A discussion on the forums had the result, that the name Neareastern
Badlands should be changed as it contains an eurocentric view on Anatolia.

Fixes #8590
2025-12-27 15:49:44 +01:00
Vantha 832501fc9b Remove columnar walking behavior of formations
This behavior is a remnant of the very first implementaion of
formations, when there weren't different types of yet, only
box for fighting and column for walking.
Now that we have different types of selectable formations, however, this
behavior is no longer desired, it also caused a lot of ugly reordering
when giving walk commands. See the issue for more details.

Fixes #8580
2025-12-26 10:54:00 +01:00
Vantha 4d08446285 Improve Engine.GetTextSize deprecation message 2025-12-23 14:37:23 +01:00
Vantha 670f1e5d42 Fix warnings on the charts tab of summary screen
Engine.GetTextWidth has been deprecated since e845da025a

Idea:
If you look at a dropdown as just a text field (its header) that can
change caption like any other, then getPreferredHeaderTextSize is the
equivalent to getPreferredTextSize (present on buttons and text fields).

Fixes #8493
2025-12-23 10:28:22 +01:00
Vantha fbb6052c30 Fix oversight in 83f4d8789b 2025-12-23 10:28:22 +01:00
phosit 067a7abc72 Don't use PS::Loader::Task outside of Loader
PS::Loader::Task is made for the Loader and it's combersome to use it
outside. Also there is an overhead.
2025-12-21 15:51:58 +01:00
phosit 2fc61dd172 Remove ProgressiveLoadEntities
It's a coroutine. The resumer can decide whether it's loaded
progressively or not.
2025-12-21 15:51:58 +01:00
phosit 5586802b86 Use a coroutine for Loader tasks
Some tasks are invoked multiple times. Normally those tasks are broken
up inside a loop and had to be continued there. With coroutines that is
easier as it's possible to suspend inside a loop.

Coroutines which are lambdas should not capture anythig as the lifetime
of the captured values might end before the coroutine completes. For
that purpose `std::bind_front` is used.
2025-12-21 15:51:46 +01:00
phosit b67faf35c3 Switch main branch to Release 29 2025-12-18 18:16:11 +01:00
Atrik d14ee373bf Remove PostMessage for transitions IDLE to IDLE
Co-authored-by: @Vantha

Add 'isIdleConfirmed' flag to distinguish between
entering IDLE state and being confirmed idle.
Only send 'MT_UnitIdleChanged' messages after the
100ms timer elapses while still idle,
preventing spurious notifications for units
that instantaneously enter and leave IDLE.
This prevent the GUI to display a flickering idle count
in most cases, for example.

Refs : #8591
2025-12-18 10:22:27 +01:00
Atrik a670656212 Add Atrik to Programming Credits 2025-12-18 10:22:27 +01:00
Atrik 0f58a8511c Add a test for IsRearrangementAllowed 2025-12-18 10:22:27 +01:00
Atrik 45fd632cef Add a test for AttemptObstructionMitigation 2025-12-18 10:22:27 +01:00
Atrik b98e7f3b5b Fix formation combat stop command bug
Remove the ResetIdle method that was causing issues with the
'Stop units' command in formation combat

The method was originally added to prevent formation members
from appearing idle during patrol waypoints, but formation
controllers or its members no longer enter idle states
even without it

The ResetIdle method was sending MT_UnitIdleChanged messages
causing formation members to bug when using stop commands

Fixes: #8546
2025-12-18 10:22:27 +01:00
Atrik be6670df89 Add a test for GetClosestMemberFunctions 2025-12-18 10:22:27 +01:00
Atrik 06c40946eb Simplify calls for moving units into formation
Co-authored-by: @Vantha

Centralize all calls to move units into formation in UnitAI
Allowing additional checks to be done
before calling members to reform formation

Fixes : #8545

Revised Formation methods and when they do call
on reforming formation

Fixes : #7328

Don't order formation members to go to a point
if the controller is stuck
Instead make the controller jump to the member
who is closest to the destination

Fixes : #8543

Correct 'filter(member)' instead of 'filter(ent)'
in GetClosestMemberToPosition (ex GetClosestMember)

Fixes :	#5120
2025-12-18 10:22:27 +01:00
phosit cfb742c914 Return the value from GuiPoll 2025-12-17 13:39:17 +01:00
phosit f23dde2f73 Use StructuredClone in m_GuiMessageQueue
The elements have to be cloned either way. Now they don't have to be
traced when they are in the queue.
2025-12-17 13:39:16 +01:00
phosit 2a2d5de350 Replace LDR_* with PS::Loader::* in comments
This has been forgoten in 1917d034fd.
2025-12-16 19:35:25 +01:00
phosit ca0d6d3768 Remove references to InitEverything in Loader.h
This function seems to be removed a long time ago.
2025-12-16 19:29:05 +01:00
phosit 14a5ccee52 Propagate error from autostart
The JavaScript error wasn't propagated leading to an infinite loop.

Fixes: #7967
2025-12-14 19:07:01 +01:00
phosit f03be7b568 Initialize more members of CNetClient
The username and the jid have to be set before the client is connected.
With this commit it's not possible to initialize them to late.
2025-12-14 17:23:05 +01:00
phosit b686dfa047 Use range based for loop in TestSerializerPerf
CppCheck warned that `i` might be out of bound.
2025-12-13 18:58:17 +01:00
phosit 9911615e62 Always set scenario members in rl-interface reset 2025-12-13 18:58:17 +01:00
phosit 1917d034fd Introduce a namespace in Loader
All functions had a `LDR_` prefix. The prefix is removed.
Functions and globals which are only used in Loader.cpp are now
contained in an anonymous namespace.
2025-12-13 18:58:17 +01:00
phosit f257ce8f9c Remove the unused time_left parameter
The `time_left` was passed to the registered functions but it was never
used.
2025-12-13 18:58:17 +01:00