Commit graph

8736 commits

Author SHA1 Message Date
Dunedan
fcd3fc2aa3
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.
2025-02-22 20:26:30 +01:00
Dunedan
75d343293f
Remove "useLongStrings" logic
As it turns out we don't need that special logic for handling the "long"
locale properly and everything continues to work as before without it.

The only difference is that the number format not being the one from
en_us anymore when using the "long" locale, but the one of the
system-wide configured language, which should be an even better user
experience than before.
2025-02-22 18:18:42 +01:00
Lancelot de Ferrière
c475cc2265 Cleaner debug serializer output
The debug serializer currently outputs data even for components where `Serialize = null`.
This leads to useless data being output, especially in OOS debug states which makes diffing more annoying.

Noted in #7634
2025-02-21 18:20:56 +01:00
Ralph Sennhauser
9a43c43a33
Avoid gcc warning in json_spirit
Gcc-14 triggers a warning for substitute_esc_chars in
json_spirit_reader_template.h if optimizations are enabled.

../../../source/third_party/jsonspirit/json_spirit_reader_template.h:138:62:
/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/char_traits.h:427:56: warning: ‘void* __builtin_memcpy(void*, const void*, long unsigned int)’ accessing 9223372036854775808 or more bytes at offsets 0 and 0 may overlap up to 9223372036854775809 bytes at offset -1 [-Wrestrict]
  427 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));

for with lto enabled

/usr/lib/gcc/x86_64-pc-linux-gnu/14/include/g++-v14/bits/char_traits.h:427:56: warning: ‘__builtin_memcpy’ specified bound between 9223372036854775808 and 18446744073709551615 exceeds maximum object size 9223372036854775807 [-Wstringop-overflow=]
  427 |         return static_cast<char_type*>(__builtin_memcpy(__s1, __s2, __n));

This looks like another incarnation of bugs like:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105329
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100366

Add quirk to avoid the warning

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-19 21:52:50 +01:00
Ralph Sennhauser
77256c8d32
Fix profiler2 webui html
Cleanup some bogus tags and outdated css attribute.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-17 21:22:30 +01:00
Ralph Sennhauser
4b59d6b739
Update jquery used by profiler2 webui
jquery 1 is for support of old version of browsers not even maintained
this days.

Updating prevents occasional hangs for me.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-17 21:22:30 +01:00
Ralph Sennhauser
82ff0ea90b
Remove CONFIG_ENABLE_BOOST
Code within CONFIG_ENABLE_BOOST is required to compile pyrogenesis.

As boost is required in many other places, making it truly optional in
the one case where there is currently a guard is meaningless.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-02-14 20:35:04 +01:00
scuti
a9819e9865 Created hotkey to grab and release mouse.
Addresses #6790
2025-02-14 20:18:49 +01:00
phosit
a786a1f3d8 Use std::variant in Future
Either a return value or an exception has to be stored. With
`std::variant` it's more explicit.
Also the return value is never empty, so there is no need for
`std::optional` anymore.
2025-02-10 18:11:02 +01:00
scuti
7d616763a4 Fix /kick or /ban segfaulting in singleplayer
Addresses #7467
2025-02-09 18:50:15 +01:00
Langbart
dffa892c60 fix: rlclient update resource gathering and map name
fix: #7540
2025-02-09 14:38:55 +01:00
Lancelot de Ferrière
5f117532a4 Map generation: speed up ParseEntities
When marking a tag dirty, the obstruction manager checks it has not already done so. This is un-necessary when the global state is marked dirty, and this check is rather slow since we do it once per entity, effectively leading to an o(n^2) runtime.
2025-02-09 11:30:35 +01:00
Ralph Sennhauser
bccd3db231
Add missing header in KeyName
Reported-by: @svenstaro
Ref: #7564
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2025-01-30 21:15:28 +01:00
drh
03ceb27e90 Add camera pan inversion option
Fixes: #6539
2025-01-30 18:42:59 +01:00
phosit
b41ca5ad78 Replace FALLTHROUGH by the standard attribute 2025-01-29 19:34:12 +01:00
phosit
473f8ca72e Remove FALLTHROUGH on empty cases
`#include "lib/code_annotation.h"` can be removed in some places.
2025-01-29 19:34:12 +01:00
Dunedan
db35a8494c
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.
2025-01-28 19:14:16 +01:00
Vladislav Belov
a7ead4cf4c
Disables compute shaders for GL ARB backend. 2025-01-28 18:56:15 +01:00
Vladislav Belov
635a268dd9
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.
2025-01-28 01:40:47 +01:00
phosit
ec6ed7f224 Remove deprecated functions in map generator
Map generation scripts should use the new interface introduced in
6ce2fc53ea.
2025-01-27 17:50:39 +01:00
Paul Robinson
5b98a647dc Adding Engine Version and Mod name/version checks to multiplayer handshake.
Incrementing protocol version as handshake messages have changed.
2025-01-25 07:39:32 +01:00
Dunedan
2ea183d744
Allow to check multiple locales at once 2025-01-21 11:01:42 +01:00
Dunedan
bcdbe2e580
Add the ability to specify which rules to check 2025-01-21 11:01:40 +01:00
Dunedan
25e83d603f
Check for wrong whitespaces in project name
This adds checks to check for missing non-breaking space in "0 A.D.".
2025-01-21 11:01:37 +01:00
Itms
e1ecc4a743
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.
2025-01-20 22:03:07 +01:00
Ralph Sennhauser
3aa95b7a28
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>
2025-01-20 16:58:37 +01:00
Daniel Roschka
274500eb37
Always use STUN for hosting games using the lobby
This makes using STUN mandatory for games hosted using the multiplayer
lobby. The motivation for that is a reduction in complexity, because
right now if STUN is disabled we use a home-grown STUN-like logic, which
got implemented before Pyrogenesis got STUN support.

