1
0
forked from mirrors/0ad
Commit Graph

24448 Commits

Author SHA1 Message Date
Stan 7e93b1ebfb Rename Ship Combat Demo to match conventions
Reported by: @Langbart
Refs #7422

(cherry picked from commit 7315b4e59f)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:18:35 +01:00
Dunedan eb937613ed Improve alignment of in-game top menu
This improves the alignment of the items of the top menu in-game. Icons
are now better centered and don't overflow anymore and the build label
text doesn't stack on low resolutions anymore either.

(cherry picked from commit 1aeb19b535)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:17:23 +01:00
phosit fb2255f7ee Never change the names in the "Player Name" column
The intent of this branch was to not change the names when a saved game
is loaded. So that one can see who was where in the saved game.
It was implemented wrong: The names didn't change when no savegame was
loaded and changed when a saved game was loaded.

This commit make the soved game case and no saved game case consistent.

Defect introduced in b90280855f.

(cherry picked from commit fb9b02a9ba)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:16:07 +01:00
phosit 8e3f5aa672 Respect the enabledness in PlayerColor
There is no way to show the `PlayerColor` as disabled. As the player
color is vilible without this it can simble be hidden when it is
disabled.

Defect introduced in b90280855f.

(cherry picked from commit 5c860c3121)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:16:07 +01:00
phosit e170daf3fc Load the PlayerNames dependant on their origin
`PlayerData` didn't contain the playerNames when serialized because they
should not be loaded when a new game is made. This lead to the issue
that client didn't receive the initial player names of saved games.

Now `fromInitAttributes` gets as a second parameter whether the
initAttributus are from persistent settings.

Defect introduced in b90280855f.

(cherry picked from commit b52c1c137f)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:16:06 +01:00
phosit 29fe043806 Rebuild the selection list when rendering an ai
When a saved game gets loaded ai's aren't always selectable. This lead
to errors when an ai actually gets selected.

Defect introduced in b90280855f

(cherry picked from commit 199aa8ac35)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:16:05 +01:00
phosit 5acddfec27 Render GameSettingsWarning on construction
`GameSettingsWarning` where only rendered when the settings change. When
a saved game is loaded it's possible this setting is enablet without the
setting being changed.

Defect introduced in b90280855f.

(cherry picked from commit 8636e4d0fd)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:16:04 +01:00
phosit 1b9dcba148 Disable mapbrowser when a saved game is loaded
Make it consistent with the "Browse Maps" buttow which is also
unavailable when a saved game is loaded.

Defect introduced in b90280855f.

(cherry picked from commit 4c48661b4f)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:16:03 +01:00
phosit c5d2ace30c Make MapPreview always listen to map changes
When loading a saved game the user can't change the maps but when
receiving the initAttributes from the host the map is "changed".

Defect introduced in b90280855f.

(cherry picked from commit 96aa283e6a)
Signed-off-by: Itms <itms@wildfiregames.com>
2025-01-01 22:15:57 +01:00
Vantha cd34f75f03 Fix phase names not updating on the structure tree
Reload all cached phase data when switching civ.
Add missing query for the generic phase technologies to the phase idents.

(cherry picked from commit 33111dc816)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-29 22:26:50 +01:00
Vantha 423bed914c Fix incorrect SpecificName syntax introduced in 94baa560b1
(cherry picked from commit 314bc4185b)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-29 22:26:36 +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
Dunedan 9cb6599112 Use MD5 hash for splash screen version check
Instead of using the file modification date, this uses the MD5 hash of
the file holding the content of the splash screen for the version check.
This ensures the splash screen isn't unintentionally shown again when
just the modification date of the file changes.

Fixes #4399

(cherry picked from commit ab0aee4cfa)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-29 22:25:25 +01:00
Dunedan d3062cdfda Improve layout of the match summary screen
This improves the layout of the summary screen, so text and displayed
values fit better. By doing so this also removed the need to specify a
"verticalOffset" for values, as they get vertically centered now.

(cherry picked from commit 1268854587)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-29 22:24:40 +01:00
Dunedan cece45f305 Small UI adjustments for better text fitting
When running 0ad with a language other than English, there are various
places where text doesn't properly fit. This adjusts the UI in a bunch
of these places to better accommodate longer strings as they appear in
other languages than English and to make the UI look more uniform in
general.

(cherry picked from commit fc7e4ae69e)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-28 11:31:30 +01:00
Lancelot de Ferrière 4a463e4476 Fix pre A25 savegame compatibility
(cherry picked from commit 099a718e62)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-28 11:31:09 +01:00
wowgetoffyourcellphone f3f8148a73 Fix normal map orientation for terrains
Fix normal map orientation for Terrains

