Commit Graph

29815 Commits

Author SHA1 Message Date
RoosterDragon
c8efc5fdd7 Fix CA1854 2023-11-16 09:29:17 +02:00
RoosterDragon
c2568ebd1f Fix CA1851 2023-11-16 09:29:17 +02:00
RoosterDragon
2996a1ddde Fix CA1868 2023-11-16 09:29:17 +02:00
RoosterDragon
2ea2106eca Fix CA1865 2023-11-16 09:29:17 +02:00
RoosterDragon
9f526610dd Fix CA1864 2023-11-16 09:29:17 +02:00
RoosterDragon
3259737774 Add new .NET 8 rules to editorconfig.
Don't enforce the rules yet, since we are still targeting .NET 6.
2023-11-16 09:29:17 +02:00
RoosterDragon
360f24f609 Fix IDE0055
This rule no longer appears to be buggy, so enforce it. Some of the automated fixes are adjusted in order to improve the result. #pragma directives have no option to control indentation, so remove them where possible.
2023-11-16 08:45:10 +02:00
Paul Chote
60cbf79c9b Add to ReplacePaletteModifiers upgrade rule. 2023-11-15 20:52:03 +02:00
Paul Chote
d98017c140 Fix trike icon. 2023-11-15 20:52:03 +02:00
Paul Chote
c0ae7ea497 Remove PaletteFromScaledPalette. 2023-11-15 20:52:03 +02:00
Paul Chote
ac53b89421 Remove D2kFogPalette. 2023-11-15 20:52:03 +02:00
Paul Chote
46ba8ef5dd Remove effect*alpha palettes. 2023-11-15 20:52:03 +02:00
Paul Chote
cc0f116194 Remove custom deviator gas palette. 2023-11-15 20:52:03 +02:00
Paul Chote
8dc255f401 Fix sand animations. 2023-11-15 20:52:03 +02:00
Paul Chote
dd4bbc3546 Fix move flash. 2023-11-15 20:52:03 +02:00
Paul Chote
db0aabcb88 Fix starport and repair pad lights. 2023-11-15 20:52:03 +02:00
Svetlin Georfiev
a086fdaa5b A simplification done according to de Morgan's laws. 2023-11-15 19:41:45 +02:00
Svetlin Georfiev
ee6f8ae45d Improvement of cyclomatic complexity by fewer nestings. 2023-11-15 19:41:45 +02:00
Jakub Vesely
91802e6f10 ImportGen2Map: Fix imports of malformed maps.
Fixes #21126
2023-11-15 19:20:45 +02:00
RoosterDragon
d1797a021f Disable CA2241 try_determine_additional_string_formatting_methods_automatically
This is creating some false warnings, so disable for now.
2023-11-15 19:13:17 +02:00
RoosterDragon
3ae617c55b Fix CA2208 2023-11-15 19:13:17 +02:00
RoosterDragon
f6614c1c58 Fix CA1860 2023-11-15 19:13:17 +02:00
RoosterDragon
889de5e08a Fix CA1822 2023-11-15 19:13:17 +02:00
RoosterDragon
b97d1a4c6c Fix IDE0090 2023-11-15 19:13:17 +02:00
RoosterDragon
cfde0d7867 Fix IDE0001 2023-11-15 19:13:17 +02:00
RoosterDragon
399cef8fb2 Reset FPS counter on game start.
This avoids this displayed counter being dragged down by lower FPS during loading prior to the game starting.
2023-11-15 19:04:35 +02:00
RoosterDragon
58e447d8d0 Change FPS counter behaviour.
Calculate a rolling average of FPS over the last second. This allows the FPS counter to be updated every frame - and in particular means it can display a rough figure immediately rather than needing to wait one second to collect information at the start of a game.
2023-11-15 19:04:35 +02:00
RoosterDragon
43f339b91e Fix FPS counter showing initial high figure.
When the widget is created, use the current frame as reference rather than always using zero. That avoids the first FPS reading from a new widget calculating as if all frames rendered since the game started occurred in the first second.
2023-11-15 19:04:35 +02:00
Gustas
9534443771 Add the ability for technician and rocket soldier to fire from a pillbox 2023-11-15 14:09:32 +02:00
Gustas
39755a2fce Bump update rules to release-20231010 2023-11-15 07:38:51 +02:00
Paul Chote
73be3641ea Make Rectangle a readonly struct. 2023-11-14 20:33:36 +02:00
Paul Chote
03b413a892 Replace Rectangle widget bounds with a new WidgetBounds struct. 2023-11-14 20:33:36 +02:00
RoosterDragon
31c37662cf Play game started audio notifications just as the game starts.
Previously the StartGameNotification and MusicPlaylist traits used the IWorldLoaded interface to play an audio notification and begin music when the game started. However this interface is used by many traits to perform initial loading whilst the load screen was visible, and this loading can take time. Since the traits could run in any order, then audio notification might fire before another trait with a long loading time. This is not ideal as we want the time between the audio notification occurring and the player being able to interact to be as short and reliable as possible.

