1
1
forked from 0ad/0ad
Commit Graph

23846 Commits

Author SHA1 Message Date
abe2ab4f08 Don't show the amount in the mutli-entity view when merely one type of a unit is selected.
Patch by: @abian
Differential revision: https://code.wildfiregames.com/D5075
Fixes #6841

This was SVN commit r27801.
2023-08-16 09:56:57 +00:00
48de9e32f0 Fix performance drop and memory leak on networked AI matches.
When playing a network game with at least one AI, and an AI dies, after
a while there will be an increasing lag on the system, eventually
freezing the screen for e.g. 4 seconds every 5 seconds.
It turned out that once the AI is dead, the savedEvents grew endlessly.
Causing issues down the line (hashing).

That is now fixed by discarding savedEvents when the AI is defeated.

Patch by: @lairkers
Differential revision: https://code.wildfiregames.com/D5042
Comments by: @phosit, @wraitii
This was SVN commit r27800.
2023-08-16 09:48:24 +00:00
5ba7ec3bfa Removes scissor backend setup from GUI.
Differential Revision: https://code.wildfiregames.com/D5051
This was SVN commit r27798.
2023-08-15 17:29:45 +00:00
23f1949e2a Handles VK_INCOMPLETE for vkGetSwapchainImagesKHR.
Differential Revision: https://code.wildfiregames.com/D5090
This was SVN commit r27797.
2023-08-15 17:27:23 +00:00
bb
82204a6db9 Fix the test_checkDiff translation tool tester
Differential Revision: D5091
This was SVN commit r27796.
2023-08-14 20:23:09 +00:00
3bb17ea06c Fix Liu Bang's cavalry attack aura
Reported here: https://wildfiregames.com/forum/topic/107591-hero-bug/

Fixes #6837

Differential Revision: D5080
Accepted by: Freagarach
Comments by: sera and real_tabasco_sauce
This was SVN commit r27794.
2023-08-12 16:59:13 +00:00
bb
5cb9e32b73 Add linter rule detecting project name misspellings.
Reviewed By: Freagarach
Differential Revision: D4313
This was SVN commit r27787.
2023-07-27 20:56:52 +00:00
bb
157c6af18e Make the space in 0 A.D. non-breaking throughout the codebase.
Avoid cases of filenames
Update years in terms and other legal(ish) documents
Don't update years in license headers, since change is not meaningful

Will add linter rule in seperate commit

Happy recompiling everyone!

Original Patch By: Nescio
Comment By: Gallaecio
Differential Revision: D2620
This was SVN commit r27786.
2023-07-27 20:54:46 +00:00
94e30ae08e Adds mipLODBias usage to Vulkan samplers.
This was SVN commit r27784.
2023-07-25 20:22:28 +00:00
80bcf944bc Don't convert actions to void*
Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5044
This was SVN commit r27783.
2023-07-25 07:50:33 +00:00
909a81bc87 Correct syntax mistakes made in b7d776175b
Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5068
This was SVN commit r27781.
2023-07-24 08:19:19 +00:00
2f930661ce Differentiate Athenians.
This gives them a new hero (Hippocrates; recruitable from the tempel)
and some unique Naval bonuses.

Patch by: @borg-
Differential revision: https://code.wildfiregames.com/D3727
Accepted by: @real_tabasco_sauce
Comments by: @chrstgtr, @ValihrAnt, @wowgetoffyourcellphone
This was SVN commit r27779.
2023-07-22 14:52:34 +00:00
c5de5f0fb2 Add descriptions to formations.
Patch by: @abian
Differential revision: https://code.wildfiregames.com/D5074
Fixes #6838
Comment by: @real_tabasco_sauce
This was SVN commit r27778.
2023-07-22 14:14:03 +00:00
bc85236a38 Fix formation slow-down after stopping.
Introduced in 291f17b3c5.
Reported by @gameboy at
https://wildfiregames.com/forum/topic/107588-problems-with-different-queues-when-marching/.

Differential revision: https://code.wildfiregames.com/D5064
Comment by: @wraitii
This was SVN commit r27777.
2023-07-22 14:04:59 +00:00
557f911479 Fix missing ? in 435d842bc1.
Noticed by @elexis.

This was SVN commit r27776.
2023-07-22 13:56:28 +00:00
7da94fc18f Differentiate Sparta.
This differentiates Sparta by giving them P1 champions, a Hero-oriented
team bonus and a new unit.

Sparta should rely heavily on their extremely powerful melee infantry,
hence the focus is on that with choice and upgrade.

