Commit graph

8723 commits

Author SHA1 Message Date
Itms
dae7a8c394
Bump engine version to 0.27.1 2025-07-12 15:14:45 +02:00
elexis
c98ae10e39
Fix change perspective in replays
Fixes change perspective features of multiplayer replays following cheat
protection in 023527e56e.

Fixes: #8020
(cherry picked from commit 67eaa8f1a9)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-06-19 16:59:26 +02:00
Lancelot de Ferrière
655a444847
Always allow last-ditch GCs
As noted on #7979, we run into OOMs since commit af32d386b9. The reason is that the default incremental GC budget is unlimited, which actually doesn't perform incremental GCs. Our settings can lead to situation where the incremental GCs don't actually sweep, thus not freeing memory.
SM has a mechanism to avoid OOM anyways with LAST_DITCH GCs, but by default these can only occur ever 30 seconds. Turn this off.

Reported by: langbart

(cherry picked from commit e3e542b1f9)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-06-19 16:58:32 +02:00
Ralph Sennhauser
182b1e3ee6
Fix memory leak wrt renderer instance
The renderer instance is created with new, so use delete.

Direct leak of 80 byte(s) in 1 object(s) allocated from:
    #0 0x7fd3c932870b in operator new(unsigned long) (/usr/lib/gcc/x86_64-pc-linux-gnu/15/libasan.so.8+0x12870b)
    #1 0x55bbedf25fb0 in InitGraphics(CmdLineArgs const&, int, std::vector<CStr8, std::allocator<CStr8> > const&, ScriptContext&, ScriptInterface&) ../../../source/ps/GameSetup/GameSetup.cpp:654
    #2 0x55bbed2bb95e in RunGameOrAtlas ../../../source/main.cpp:684
    #3 0x55bbed271b28 in main ../../../source/main.cpp:759
    #4 0x7fd3c665f3ed in __libc_start_call_main (/lib64/libc.so.6+0x263ed)

Fixes: #7951
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit 03fd1acd5d)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-06-19 16:58:03 +02:00
Dunedan
38e4cdc755
Fix password change for certain usernames
This fixes the ability for users with uppercase letters in their
username to change their passwords, which wasn't possible before on
non-Windows platforms. The underlying issue for that is
https://github.com/processone/ejabberd/issues/4377 and in addition some
inconsistent normalization of usernames in password change requests
by gloox. This commit works around that by always using the local JID
part as username for password requests, which got the nodeprep string
profile already applied.

It also fixes a problem that Windows users which were able to change
their passwords, weren't able to login afterwards anymore, unless they
typed their username in all lowercase in the login form. This was caused
by using the all lowercase username as input for the password hash
function, instead of using the username in the user supplied case.

Fixes #7796

(cherry picked from commit 638391d7ab)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-06-19 16:53:33 +02:00
Lancelot de Ferrière
68d99b3944
Fix no-pch build following #7829
(cherry picked from commit dd74892463)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 22:29:09 +02:00
Lancelot de Ferrière
e1daff1869
Iterate the component map only once on serialization
(cherry picked from commit 9eccf1f27d)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 14:05:53 +02:00
Lancelot de Ferrière
e5df3e1ad8
Skip UTF8 conversions in prototype name
(cherry picked from commit ea34960249)
(fixed build on 520c489b68 by moving a change to this commit)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 14:05:00 +02:00
Lancelot de Ferrière
5ab58f82f0
BinarySerializer: avoid creating unnecessary ScriptRequest
(cherry picked from commit bcd0e12cc3)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 14:02:58 +02:00
Lancelot de Ferrière
520c489b68
Cache property keys during component serialization
(cherry picked from commit ab6a420f78)
(fixed build on this commit by moving a change to commit originally ea34960249)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 14:00:56 +02:00
Lancelot de Ferrière
0fdd6005b8
Skip redundant HasProperty in GetObjectClassName
(cherry picked from commit 83bf2eb22e)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 13:59:21 +02:00
Lancelot de Ferrière
e4b604982a
Stop running shrinking gcs & simplify GC logic.
Shrinking GCs dump the JITted code, which leads to redundant recompilations, lowers performance, and makes profiling JS more difficult.
They may still happen if the runtime is at risk of OOM.

