Commit Graph

24470 Commits

Author SHA1 Message Date
Lancelot de Ferrière 2f7ac026c1 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.
2025-01-02 16:59:13 +01:00
phosit a1a08f1890 Assign players to their slot from the savegame.
Based on a patch from @elexis.
2025-01-02 13:43:55 +01:00
phosit eafcb814cd Simplify playerassignments code
Deduplicate a check by moving it to isSlotAvailable.

Based on a patch by @elexis.
2025-01-02 13:43:55 +01:00
Stan fa19cb10fd Fix updating the OpenAL library
Some folders were not properly purged
2024-12-31 17:20:04 +01:00
Lancelot de Ferrière e24d01b0b1 Fix autostart issues reported by langbart in 2535e5f5b4 2024-12-31 10:09:07 +01:00
Lancelot de Ferrière e15ffd70b7 Fix Identity serialization following 533429e800
Failed to notice that name and controllable were sometimes changed.
2024-12-31 10:08:52 +01:00
phosit 9e740c84b9 Fix wrong variable name in caledonian_meadows
Defect introduced in 22a8f367f8.
2024-12-31 09:43:46 +01:00
phosit 54ce60e965 Fix error on large hights in Belgian Uplands
Defect introduced in 163063c2a4.
2024-12-31 09:43:46 +01:00
phosit 82513c9104 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.
2024-12-31 09:43:46 +01:00
wowgetoffyourcellphone da761ca501 Update the New Maps campaign file
Include new/updated skirmish maps and brand new random maps by @real_tabasco_sauce

Revert name and description strings only
2024-12-31 02:31:32 +01:00
Stan bce3a2a170 Fix the viking longship
- Apply Scale
- Rename mesh from Circle to viking_longship
- Remove useless material
- Add prop-projectile-prop point

Reported by: @Langbart
Fixes #7424
2024-12-31 02:25:35 +01:00
Stan 3499efe014 Add two missed files in previous commit 2024-12-30 23:42:34 +01:00
Stan df6ed56667 Add OpenAL Soft for macOS 2024-12-30 22:48:41 +01:00
Stan fd78034885 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
2024-12-30 22:23:05 +01:00
Stan dc60a095dc Fix the statue_discobolus_cover.dae mesh
Reported by: @Langbart
- Add missing UVMap
- Apply scale
- Remove unused material
- Rename mesh from Plane.003 to discobolus_cover

Fixes #7423
2024-12-30 22:17:30 +01:00
Stan 7315b4e59f Rename Ship Combat Demo to match conventions
Reported by: @Langbart
Refs #7422
2024-12-30 22:12:54 +01:00
Dunedan 1aeb19b535 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.
2024-12-30 18:47:05 +01:00
phosit fb9b02a9ba 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.
2024-12-30 15:23:31 +01:00
phosit 5c860c3121 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.
2024-12-30 15:23:31 +01:00
phosit b52c1c137f 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.
2024-12-30 15:23:31 +01:00
phosit 199aa8ac35 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
2024-12-30 15:23:31 +01:00
phosit 8636e4d0fd 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.
2024-12-30 15:23:31 +01:00
phosit 4c48661b4f 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.
2024-12-30 15:23:31 +01:00
phosit 96aa283e6a 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.
2024-12-30 15:23:31 +01:00
Stan f14a98e26f Bump minimum macOS SDK to 10.15
According to https://firefox-source-docs.mozilla.org/widget/cocoa/sdks.html Firefox doesn't support anything lower than 10.15 at runtime. So neither do we.
Fixes #7370
2024-12-30 11:14:59 +01:00
Lancelot de Ferrière a6693e8c1f Fix samply profiling of SM JS code 2024-12-30 09:13:06 +01:00
Ralph Sennhauser 28b0801e82 Print diff for ruff-format if check fails
It's a bit hard for contributors to figure out what ruff-format is
unhappy about if all they get is a return status of non zero. Enable
printing a diff with suggested changes with the pre-commit hook.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-30 06:23:22 +01:00
Vantha 33111dc816 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.
2024-12-29 22:21:28 +01:00
Vantha 314bc4185b Fix incorrect SpecificName syntax introduced in 94baa560b1 2024-12-29 22:21:28 +01:00
Dunedan 8a9813234e Remove GetFileMTime() 2024-12-29 09:32:17 +01:00
Dunedan 894e349ebf Add a deprecation warning for using GetFileMTime() 2024-12-29 09:32:17 +01:00
Dunedan ab0aee4cfa 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
2024-12-29 09:32:17 +01:00
Lancelot de Ferrière c2bb61fffc Fix terrain normals to account for angle 2024-12-28 13:25:07 +01:00
Dunedan 1268854587 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.
2024-12-28 12:10:07 +01:00
Dunedan fc7e4ae69e 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.
2024-12-28 08:52:13 +01:00
Lancelot de Ferrière 099a718e62 Fix pre A25 savegame compatibility 2024-12-28 08:47:35 +01:00
wowgetoffyourcellphone ba24b46693 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
2024-12-28 00:34:14 +01:00
wowgetoffyourcellphone 67bed64fd1 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
2024-12-28 00:33:50 +01:00
phosit e04506814a 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.
2024-12-27 19:32:03 +01:00
elexis 023527e56e 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.
2024-12-27 19:01:53 +01:00
Lancelot de Ferrière 40d3ea33d8 Fix tutorial autostart 2024-12-27 09:37:00 +01:00
scuti faa063ee42 Add myself to credits. 2024-12-26 16:14:38 +01:00
scuti a81c38bab9 Skip playing audio of corrupted files.
Prints a warning instead of crashing.

Fixes #7150
2024-12-26 16:14:38 +01:00
Ralph Sennhauser fb24d75f0e 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>
2024-12-26 14:11:43 +01:00
Dunedan 870b356ad9 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.
2024-12-25 19:20:35 +01:00
real_tabasco_sauce a4541a1745 Add "new" keyword to migration, foothills, and coast range
Fixes #7362
2024-12-25 15:56:55 +01:00
Stan b579e68d5d Fix casting autostart-size 2024-12-24 12:30:23 +01:00
elexis d12c015d43 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.
2024-12-23 08:09:18 +01:00
elexis 5b33dd0143 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.
2024-12-23 08:00:41 +01:00
Ralph Sennhauser 3c8760aa43 Add option categories to premake
Adding a category to newoption calls groups our options together instead
of mixing them with premake General options in --help output.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2024-12-23 06:15:32 +01:00