Patch by: @borg-
Differential revision: https://code.wildfiregames.com/D4736
Accepted by: @chrstgtr, @real_tabasco_sauce
Comments by: @Langbart, @marder, @wowgetoffyourcellphone
This was SVN commit r27775.
2023-07-22 13:54:09 +00:00
e4ba25ba35 Returns Windows paths by value to avoid unnecessary allocation management and follow sys_ExecutablePathname.
This was SVN commit r27773.
2023-07-21 22:31:26 +00:00
ede3605b2f Removes forbidden and unused USE_SPECULAR from model shader.
This was SVN commit r27770.
2023-07-19 18:04:40 +00:00
f2938aaa28 Refactors normal calculation in model and terrain shaders.
Differential Revision: https://code.wildfiregames.com/D5081
This was SVN commit r27769.
2023-07-19 17:29:13 +00:00
8b761fec29 Constrain the FSM-transition to have at most one action.
Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5059
This was SVN commit r27768.
2023-07-19 12:23:53 +00:00
1ff0b8f69f Removes caching Windows version in wversion.
Differential Revision: https://code.wildfiregames.com/D5063
This was SVN commit r27766.
2023-07-18 20:40:15 +00:00
f36f136c20 Moves WriteSystemInfo from Util to HWDetect.
Differential Revision: https://code.wildfiregames.com/D5050
This was SVN commit r27765.
2023-07-18 20:32:21 +00:00
70d89254c8 Fixes linking failure solution introduced in 48ba4d9cb4 for SDL dependency.
Refs #3138

Accepted By: Itms
Differential Revision: https://code.wildfiregames.com/D5065
This was SVN commit r27764.
2023-07-18 20:21:59 +00:00
7378692c89 Fixes CGUISimpleSetting warnings and allows it to be moved.
Differential Revision: https://code.wildfiregames.com/D5071
This was SVN commit r27763.
2023-07-18 20:01:22 +00:00
5807e2982f Makes GL ShaderProgram stage independent.
Differential Revision: https://code.wildfiregames.com/D5069
This was SVN commit r27761.
2023-07-17 22:07:13 +00:00
649f69b00b Reference CModel* using PS::span in the ModelRenderer
Now a range-based for loop is used to iterate.

Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4953
This was SVN commit r27757.
2023-07-08 12:46:21 +00:00
85bc074ae5 Moves script interface Object include out of FunctionWrapper header.
Differential Revision: https://code.wildfiregames.com/D5067
This was SVN commit r27755.
2023-07-07 20:12:16 +00:00
624df119ef Fixes Windows build for some configurations after 70e7acfb26.
The divergence for /DELAY* options was started in 137487c521.
Refs 2405a98b58 and 09df66f871, ec3452679c, 82dc962a56, 137487c521.

Differential Revision: https://code.wildfiregames.com/D5070
This was SVN commit r27752.
2023-07-05 20:31:56 +00:00
47a7f78c9d Change %c to %lc for wchar arguments.
swprintf_s expected an argument of type char (due to %c). Given an
argument of type wchar.
This fixes N7 and N8 from #5288

Refs #5288

Patch By: @animus
Accepted By: @phosit, @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D4993
This was SVN commit r27751.
2023-07-05 07:37:28 +00:00
e60bed753f Removes redundant and unused wutil_ExecutablePath as we have sys_ExecutablePathname.
Last usage was removed in ada16439ab.

This was SVN commit r27749.
2023-07-02 21:24:15 +00:00
0caddf2c89 Removes unused wutil_SystemPath forgotten in 9aad0137ba.
This was SVN commit r27748.
2023-07-02 21:19:07 +00:00
a71a20cb60 Replaces statically cached current thread handle on Windows by lazy initialized thread_local variable.
Differential Revision: https://code.wildfiregames.com/D5062
This was SVN commit r27747.
2023-07-02 20:28:50 +00:00
4e86f99fe2 Replaces boost string general includes by more precise ones.
Differential Revision: https://code.wildfiregames.com/D5066
This was SVN commit r27746.
2023-06-30 19:10:13 +00:00
a9fc21fae7 Fixes printing a log of a GL shader compilation following b193633e59.
This was SVN commit r27745.
2023-06-30 10:02:24 +00:00
b193633e59 Moves GLSL compiling function out of CShaderProgram as it's independent.
This was SVN commit r27743.
2023-06-27 21:27:56 +00:00
b7d776175b Add a test for the FSM
Accepted By: @wraitii
Differential Revision: https://code.wildfiregames.com/D4902
This was SVN commit r27742.
2023-06-27 19:20:41 +00:00
766b0820f7 Use std::function in the Loader.
Accepted By: @wraitii
Differential Revision: https://code.wildfiregames.com/D4989
This was SVN commit r27740.
2023-06-26 18:35:34 +00:00
f3adb5d075 Removes unused main_window_name forgotten in 63c1347ef7.
This was SVN commit r27738.
2023-06-25 22:39:37 +00:00
ce25351443 Fix typo in CanTrade.
Introduced in c917c39a0d.
Reported by @gameboy at
https://wildfiregames.com/forum/topic/107586-an-error-occurred/?do=findComment&comment=553753.