(cherry picked from commit af32d386b9)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 13:49:41 +02:00
phosit
b78b666797
Catch all std::exception from a map in atlas
Since 0eed117e6d exceptions from the map generation script are rethrown
in the main thread but not all of them are catched.

This defect is already fixed in the engine with 82513c9104

Fixes: #7620
(cherry picked from commit 56abf84da2)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 13:48:54 +02:00
Dunedan
2fcce77ad4
Properly terminate the XMPP connection
This ensures the XMPP connection gets properly terminated when leaving
the lobby.

Fixes #7504

(cherry picked from commit 312c6e8165)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 13:48:33 +02:00
Dunedan
83c8ec1b4a
Create port forwarding for correct port with UPnP
Up to know the UPnP logic ignored the port a user was hosting a game on
and always added a port forwarding for the default port UDP 20595. This
commit fixes that, so a port forwarding is added for the actual port a
game is hosted on.

(cherry picked from commit fcd3fc2aa3)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 13:47:43 +02:00
Dunedan
a7694ef8b3
Fix adding port forwardings using UPnP
The UPnP implementation included a combination of two subtle bugs, which
resulted in failure to create port forwardings every time after the
first one.

When using UPnP, the internet gateway to create the port forwardings at
needs to discovered. As that takes a while, the its root descriptor URL
was supposed to be cached after successful discovery in the user config
in "network.upnprootdescurl". However, instead of caching the root
descriptor URL, the control URL got cached. That caused following
requests to the root descriptor URL to fail, as they ended up at the
control URL instead. As such requests might also fail when the network
topology changed, the code was supposed to fall back to discovering the
internet gateway again when the cached one didn't work. However, due to
the inner workings of miniupnpc the request using the cached root
descriptor URL didn't result in an error, so the new discovery was never
triggered. As the wrong value was persisted in the user config there was
also no way to get out of this situation again.

This commit fixes both of these bugs.

As far as I can tell these bugs existed since the introduction of the
caching of the root descriptor URL in 0ba25e9968, which means creating
port forwardings using UPnP has been broken since Alpha 15.

(cherry picked from commit 18d7746c84)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-15 13:44:35 +02:00
Vladislav Belov
c4d10eedfd
Fixes runtime switch of the GPU skinning.
Fixes #7572, #7630.

(cherry picked from commit 2264807ad0)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:56 +02:00
Vladislav Belov
21ec2f0ab8
Allows compute shaders for GL only since 4.3.
It seems current checks for GL 4.2 aren't enough so just disable
compute shaders for GL 4.2. Fixes #7734.

(cherry picked from commit fa3fb5d064)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:55 +02:00
Vladislav Belov
85cc968be0
Fixes out of bounds during GL buffer binding.
There was an out of bounds access during binding a uniform buffer on
GL. Fixes #7567, #7598.

(cherry picked from commit bce6e2c238)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:54 +02:00
Dunedan
ef9ea478ec
Add workaround to turn off nursery size heuristic
SpiderMonkey 98 introduced a size heuristic for the nursery GC region
(https://phabricator.services.mozilla.com/D136637). As this heuristic
uses a wall-clock time duration, it results in a severe performance
regression on slower systems for our use case.

This commit adds a workaround to turn off that heuristic, by telling
SpiderMonkey that a "page load" (something which doesn't have a meaning
in the context of pyrogenesis) is in progress, as that heuristic is
disabled for page loads.

Co-Authored by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
Fixes #7714

(cherry picked from commit 11dd480b67)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:53 +02:00
Ralph Sennhauser
417af009ea
Don't map unknown scancodes to hotkeys
Users may generate key presses that don't map to a distinct SDL scancode
and will be mapped SDL_SCANCODE_UNKNOWN instead. Using the same ID for
unmapped hotkeys means any such key press will execute unset hotkeys. As
luck would have it in #7644 this leads to calling "Custom exit to
desktop" if the hotkey is unbound as is the default.

So simply use a code for unused hotkeys that doesn't map to any SDL
scancodes.

Fixes: #7644
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit f10526284f)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-05-01 08:56:52 +02:00
Ralph Sennhauser
6746f380f7
Add missing header in KeyName
Reported-by: @svenstaro
Ref: #7564
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit bccd3db231)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-04-27 20:59:22 +02:00
Dunedan
8c69bb026d
Update supported languages for the NSI installer
235ea5cfb4 updated the languages supported by 0 A.D., but missed
updating them for the installer. This commit makes up for that and
updates the languages for the installer as well.

