Commit Graph

25934 Commits

Author SHA1 Message Date
obelix 95ca5cebb6 Fix grammar for GenericName of germ Catafalque
Reported by @Vantha

Refs: #8755
2026-08-23 02:22:15 +02:00
joeybadz 74e1f088a0 Reduce serialization footprint in ResourceGatherer
Avoids serializing fields that can be derived at deserialization time to save serialization space

Fixes: #7263
2026-08-22 18:18:38 +02:00
phosit 7892a4f40f Fix "I will return" button
When temporarly leaving a multiplayer game the "I will return" button
didn't work. This was because there was no valid `closeSession`.
Since it requires accessing `this` the function can't be an arrow
function anymore.

Introduced in 2520c45220

Fixes: #9086
2026-08-20 21:35:18 +02:00
joeybadz 478acbdf5c Reconcile Teutobod's speed bonus and tooltip values
Updates the tooltip to match the actual speed bonus

Fixes #8864
2026-08-19 19:49:42 -04:00
Lancelot de Ferrière 4e04ccca4d UnitAI: properly follow queued return resources orders
GATHER.FINDINGNEWTARGET inserts a ReturnResource order ahead of the
next queued order when the unit is still carrying resources, but
skips doing so if the next order already returns those resources.
Unfortunately, the check was incorrectly written, missing a `.type`.
This meant we always added a fresh order.

Units could then sometimes return resources to the closest dropsites,
then move to the actually queued dropsite, which could lead to
unexpected pathing.

Introduced in 0dda3b579c where the feature was added.
2026-08-19 11:15:27 +02:00
joeybadz 2add365a4f Add camera view config options
Adds a variety of settings for the camera: scroll speed, zoom speed, smoothness, etc.

Fixes #4638
2026-08-19 04:19:45 +02:00
Lancelot de Ferrière 8acec374be Fix a ModifiersManager bug when changing player entities
The cache invalidation was incorrectly using forEach, which failed to invalidate the cache.
This never actually caused a bug because the game currently does not silently swap active player entities.
2026-08-16 17:37:51 +02:00
Fabio Pedretti 811ef65126 Fix: Correct control group iteration in ResolveFoundationCollisions
In `CCmpObstruction::ResolveFoundationCollisions`, the nested loop
intended to assign a persistent control group to colliding normal
entities was incorrectly iterating over `normalEnts` instead of
`persistentEnts`.

This caused the function to attempt to clobber default control groups
with other non-persistent groups, completely bypassing the intended
`ControlPersist` logic.

This patch fixes the inner loop to correctly iterate over
`persistentEnts`, ensuring foundations properly inherit persistent
control groups.

Fixes: 9ae084519f
2026-08-16 13:30:42 +02:00
phosit 6ffc251114 Make timedconfirmation.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit 0f939b8abf Make termsdialog.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit bf0c3af75a Make mod/gui/pregame/mainmenu.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit 497efe5a99 Make msgbox.js a module
Refs: #8081
2026-08-14 12:41:45 +02:00
phosit 609efa7e32 Make modmod/help/help.js a module
Refs: #8081
2026-08-14 12:41:44 +02:00
phosit 9adb3e7889 Make modmod.js a module
Actions in xml files only has access to the global scope, not the module
scope. So define them in the js file.

Refs: #8081
2026-08-14 12:41:44 +02:00
phosit 2c4f7d85b6 Make modio.js a module
Actions in xml files only has access to the global scope, not the module
scope. So define them in the js file.

Refs: #8081
2026-08-14 12:41:44 +02:00
phosit 8918cfb0a7 Make incompatible_mods.js a module
Refs: #8081
2026-08-14 12:41:44 +02:00
Atrik 1b07b799ec Add test for queries with visibility checks 2026-08-12 22:40:59 +02:00
Atrik 38b33b0484 Enable attacks on foes visible through shared LOS
Adds baseRange parameter to parabolic queries for combined
2D + parabolic detection. StandGround and Chase stances now
use attack range (parabolic) with vision as baseRange, allowing
units to attack enemies visible through friendly vision.
Buildings benefit as well via BuildingAI.
2026-08-12 22:40:59 +02:00
Atrik ceca608848 Filter out hidden targets in CanAttack
Units should not be able to attack entities with "hidden" visibility.
Visible and fogged (mirage/retainInFog) targets remain attackable.
2026-08-12 22:40:59 +02:00
Atrik f84b51212a Add tests for CanEverReachTarget and its helpers 2026-08-12 22:40:59 +02:00
Atrik fc3c0d7876 Prevent targeting unreachable turreted entities
Introduce CanEverReachTarget in the Attack component to check whether
a target is geometrically reachable at all, accounting for height
offsets and turreted units inside buildings.

For non-parabolic attacks (e.g. melee), a simple 3D distance check
from the closest approach point is used.

For parabolic attacks (e.g. ranged), the parabolic range formula
is used to determine if the height difference is surmountable
from the closest horizontal distance to the target.

Add GetClosestApproachDistanceToTurretPoint to TurretHolder
to estimate the minimum horizontal distance to a turret point,
using its local offset and the holder's obstruction size.
Passable buildings are not considered obstacles.

Fixes units on the ground trying to attack unreachable units on walls
or towers when the projectile's arc cannot reach the required height.
2026-08-12 22:40:59 +02:00
Atrik db23584fc3 Add GetEffectiveAttackRange wrapper
Wraps RangeManager.GetEffectiveParabolicRange for unified range
resolution. Maintains symmetry with GetRange(), improves readability,
and consistently translates NEVER_IN_RANGE.