Also adds a small test.

Differential revision: https://code.wildfiregames.com/D5060
Reviewed by: @wraitii
This was SVN commit r27737.
2023-06-23 12:58:14 +00:00
435d842bc1 Fix Gaia not being its own mutual ally.
For `!0 === false`.
Reported by: @gameboy at
https://wildfiregames.com/forum/topic/107586-an-error-occurred/.
Introduced in c917c39a0d.

Differential revision: https://code.wildfiregames.com/D5058
Reviewed by: @wraitii
This was SVN commit r27736.
2023-06-23 12:53:49 +00:00
f4caf15710 Fix missed allied view tech in init.
Noticed by @gameboy at
https://wildfiregames.com/forum/topic/107586-an-error-occurred/.
Introduced in c917c39a0d.

Differential revision: https://code.wildfiregames.com/D5057
Reviewed by: @wraitii
This was SVN commit r27735.
2023-06-23 12:51:03 +00:00
fb065a4022 Removes manual loading of Windows functions unavailable on XP from wvm.
This was SVN commit r27734.
2023-06-23 12:09:33 +00:00
70e7acfb26 Removes manual unload of delay-loaded DLLs on Windows.
Differential Revision: https://code.wildfiregames.com/D5056
This was SVN commit r27733.
2023-06-23 11:55:33 +00:00
3190729f85 Small bugfix in Petra's Defense manager
We were incorrectly comparing an object to a number.
I don't think this will drastically change the AI behaviour as it's
rather an edge case.

Reviewed By: Freagarach
Differential Revision: https://code.wildfiregames.com/D5030
This was SVN commit r27732.
2023-06-23 07:22:43 +00:00
7df7566d7c Fix 'Options' asking for confirmation without changes during a game.
Since 281bb0b2ec, opening the 'Options' menu in-game will show that
there are pending changes, even if the user has done nothing.
Unfortunately the cinematic logic to hide silhouettes, which comes from
cfd08bbf28, is broken following those changes. We use the configuration
to hide them, which results in us, indeed, changing the configuration.

There isn't really a good short term fix. This change only attemps to
reset the setting if we changed it for a cinematic, which fixes the
issue, but has drawbacks.
Ideally, we would use a superior config level, but we need to be careful
about exposing that to JS.

Reported by: langbart
Fixes #6821

Differential Revision: https://code.wildfiregames.com/D5040
This was SVN commit r27730.
2023-06-23 07:19:16 +00:00
87063a94ff Pass ScriptRequest instead of ScriptInterface in simulation messages.
The previous code was constructing un-necessary ScriptRequest objects.
Minor optimisation from not entering/leaving realms.

Differential Revision: https://code.wildfiregames.com/D5026
This was SVN commit r27728.
2023-06-21 07:50:00 +00:00
dafa5ab774 Minor optimisations when calling JS functions from C++
ScriptFunction::Call_ checks HasProperty, but then JS_CallFunctionName
calls GetProperty. This is redundant and can be simplified.

Reviewed By: phosit
Differential Revision: https://code.wildfiregames.com/D5000
This was SVN commit r27726.
2023-06-20 11:40:18 +00:00
92c9cc5206 Removes delayed loading of RtlCaptureContext as it's available since Windows XP.
This was SVN commit r27725.
2023-06-20 08:54:29 +00:00
73ec56a44e Optimisations to vertex pathfinder - relax optimality, sort unaligned edges
Two changes to the vertex pathfinder that should generally improve
performance:
 - Sort unaligned edges by distance like we did aligned edges. This
isn't very scientific, but the idea is generally sound, and empirically
it seems to do OK.
 - Relax the optimality by using a weighted heuristic, with weight 4/3
or 5/3 depending on the number of obstacles around. In the worst cases,
A* will return paths that are this many times less optimal, but search
should be faster in general (and sometimes much faster).

Both of these optimisations might increase the constant-cost slightly,
but should decrease the worst-case runtimes.

Differential Revision: https://code.wildfiregames.com/D5034
This was SVN commit r27724.
2023-06-20 07:14:11 +00:00
c917c39a0d Pull Diplomacy out of cmpPlayer.
Who says only players should be able to conduct diplomacy?
Also separation of concerns, more maintainable files.

Differential revision: https://code.wildfiregames.com/D4921
Comments by: @elexis, @Stan
Refs. #5894

This was SVN commit r27722.
2023-06-19 06:33:33 +00:00