Commit Graph

29866 Commits

Author SHA1 Message Date
RoosterDragon
0c2d060d43 Use Array.IndexOf to speed up Shroud.Tick.
As the `touched` cell layer uses Boolean values, Array.IndexOf is able to use a fast vectorised search. Most values in the array are false, so the search is able to significantly improve the performance of finding the next true value in the array.
2023-11-04 18:46:08 +02:00
RoosterDragon
5157bc375d Add domain checks to HierarchicalPathFinder.
The domains in HierarchicalPathFinder can be compared to find disjoint areas. For example islands on a water map will belong to different domains. Use these domains in path searches to allow us to bail out early if a path is impossible, e.g. trying to path between different islands. Keeping the domains updated via the RebuildDomains method adds some cost to the average path search, but that savings from path searches that can bail early pays for this many times over.
2023-11-03 15:04:49 +02:00
abcdefg30
b35b560ca1 Add an Offset field to WithDamageOverlayInfo 2023-10-31 20:55:26 +02:00
Gustas
c0da41a18a Increase sound source pool size to the maximum 2023-10-31 00:43:47 +01:00
abcdefg30
d9f5588a1f Fix warnings about NREs in WithEmbeddedTurretSpriteBody 2023-10-30 23:37:52 +02:00
abcdefg30
61c3c252ea Remove an unnecessary variable assignment
The info is already set with the same name in the constructor
2023-10-30 23:37:52 +02:00
abcdefg30
ed3ca78667 Use TryGetValue instead of ContainsKey followed by indexing 2023-10-30 23:37:52 +02:00
abcdefg30
6fb7bb1c08 Silence warnings about multiple enumerations in AIUtils
This method only every receives a list as parameter
2023-10-30 23:37:52 +02:00
abcdefg30
57cef527ba Use Array.Find and List.Find instead of LINQ's FirstOrDefault 2023-10-30 23:37:52 +02:00
abcdefg30
48a2a75211 Use StringBuilder instead of manually appending strings in FieldSaver 2023-10-30 23:37:52 +02:00
abcdefg30
3f0159cd89 Index at 0 instead of using LINQ's First 2023-10-30 23:37:52 +02:00
abcdefg30
7baae40b2d Use Array.Exists and List.Exists instead of LINQ's Any 2023-10-30 23:37:52 +02:00
RoosterDragon
fc0bdce151 Fix RCS1239 2023-10-30 23:31:33 +02:00
RoosterDragon
64de28427c Fix RCS1227 2023-10-30 23:31:33 +02:00
RoosterDragon
c4ca3ca743 Fix RCS1226 2023-10-30 23:31:33 +02:00
RoosterDragon
724511e244 Fix RCS1225 2023-10-30 23:31:33 +02:00
RoosterDragon
e3646595ab Fix RCS1218 2023-10-30 23:31:33 +02:00
RoosterDragon
d2ecd0c777 Fix RCS1216 2023-10-30 23:31:33 +02:00
RoosterDragon
a24308baa5 Fix RCS1214 2023-10-30 23:31:33 +02:00
RoosterDragon
aa8e85fbf4 Fix RCS1192 2023-10-30 23:31:33 +02:00
RoosterDragon
11a892f991 Fix RCS1191 2023-10-30 23:31:33 +02:00
RoosterDragon
cf255fc78e Fix RCS1190 2023-10-30 23:31:33 +02:00
RoosterDragon
258de7a6fd Fix RCS1179 2023-10-30 23:31:33 +02:00
RoosterDragon
fcfee31972 Fix RCS1134 2023-10-30 23:31:33 +02:00
RoosterDragon
11b59b0a65 Fix RCS1132 2023-10-30 23:31:33 +02:00
RoosterDragon
0bb2bc651b Fix RCS1112 2023-10-30 23:31:33 +02:00
RoosterDragon
c63788b686 Fix RCS1099 2023-10-30 23:31:33 +02:00
RoosterDragon
60e86f563c Fix RCS1084 2023-10-30 23:31:33 +02:00
RoosterDragon
ce39e97b86 Fix RCS1080 2023-10-30 23:31:33 +02:00
RoosterDragon
06aa378dfd Fix RCS1074 2023-10-30 23:31:33 +02:00
RoosterDragon
43ebb93ff6 Fix RCS1071 2023-10-30 23:31:33 +02:00
RoosterDragon
4fe2ed3df0 Fix RCS1068 2023-10-30 23:31:33 +02:00
RoosterDragon
1a299d10ed Fix RCS1058 2023-10-30 23:31:33 +02:00
RoosterDragon
d1dc6293e8 Fix RCS1049 2023-10-30 23:31:33 +02:00
RoosterDragon
9f1ea57d3c Fix RCS1041 2023-10-30 23:31:33 +02:00
RoosterDragon
917b0512bf Enable Roslynator
Remove existing rules which were not enforced and have some existing violations. Enforce a suite of useful rules that have no existing violations.
2023-10-30 15:30:10 +01:00
michaeldgg2
b9b5b90330 Allow changing ZOffset of renderables in ActorPreviewPlaceBuildingPreview 2023-10-30 15:15:21 +01:00
RoosterDragon
216758dbc7 Fix Locomotor.CanMoveFreelyInto when using ignoreSelf.
The ignoreSelf flag is intended to allow the current actor to be ignored when checking for blocking actors. This check worked correctly for cells occupied by a single actor. When a cell was occupied by multiple actors, the check was only working if the current actor happened to be the first actor. This is incorrect, if the current actor is anywhere in the cell then this flag should apply.

This flag failing to be as effective as intended meant that checks in methods such as PathFinder.FindPathToTargetCells would consider the source cell inaccessible, when it should have considered the cell accessible. This is a disaster for performance as an inaccessible cell requires a slow fallback path that performs a local path search. This means pathfinding was unexpectedly slow when this occurred. One scenario is force attacking with a group of infantry sharing the same cell. They should benefit from this check to do a fast path search, but failed to benefit from this check and the search would be slow instead.

Applying the flag correctly resolves the performance impact.
2023-10-30 11:33:54 +02:00
Paul Chote
96dc085b35 Make lobby option tooltips work the same as factions. 2023-10-30 00:25:07 +02:00
Paul Chote
b28a3b6a5a Fix lobby faction tooltip rendering. 2023-10-30 00:25:07 +02:00
Paul Chote
500ee54f04 Fix margins of TD ingame menu panels. 2023-10-29 20:31:50 +02:00
Paul Chote
dd95b199b7 Fix a collection of mission browser UI issues. 2023-10-29 20:25:30 +02:00
Matthias Mailänder
3d9ac5a85e Update DiscordRichPresence to version 1.2.1.24. 2023-10-27 13:34:14 +03:00
Paul Chote
8503678fc7 Support loading sprites with pre-multiplied alpha. 2023-10-27 13:20:07 +03:00
Paul Chote
37ce5e447f Replace custom factpdox sprite with dynamically rendered vortex. 2023-10-27 10:37:28 +03:00
Paul Chote
44d7903a4b Add dynamic ChronoVortexRenderable. 2023-10-27 10:37:28 +03:00
Paul Chote
a3c0cee2cc Fix IRenderPostProcessPass texture unit binding. 2023-10-25 12:28:24 +03:00
Oliver Brakmann
4cc9b1be2b Allow actors to target terrain without force-fire 2023-10-24 22:13:43 +03:00
Paul Chote
f1fba1ed14 Fix shader type conversion. 2023-10-24 22:03:43 +03:00
Paul Chote
3bb42522b8 Pack vertex attributes and palette into a single integer bitfield. 2023-10-23 22:42:33 +03:00