Simplifies callers in UnitAI and Attack.
2026-08-12 22:40:59 +02:00
Atrik f12975e9b9 Fix range target detection for StandGround stance
StandGround units now use parabolic range queries to detect enemies,
accounting for terrain elevation and height offsets. This ensures
units on hills or when 'turreted', can detect enemies
that are in parabolic range but outside flat range.

Previously, StandGround detection used flat circular queries,
causing units to miss enemies in their elevation-buffed range.
Other stances are unaffected since they chase targets anyway.
2026-08-12 22:40:59 +02:00
Atrik 2bc895bf0d Rename cmp to rangeManager for clarity 2026-08-12 22:40:59 +02:00
Atrik 3c215aff47 Add some tests for GetEffectiveParabolicRange 2026-08-12 22:40:59 +02:00
Atrik 121d428ebb Fix terrain elevation not affecting attack range
The parabolic range formula in GetEffectiveParabolicRange was only
computating height differences from manual HeightOffset values,
completely ignoring actual terrain elevation.
This meant units on hills received no tactical advantage
despite the UI stat tooltip correctly showing extended ranges.

Fixes #8889
2026-08-12 22:40:59 +02:00
Atrik a8426f06a9 Fix renamed entities on TurretPoint
Oversights from fb1c0d2a82

Fixes #8808
2026-08-12 22:40:59 +02:00
Atrik 57a5740cce Remove dead territory ownership code 2026-08-12 22:40:59 +02:00
phosit 756b9b68c5 Expand the tooltip for population cap 2026-08-12 17:17:04 +02:00
phosit 9f6a309434 Readd description for gatherers to the tooltip
It was removed in dee2b73c7d since it wasn't noticed that it referred to
the number in the top panel. Adding the number should make this more
clear. The color is only applied to the number instead of the whole line
so that it's harder to mistake it with just some fancy formatting.

Fixes: #7851
2026-08-12 17:17:04 +02:00
Jonny McCullagh 1c2dbf2eb0 Add more diverse quotes 2026-08-10 10:53:00 +02:00
Ralph Sennhauser df72c1aad1 Support scroll-rotate in Atlas
Split mouse wheel scroll handling into horizontal and vertical. Keep
vertical scroll for zooming and use horizontal to rotate around the y
axis replicating the behaviour of the main game.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-08-10 09:00:07 +02:00
Dunedan 40ab70b804 Inline the pre-commit/action Github action
As the latest version of pre-commit is broken right now
(https://github.com/pre-commit/pre-commit/issues/3737) and the official
pre-commit Github action doesn't allow specifying an older pre-commit
version to use, this inlines the logic of the pre-commit action into our
action.
2026-08-09 07:20:49 +02:00
Stan f90804c78f Add macOS hint for game mode. 2026-08-07 14:09:25 +02:00
phosit d6bdf51d83 Remove CStr::FromInt64$
For the usecase it's better to use `fmt::format`.
2026-08-06 18:03:05 +02:00
phosit ae936e8177 Remove CStr::FromUInt
There is `std::to_string` which does the same. For most uses it's better
to use `fmt::format`.
2026-08-06 18:03:05 +02:00
phosit 06e199b12a Remove CStr::FromInt
There is `std::to_string` which does the same. For most uses it's better
to use `fmt::format`.
2026-08-06 18:03:05 +02:00
ShadowOfHassen 84567e66c2 Fix catafalque aura typos 2026-08-06 13:30:42 +02:00
Vladislav Belov c4e7364802 Removes unused BuildColor4ub from ModelRenderer
We don't need to calculate shading on CPU since we always use shaders.

Refs: a9c27b412b
2026-08-06 11:32:02 +02:00
Vladislav Belov 867bdf318b Fixes missing material reference in ModelRenderer
Missed in 18a16aa135
2026-08-06 10:31:16 +02:00
Vladislav Belov e64a138f92 Fixes outdated state on disabling GPU skinning 2026-08-04 23:06:12 +02:00
Vladislav Belov 4a7b7e7df1 Removes smart pointers from ModelRenderer
We don't need to use pointers because we know lifetimes of all
renderers. And its list statically defined. A new renderer should follow
DOD and use a separate submission list with a separate inplace renderer.
2026-08-04 23:06:10 +02:00
Vladislav Belov fa90ddc8b6 Refactors ModelRenderer and makes it closer to DOD
Separates submitted models and moder renderer and makes relations
explicit. Now it's clear that we don't need separate ModelRenderer and
ModelVertexRenderer.
2026-08-04 23:06:09 +02:00
Vladislav Belov 764a420797 Merges ModelRenderer and ShaderModelRenderer
We use only shaders to render models so we don't need a separate class.

BatchModelRenderer was renamed in 6bc33fe8bd.
m_Renderer became unused in 0346ba1b18.
2026-08-04 23:06:07 +02:00
Vladislav Belov 8a2bb10827 Renames ShaderModelRenderer instances 2026-08-04 23:06:06 +02:00
Vladislav Belov af9d102126 Removes legacy logic of reused ModelRendererPtr
It became unused in 4a69e9117e.
2026-08-04 23:06:04 +02:00
Ralph Sennhauser 822092fcb4 Fix set camera tooltip in Atlas player section
Refs: fe192fe58f
Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-08-04 17:22:21 +02:00
Ralph Sennhauser 6e79dc2f70 Use dynamic events for Cinema Section
Replace static events with dynamic events and name delete path function
more aptly.

Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
2026-08-04 17:04:22 +02:00
Dunedan 6fdcd68172 Update the actions used by the lint workflow 2026-08-04 10:09:22 +02:00
Dunedan e4f4030a5e Update the actions used by the checkrefs workflow
The workaround for the authentication problems isn't necessary with the
new version of the checkout action anymore.
2026-08-04 10:09:09 +02:00