That home-grown logic relies on a custom ejabberd module (mod_ipstamp),
which inserts the external IP-address of a host in the response messages
when a host registers a game. Originally mod_ipstamp was also used to
inform all potential players of a hosts IP-address, however that has
already been removed to let hosts to only share their IP-address with
players actually joining their game.

Removing the home-grown logic and instead always relying on STUN removes
complexity in Pyrogenesis and the lobby server and also eases hosting
games for players, as they don't have to figure out anymore whether they
need to enable STUN or not.

These changes shouldn't negatively impact the ability of Pyrogenesis to
handle different types of NAT or broken networks. There is one
difference though: While the custom logic using mod_ipstamp utilized TCP
as transport protocol, the STUN implementation in Pyrogenesis currently
uses UDP. That doesn't allow hosts with UDP-connectivity issues to
resolve their external IP-address anymore, however without
UDP-connectivity they aren't able to successfully host games anyway, as
the actual game updates are transferred using UDP as well.
2025-01-20 06:52:14 +01:00
Vantha
7485b37ba3 Fix alignment issue with 'imgleft' and 'imgright'
Bug was introduced by f8d2927748.

Fixes #7397
2025-01-19 17:50:16 +01:00
Lancelot de Ferrière
1b1e00d6c4 Remove profiler 2 spike/aggregated regions
This code is unused and was never actually useful.
Fixes #6620.
2025-01-18 12:36:20 +01:00
Lancelot de Ferrière
34844ca9a4 Speedup StartProcessingMoves when mostly idle and many threads 2025-01-18 12:32:28 +01:00
phosit
3a94cb0bfe Fix maybe-uninitialized warning in EntityMap test
Reading `second` on the end of the range is undefined behavior. Invoking
`test.find` in the test never evaluates to the past the end iterator.
GCC doesn't know that and issues a "maybe-uninitialized" warning.
2025-01-16 21:12:28 +01:00
phosit
4be8e0bcfb Tell GCC the maximum value of m_BufLen
GCC thinks `m_Buf + m_BufLen` can be outside the bound of `m_Buf`.
That is because `m_BufLen + len < CHUNK_SIZE` can evaluate to `true`
even if `m_BufLen` is bigger than `CHUNK_SIZE` due to wrapping. Tell GCC
that it's not possible.
2025-01-13 20:05:43 +01:00
Itms
dc830ccf55
Switch main branch to Release 28 2025-01-12 01:27:02 +01:00
Dunedan
60c469bb64
Improve variable naming in check_diff.py 2025-01-11 21:44:52 +01:00
Dunedan
a92a4ff45c
Update the pre-commit hooks 2025-01-11 21:44:52 +01:00
Dunedan
235ea5cfb4
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.
2025-01-10 05:52:02 +01:00
Itms
3727c9dd3d
Small improvement to JS props iteration
Based on a suggestion by phosit on #7404.
2025-01-08 17:55:56 +01:00
Itms
e48b9ea106
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.
2025-01-08 11:39:17 +01:00
Itms
9f023825e0
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.
2025-01-07 13:51:45 +01:00
Vladislav Belov
8ee48a164a
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.
2025-01-07 02:49:38 +01:00
phosit
16c0db12a9 Remove leftover from 113fefeeb7
The string literal was implicitly converted to `true`.
This is likely a leftover from testing.
2025-01-06 21:40:15 +01:00
phosit
9637fcdb56 Remove comment on the constructor of CNetServer
The second line was forgotten to remove in 8eecc39e71.
The first line is useless.
2025-01-06 21:40:15 +01:00
Ralph Sennhauser
edde9fb4ee 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>
2025-01-06 06:59:14 +01:00
wowgetoffyourcellphone
c798a12815 Fix projectile modifier oversight and references
Update trigger script
Update Attack.js component
Update the relevant techs
Update unit_tables.py
2025-01-05 22:49:18 +01:00
phosit
7c1a566d3e Consistent coment length to seperate message-types 2025-01-05 19:57:12 +01:00
elexis
c9e76efe7b 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.
2025-01-05 19:57:12 +01:00
elexis
f932b8b9cc 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.)
2025-01-05 19:57:12 +01:00
phosit
21eddf0d39 Silence maybe-uninitialized warning in mongoose
Additionally list warnings in alphabetical order.
2025-01-05 15:30:41 +01:00
elexis
e19a5eda9f Fix changing view to observer
`id` was compared to the wrong player.
This defect was introduced in 023527e56e.
2025-01-05 15:16:41 +01:00
Vladislav Belov
0467d27b07
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`.
2025-01-05 00:27:02 +01:00