(cherry picked from commit db35a8494c)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-28 19:30:34 +01:00
Vladislav Belov
d4e1b8b9db
Disables compute shaders for GL ARB backend.
(cherry picked from commit a7ead4cf4c)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-28 19:28:00 +01:00
Vladislav Belov
8f8d08b9f3
Disables GL storage buffers on Mesa.
This is a workaround to avoid disabling GL storage buffers completely.
Because they might not work or might lead to a decreased performance.
We need to investigate that further when we have a local reproduce.

(cherry picked from commit 635a268dd9)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-28 06:49:26 +01:00
Itms
73b2eed323
Fix unix-build tarball inclusion of text files
The .txt were wrongly send to a subdirectory named `.` and the files
converted to Markdown were forgotten.

(cherry picked from commit e1ecc4a743)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-20 22:09:31 +01:00
Ralph Sennhauser
f14b29923e
Prefetch tarballs in bundle pipline
Fetch third party tarballs for source packages so they will be bundled
in source release tarballs.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit 3aa95b7a28)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-20 22:09:28 +01:00
Vantha
57b5f3f10d
Fix alignment issue with 'imgleft' and 'imgright'
Bug was introduced by f8d2927748.

Fixes #7397

(cherry picked from commit 7485b37ba3)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-20 22:07:59 +01:00
Dunedan
d41356a9cc
Update supported languages for Alpha 27
This removes Catalan and Scottish Gaelic as supported languages, as they
now both have a coverage of less than 80% and adds Galician and
Portugese which both have 100% coverage right now.

(cherry picked from commit 235ea5cfb4)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-12 01:20:03 +01:00
Itms
beee5b2b8b
Only freeze once the cached JS values of templates
CParamNodes can be quite large, thus we usually cache the JS::Value when
converting them. The AIInterface makes heavy use of it as detected in #7404.

However, the cached values are re-frozen everytime, which is a
significant waste of time on a large number of templates.

(cherry picked from commit e48b9ea106)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-08 14:39:38 +01:00
Itms
8956a38616
Export a 10-char commit hash in the build version
This avoids collisions in the user report, fixes #7174.
Update the user report version to account for the new build version
format, fixes #7173.

The build version displayed in the GUI is kept at 5 characters for
main menu clutter concerns.

(cherry picked from commit 9f023825e0)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-08 14:38:11 +01:00
Vladislav Belov
3231d262ef
Fixes missing SPIR-V shader combinations.
We have multiple renderer backends for a while. So we can't rely on
a single CONFIG_GLES2 macro for disabling features.

(cherry picked from commit 8ee48a164a)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-08 14:37:41 +01:00
Ralph Sennhauser
11aa7fdafa
Avoid segfault with curl 8.10/8.11
With curl 8.10 [1] calling curl_multi_remove_handle retruns
CURLM_BAD_EASY_HANDLE iff the handle was removed already and no other
easy handle were registered. This resulted in ENUSRE triggering a
segfault during shutdown as reported. This was fixed upstream after
8.11.1 [2].

Do a runtime version check and for affected version allow
CURLM_BAD_EASY_HANDLE.

[1] curl ba235ab269080dc66e35835c829f7ac4290dbc1d
[2] curl 713182bd196bba014ba77f71176fea3de2236724

Fixes: #7295
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit edde9fb4ee)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-08 14:36:56 +01:00
wowgetoffyourcellphone
6df8952672
Fix projectile modifier oversight and references
Update trigger script
Update Attack.js component
Update the relevant techs
Update unit_tables.py

(cherry picked from commit c798a12815)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-08 14:36:02 +01:00
phosit
2a97089c94
Consistent coment length to seperate message-types
(cherry picked from commit 7c1a566d3e)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-05 22:57:17 +01:00
elexis
da87b72e6a
Store whether a player is activ in C++
This prevents mods from mutating this value and revealing the map.

Part of this commit is written by @phosit.

(cherry picked from commit c9e76efe7b)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-05 22:57:15 +01:00
elexis
26d4c1550e
Fix subscription time of script component wrapper
Script component wrapper attempted to subscribe to messages before the
script component has been registered.
This defect existed since 7c2e9027c2 but was never noticed since there
is no script component wrapper which subscribes to messages. (Only the
script component it wrapps does.)