Now, we introduce a new IPostWorldLoaded which runs after all other loading activity, and we switch StartGameNotification and MusicPlaylist to use it. This allows timing sensitive traits that want to run right at the end of loading to fire reliably and with minimal delay. The player perception of hearing the notification and being able to interact is now much snappier.
2023-11-12 20:18:41 +02:00
RoosterDragon
57a452a705 Ensure PerfHistory is reset when starting a new game.
Ensure stale perf history data, to ensure the data is useful and the perf graph widget displays useful information.
- Remove stale data from the previous game when starting a new game. This avoids the graph showing values from the previous game when a new game starts.
- Remove data that was collected during loading. This avoids displaying data points that were collected whilst the loading screen was visible. Data collected whilst loading is not relevant to the in-game performance graph.

The performance graph when starting a new game will now display accurate information from the first tick of the game, whereas previously it displayed some stale information as well.
2023-11-12 20:18:41 +02:00
Paul Chote
9d174cd87d Add a button to reset lobby options to default. 2023-11-12 12:04:05 +02:00
RoosterDragon
9a3c39878d Fix RCS1236 2023-11-10 10:38:41 +02:00
RoosterDragon
498c6e3d8b Fix RCS1205 2023-11-10 10:38:41 +02:00
RoosterDragon
25cb3728ca Fix RCS1170 2023-11-10 10:38:41 +02:00
RoosterDragon
fbe147ce61 Fix RCS1118 2023-11-10 10:38:41 +02:00
RoosterDragon
eb287d9b8d Fix RCS1089 2023-11-10 10:38:41 +02:00
RoosterDragon
4dd787be13 Fix RCS1061 2023-11-10 10:38:41 +02:00
RoosterDragon
5d91b678bb Use spans to improve performance in StreamExts.
Also avoid ReadBytes calls that allocate a buffer by either updating the stream position (if not interested in the bytes), by reusing an input buffer (if interested in the bytes), or using a stackalloc buffer to avoid the allocation (for small reads).
2023-11-10 10:25:39 +02:00
Paul Chote
b3ee3551ca Prevent incompatible maps from being displayed in the map chooser. 2023-11-05 15:42:35 +02:00
Paul Chote
2e5ef7f059 Show the server map pool in the client map chooser.
Maps that aren't installed are queried from the resource center.
2023-11-05 15:42:35 +02:00
Paul Chote
72646fc7ff Add Server.MapPool setting for dedicated servers.
This takes a list of map UIDs which may be locally installed or hosted
on the resource center. If any maps aren't found, startup will be
delayed by up to 10 seconds while it attempts to query the resource
center.
2023-11-05 15:42:35 +02:00
Daniil Hayrapetyan
01fec1ae02 Fix buildings assigned ro wrong bases in harkonnen09a.lua
Update harkonnen09a.lua
Apply suggestions from code review

Co-Authored-By: JovialFeline <jms.happycat@gmail.com>
2023-11-04 21:02:47 +01:00
Jakub Vesely
3be1de230c Installers: Fix Steam library manifest parsing. Fixes #21129 2023-11-04 18:54:02 +02:00
RoosterDragon
e83e580f23 Don't clear/reset shroud when using the /all debug command.
Disabling the shroud is sufficient to allow seeing the map. This fixes a game with the "Explored Map" option enabled. Previously using the `/all` command twice to toggle it on and off again would also reset the shroud, causing the map to no longer be explored. Now, using it twice will cause the map to remain explored, as intended when the "Explored Map" option is enabled.
2023-11-04 18:46:08 +02:00
RoosterDragon
8e80117eb8 Use single dictionary call in Shroud.AddSource, Shroud.RemoveSource. 2023-11-04 18:46:08 +02:00
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