- Terrains use "OpenGL" style normal maps, while 3D assets use "DirectX" style normal maps. So, fix all of the normal maps I can find with incorrect style normal maps.
- Set most terrains to angle="0" for more accurate shading. This negatively affects "tile" terrains, which we want to have a 45 degree angle, but helps all other terrains. aegean_paving_01 is an example of a permanent fix for this, which I will work on with Stan for R28.
- Adds a couple of really nice paving terrains for a new "Italy" terrain set.
- Adds a nicer "furrows" normal map for farmland terrain
- Improved persian city tile normal by @wraitii

(cherry picked from commit ba24b46693)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-28 11:30:29 +01:00
wowgetoffyourcellphone d125cf40a5 Last minute art changes and fixes.
New AO maps for statues by @nifa (which fixes the Discobolus ao error)
New quiver for Persian Immortal
Remove bad smoothing for Chinese rice hat
Remove some noise from a couple of structure skins
Add garrison flag prop points to Greek theaters
Make garrisoned flags unselectable. Requested by @real_tabasco_sauce
Update han_ricehat.dae

(cherry picked from commit 67bed64fd1)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-28 11:30:02 +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
Lancelot de Ferrière ef9001e7bf Fix tutorial autostart
(cherry picked from commit 40d3ea33d8)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-28 11:25:25 +01:00
scuti 99ebeeb39b Skip playing audio of corrupted files.
Prints a warning instead of crashing.

Fixes #7150

(cherry picked from commit a81c38bab9)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-26 22:33:19 +01:00
Ralph Sennhauser 2b8a4fabcf Bump release version to 0.27.0
Also drop build version component as we never used it in earlier
releases either. This will also make replays et al be stored in a
directory 0.27.0 similar to earlier releases.

The build version component was introduced in 028ec40165

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
(cherry picked from commit fb24d75f0e)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-26 22:31:01 +01:00
Dunedan 11234558b7 Fix font size of error for incompatible save games
The font size in the error message dialog for incompatible save games
was way larger than usual. This fixes that, by removing the arbitrarily
applied font size.

(cherry picked from commit 870b356ad9)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-25 22:51:00 +01:00
real_tabasco_sauce fdc8f718a9 Add "new" keyword to migration, foothills, and coast range
Fixes #7362

(cherry picked from commit a4541a1745)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-25 22:49:59 +01:00
Stan b08cf81fff Fix casting autostart-size
(cherry picked from commit b579e68d5d)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-24 17:14:40 +01:00
elexis 7c6d2eef93 Erase client state hash on disconnect
Fix `NetServerTurnManager` from pausing the simulation forever after a
client sent a bad hash to it and disconnects before the bad hash has
been processed.

A client that sends a wrong simulation hash to the `NetServer` and
disconnects before the server compares that hash causes a message box to
appear and the game to be paused forever.
94e5d88169 introduced the bug by missing to delete `m_ClientStateHashes
upon `UninitialiseClient.
This causes `m_ClientData[hashPair.first].isOOS = true` to insert a
client with blank values that the `NetServerTurnManager` will wait
forever and hence the message box about an OOS with no players being OOS
is shown (the playername is emptystring).

5ebf2020b0 exposed the bug by making observers able to lag behind,
providing a longe enough timeframe for this to occur.

Fix:
Deleting `m_ClientStateHashes` upon disconnect solves the broken
message box and the pausing.

(cherry picked from commit d12c015d43)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-23 10:34:26 +01:00
elexis c689991b9e Exclude fireships and scoutships from Danubius
These ship types were introduced in d51b4687e9. Danubius isn't designed
to use these ship types, as it uses ships to garrison 30 units.