(cherry picked from commit f932b8b9cc)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-05 22:57:14 +01:00
elexis
04636d393a
Fix changing view to observer
`id` was compared to the wrong player.
This defect was introduced in 023527e56e.

(cherry picked from commit e19a5eda9f)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-05 22:55:56 +01:00
Vladislav Belov
83a3794ea3
Fixes slow-path texture conversion on RPI4.
RPI4 returns `false` for `textureCompressionBC` because it doesn't
support formats above BC3. As the Vulkan specification requires to
support all BC formats to have `true` for `textureCompressionBC`.

(cherry picked from commit 0467d27b07)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-05 22:55:22 +01:00
Vladislav Belov
3531ac9041
Fixes GLES compilation.
(cherry picked from commit 54701868da)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-04 23:21:01 +01:00
Lancelot de Ferrière
85363e861e
GameSettings: ensure savegameID is either a file name or undefined.
The current code could end up with savegameID being undefined, false, a filename string, or null depending on the code path taken.
Adapt C++ in consequence.

(cherry picked from commit a8fc3cf254)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-04 23:19:23 +01:00
Lancelot de Ferrière
795af45a7a
Fix sounds playing in the wrong places of the map
Introduced by a typo in f8afd49ae1.
Fixes #7345, reported by wowgetoffyourcellphone

(cherry picked from commit fba5a23aad)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-04 23:18:46 +01:00
Lancelot de Ferrière
8b5621e822
Fix overlay renderer when changing displayed player.
Observers have the ability to change the currently displayed player, and this broke the logic of commit f3f695b90e.
By instead storing the displayed player in CmpOverlayRenderer, we can remove the workaround to set a 'dirty' flag as well.

(cherry picked from commit 3756e12701)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-04 23:18:11 +01:00
Itms
6cdf1d5a15
Sign and notarize macOS bundles
(cherry picked from commit 2482ecf9fe)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-03 22:51:17 +01:00
Lancelot de Ferrière
5ca63d19b8
Avoid idle 'flicker' because of regular formation regroups
Since 71a61d5f50, formations regularly regroup. However, units already at their correct offset should remain idle. This doesn't happen as we cannot check if we are at destination.
This exposes that and handles things properly... Unfortunately UnitAI has already left the IDLE state at this point, so we still get counted as no-longer idle for a turn.
To fix this, try and detect that particular situation without triggering infinite loops.

(cherry picked from commit 2f7ac026c1)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-03 22:49:34 +01:00
phosit
c4dbfc9c4b
Catch all std::exception when loading a map
Since 0eed117e6d exceptions from the map generation script are rethrown
in the main thread but not all of them are catched.

(cherry picked from commit 82513c9104)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:23:38 +01:00
Stan
b4a53f9c14
Mod Interface: Enable setting territory visibility
based on a patch by: aeonios

`off` means that the territory visibility cannot be changed
`hidden` means that it's hidden by default but can be enabled
`visible` means it's visible by default

(cherry picked from commit fd78034885)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:20:03 +01:00
Dunedan
88aac575d9
Add a deprecation warning for using GetFileMTime()
(cherry picked from commit 894e349ebf)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-29 22:25:43 +01:00
phosit
ccd9cadab2
Multicast chat messages
Only the sender and the recipients receive the chat messages.
This commit only has an affecto on messages where the addressee(s) are
selected through the dropdown. Addressee(s) selected with a "/" command
are still sent to evevyone and filteret by the receiver.

(cherry picked from commit e04506814a)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-28 11:29:08 +01:00
elexis
fb84643c6d
Prevent players to reveal the map from GUI script
`Engine.SetViewedPlayer` and `Engine.SetPlayerID` could be used to
reveal the map from GUI scripts and the in game console.

This is prevented by querying the simulation whether this player is
allowed to call thous functions.

These two vulnerabilities were introduced with their respective
features:
20e7d2224a introduced SetPlayerID to allow controlling other players
	using the developer overlay.
a2f7d4d82a introduced SetViewedPlayer to allow observers to change the
	perspective.

(cherry picked from commit 023527e56e)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-28 11:27:27 +01:00