(cherry picked from commit 5b33dd0143)
Signed-off-by: Itms <itms@wildfiregames.com>
2024-12-23 10:32:52 +01:00
Itms ba0e2d0217 Self-host gloox tarball
Upstream seems less and less reliable, with the bug tracker inaccessible
and the website now entirely down.
2024-12-22 11:19:05 +01:00
Itms 9f6699d964 Adapt bundles pipeline to the git environment 2024-12-21 23:03:25 +01:00
Itms c9e4eb1539 Fix amd64 cross-compilation on macOS 2024-12-21 23:03:24 +01:00
real_tabasco_sauce 6b7dfb005e Balance non-random arrows
-Increase default arrow firepower for buildings, decrease garrisoned firepower.
-Add a 20% building damage by by phase.
-Give the fortress a minimum range.
-Allow murder holes to be researched from the fort.
-Sentries uses a multiplicative bonus instead of adding 1 arrow.
-adds a new tech to the fort to increase its default arrows by 6.
2024-12-21 22:48:01 +01:00
real_tabasco_sauce 7c95b6700b Add non-random building AI
-lets building arrows target the closest unit by default.
-adds player control of building arrows.
-adds a tooltip to explain how to control arrows.
-Uses "F" for focus fire and concurrently use "F" for force-attack, since "C" is capture.
2024-12-21 22:48:01 +01:00
Vantha bae50fe4f7 More SpecificName improvements 2024-12-21 22:35:24 +01:00
Carl-O 94baa560b1 Enrichment of SpecificNames
- Fix pinyin on The Art of War technology
- Add Doric SpecificName of the Agoge
- Add SpecificNames of Town and City phases, as well as of overlooked
Village phase (the latter for Structure Tree purposes)
- Add SpecificName for the Mauryan wonder
2024-12-21 22:20:09 +01:00
Lancelot de Ferrière f3f695b90e Fix aura/overlay visibility in FOW 2024-12-21 21:24:11 +01:00
Stan f27afa5c17 Update Windows libs reference commit
Fixes: #6991
Refs: #3004
2024-12-21 18:31:09 +01:00
Itms 62f67f5870 Match structree size with civ overview
Refs #7316
2024-12-21 14:36:19 +01:00
Dunedan 0092640024 Move the lobby menu item to the top
This moves the lobby menu item to the top of the multiplayer menu to
make it easier to find for new players and as it's probably to most used
item in that menu anyway.
2024-12-21 14:14:37 +01:00
Ralph Sennhauser 00813ff99a Backport premake extra arch support
Grab upstream patches adding support for building premake on riscv64
[1], loongarch64 [2], and e2k [3].

[1] 82c9d90495940e2d0d574e1c7849e9698f23b090
[2] 928397f72c00979d57ec4688cb1fb26ec7f2449b
[3] 5c524b6d53307bcb4ba7b02c9dba20100df68943

Fixes: #7346
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-21 12:10:03 +01:00
real_tabasco_sauce 409ba0bab5 Add art to complete the visuals of the roman reforms
Instead of removing units from the roster, we provide actors so they can be reskinned into more historically accuracte units.
Add an auxiliary spear cavalry actor and portrait
Improve the auxiliary javelin cavalry actor and portrait
Add a levy auxiliary spearman actor and portrait to replace triari
Add a champion "first cohort legionary" to replace the extraordinarius and its portrait
2024-12-21 11:45:09 +01:00
real_tabasco_sauce da8551e419 Fix Onager and make the roman reforms cheaper
-Part one of updates to roman reforms.
-account for the use of antesignanus instead of lanciarius
-train the onager from the army camp and add non-random arrow balance.
2024-12-21 11:45:09 +01:00
Ralph Sennhauser 949d5f8c0b Check for WX in premake and rename atlas option
The option --atlas is oddly different than any other feature flag,
change it to be in line with the others and enable it by default. The
new option is --without-atlas.

As the WX binaries aren't precompiled for Windows automagically disable
atlas there for users running the batchfile through filemanger if WX is
missing.

On *nix not providing a valid wx-config whith enabled atlas is
considered an error.

Fixes: #6401
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-21 10:03:12 +01:00
Ralph Sennhauser c09d12a959 Add missing wildcard in gitignore
In a5fec576f9 the reqired wildcard wasn't added.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-21 10:03:12 +01:00
Ralph Sennhauser 9db50f48e7 Add help to build-source-libs.sh
The number of options is increasing, add a --help option to print usage
and available options.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-21 09:18:16 +01:00
Feldfeld a0fee91f1e Correct civ bonus description for Polybolos and Agoge
They were missed in 82877e03a1 / #7288 and b0ba7bd33a / #7289
2024-12-20 21:37:15 +01:00
Vantha d7dda097e1 Extend the tips page for multiple images per tip
Enable the Tips and Tricks page to show multiple images for each tip.
Add a small GUI panel below the image for switching between them.
Only show it when the current tip has more than one images.

Introduce tipfiles.json to assign images to the text files.
(And stop of relying on file naming)

Add a tip about wonders, and make some slight changes to other texts.
Improve existing tip images and add a bunch of new ones.
2024-12-20 19:46:07 +01:00
real_tabasco_sauce a949940ff8 Adjust units trainable in persian buildings
-Cavalry Javelineer moved to the front of the cavalry in the CC to match other civs.
-Allow the barracks to train both types of the immortal and ensure the unlock tech applies to the archer.
2024-12-20 19:22:32 +01:00
phosit b90280855f Multiplayer saved games
Enables to save multiplayer games.
When the savegame is loaded, the settings are frozen (except the non-AI-player assignment settings).
2024-12-19 21:36:51 +01:00
phosit 20b4937ffd Enable multiple RequestTypes 2024-12-19 21:36:51 +01:00