Commit Graph

30019 Commits

Author SHA1 Message Date
JovialFeline
ff5b5149b3 Add navy orders, fixes to Soviet 06a 2024-07-22 14:03:14 +03:00
Moritz Heller
81bcff0f8a Fix movement on ramps when moving to subcell
Fix movement on ramps when moving to subcell
2024-07-22 13:52:24 +03:00
tjk-ws
bdc142ae51 Fix a crash caused by invalid target in FlyAttack 2024-07-21 11:31:37 +02:00
Gustas
7b01204eed Spawn aircraft landed and occupying land or at cruise altitude 2024-07-20 18:47:58 +02:00
Gustas
734afd8bcf No need for dummy value 2024-07-20 18:47:58 +02:00
Matthias Mailänder
5ddc7b1177 Localize the faction dropdown. 2024-07-18 22:10:03 +03:00
Matthias Mailänder
59f6a6a2c2 Fix localisation on case sensitive file systems. 2024-07-18 22:10:03 +03:00
RoosterDragon
3716ffb3b5 Fix the remap for sprites in d2k.
Follow-up from 34ff23d030, the previous `-Remap:` line was not working and has since been removed. Without the remap being unapplied, there are rendering artefacts introduced as a result. Fix this by explicitly setting the remap to something else instead.
2024-07-18 21:55:02 +03:00
RoosterDragon
4312a4d3f4 Make MiniYaml inherits and removal more flexible
- Previously the Inherits syntax was only resolved when used for top-level nodes. Now it is also resolved for nested nodes as well.
- Previously the MiniYAML Merge feature supported the ability to remove nodes, but this only worked within the context of inherited nodes. Now, we allow node removal to work outside of the inheritance context.
2024-07-18 21:55:02 +03:00
Gustas
dccab8fd21 Fix PortableChrono not working 2024-07-17 20:36:57 +03:00
JovialFeline
0138bc9b3f Fix untranslated speakers 2024-07-17 19:39:17 +03:00
RoosterDragon
a5dd4ffe36 Cache teams in observer logic
The player state and teams are fixed after the game starts, so it is safe to cache the resulting teams in the observer logic rather than re-evaluating them each time.
2024-07-16 13:01:27 +03:00
Tocho Tochev
fb420e88bd Fix Survival01 mission objective 2024-07-16 12:54:49 +03:00
RoosterDragon
0d84804d81 Reduce lag spikes from SquadManagerBotModule.
Updating squads is the most expensive part of SquadManagerBotModule. It involves ticking the current squad state. This usually involves finding nearby enemies and evaluating the fuzzy state machine to decide whether to interact with those enemies. Since all the AI squads for a player get ordered on the same tick, this can result in a lag spike.

To reduce the impact, we'll spread out the updates over multiple ticks. This means overall all the AI squads will still be refreshed every interval, but it'll be a rolling update rather than all at once. By spreading out the updates we avoid a lag spike from the cumulative updates of all the squads. Now the lag spike is reduced to the worst any single squad update can incur.
2024-07-08 18:20:33 +03:00
RoosterDragon
b3168928c6 Remove unused previous state in AI StateMachine
The StateMachine offered a feature to remember the previous state and allow reverting to it. However this feature is unused. Remove it to allow the previous states to be reclaimed by the GC earlier.
2024-07-08 17:44:02 +03:00
RoosterDragon
c1de85f700 Improve performance of path-debug command.
If a long path was being visualized with the path-debug command it would generate renderables for everything on the path, even for parts of the path that would be offscreen. Add some simplistic culling so the performance impact is reduced.
2024-07-08 17:30:46 +03:00
Matthias Mailänder
387554acbb Fixed a crash on empty mission options. 2024-07-05 16:11:20 +03:00
michaeldgg2
446d37b832 WithDockingAnimation: remove unnecessary dependency on Harvester trait 2024-07-01 23:26:52 +03:00
Gustas
e9e6c4b988 Fix multiqueue 2024-07-01 23:13:13 +03:00
RoosterDragon
2ed0656d1b Introduce MoveCooldownHelper to prevent lag spikes from failed pathfinding
Several activities that queue child Move activities can get into a bad scenario where the actor is pathfinding and then gets stuck because the destination is unreachable. When the Move activity then completes, then parent activity sees it has yet to reach the destination and tries to move again. However, the actor is still blocked in the same spot as before and thus the movment finishes immediately. This causes a performance death spiral where the actor attempts to pathfind every tick. The pathfinding attempt can also be very expensive if it must exhaustively check the whole map to determine no route is possible.

In order to prevent blocked actors from running into this scenario, we introduce MoveCooldownHelper. In its default setup it allows the parent activity to bail out if the actor was blocked during a pathfinding attempt. This means the activity will be dropped rather than trying to move endlessly. It also has an option to allow retrying if pathfinding was blocked, but applies a cooldown to avoid the performance penalty. For activities such as Enter, this means the actors will still try and enter their target if it is unreachable, but will only attempt once a second now rather than every tick.

MoveAdjacentTo will now cancel if it fails to reach the destination. This fixes MoveOntoAndTurn to skip the Turn if the move didn't reach the intended destination. Any other derived classes will similarly benefit from skipping follow-up actions.
2024-07-01 15:56:11 +03:00
tjk-ws
fe35c42ead Make InstantlyRepairs properly support multiple types 2024-06-29 14:47:05 +03:00
tjk-ws
a16542e052 Always complete FlyAttack for a zero MaximumRange to avoid stalling 2024-06-29 14:15:39 +03:00
N.N
06cc47847d Spicebloom refactor
- pieces represent Min and Max instead of random interval
- More control where spice spread
- fix AoE in  SpiceExplosion weapon
- delay interval between each pieces

Co-Authored-By: Gustas <37534529+PunkPun@users.noreply.github.com>
2024-06-29 00:09:13 +03:00
tjk-ws
387e594f4a Allow hotkeying completed buildings whose icons are not visible on the production palette 2024-06-29 00:00:50 +03:00
Matthias Mailänder
0d97f3374c Fix a crash when the target is destroyed. 2024-06-26 21:46:30 +03:00
N.N
ccb1bd7a74 Enable paying upfront
Fix tab availability on low money

Co-Authored-By: Gustas <37534529+PunkPun@users.noreply.github.com>
2024-06-17 13:21:42 +03:00
tjk-ws
2a3271b0d0 Fix autotarget not checking all attack traits for targets 2024-06-17 12:01:07 +03:00
tjk-ws
6a7159e9a1 Fix aircraft that don't rearm stalling over invalid targets 2024-06-17 11:51:19 +03:00
RoosterDragon
cf0e73e75e Improve performance of copy-paste in map editor.
- EditorActorLayer now tracks previews on map with a SpatiallyPartitioned instead of a Dictionary. This allows the copy-paste logic to call an efficient PreviewsInCellRegion method, instead of asking for previews cell-by-cell.
- EditorActorPreview subscribes to the CellEntryChanged methods on the map. Previously the preview was refreshed regardless of which cell changed. Now the preview only regenerates if the preview's footprint has been affected.
2024-06-16 13:35:13 +03:00
RoosterDragon
34a68cd2ca Avoid keeping ActorInitializers in memory.
The SupportPowerManager and WithSpriteBody trait captured the ActorInitializer in lambda expressions, which keeps it alive as long as the trait. The lambdas didn't need to capture the ActorInitializer, so rejig them to allow the ActorInitializer to be reclaimed after the traits have been created. As the TypeDictionary in the ActorInitializer can be quite large, this helps reduce memory usage.
2024-06-16 13:19:07 +03:00
RoosterDragon
cac0438d48 Fix map editor copy-paste for isometric maps.
When dealing with isometric maps, the copy paste region needs to copy the CellCoords area covered by the CellRegion. This is equivalent to the selected rectangle on screen. Using the cell region itself invokes cell->map->cell conversion that doesn't roundtrip and thus some of the selected cells don't get copied.

Also when pasting terrain + actors, we need to fix the sequencing to clear actors on the current terrain, before adjusting the height and pasting in new actors. The current sequencing means we are clearing actors after having adjusted the terrain height, and affects the wrong area.
2024-06-15 15:53:42 +03:00
N.N
9302bac619 Replace BLOXMAS.R8 with R16 eqivalent
- file BLOXXMAS.R8 removed from mod content as its no longer needed
2024-06-08 22:11:50 +03:00
N.N
616046179f Fix engineer cannot restore ally vehicles 2024-06-03 12:46:44 +03:00
N.N
0c572a862c Fix actorSpawnManager use only one spawnpoint at the moment 2024-06-03 12:33:06 +03:00
Gustas
64b2bd4735 Update to HTTPS 2024-06-03 10:25:06 +02:00
Gustas
f337450348 Link no longer exists 2024-06-03 10:25:06 +02:00
Matthias Mailänder
bc29707e87 Mention infrastructure Patreon account. 2024-06-03 10:25:06 +02:00
Gustas
a20f5981e2 Fix TSVeinRenderer not having tooltip translated 2024-06-02 16:54:40 +02:00
darkademic
b693f20789 Fix crash caused by queuing multiple pick up orders for a single unit. 2024-05-27 15:03:21 +03:00
Matthias Mailänder
69d9bbb400 Unhardcode support power blocked cursor. 2024-05-19 14:43:59 +03:00
Matthias Mailänder
fc4ebf332d Deduplicate directional support powers. 2024-05-19 14:43:59 +03:00
dnqbob
1a3d3cd31e Add Firestrom generator (incomplete) 2024-05-19 14:35:09 +03:00
dnqbob
056420c834 Add WithSwitchableOverlay 2024-05-19 14:35:09 +03:00
Gustas
2af417bf49 Revert part of 377bb4b6cc 2024-05-11 22:14:38 +02:00
Kevin Streser
cbcd413ed1 Consider spectators for waiting filter condition 2024-05-07 22:24:37 +03:00
Matthias Mailänder
8c174551f5 Map pool update
- add Destroyable tiles into d2k mod
- add ability engineer to repair destroyed cliffs
2024-05-04 16:55:01 +02:00
Gustas
6b463f9d9e Remove color caches 2024-05-04 16:31:35 +02:00
Gustas
239891070d Make sure palettes are updated if colors are toggled in game runtime
And fix MutablePalette's not getting updated
2024-05-04 16:31:35 +02:00
Gustas
5fc36bd45f Make player stance colours universally respected 2024-05-04 16:31:35 +02:00
Gustas
2f331548e1 Remove player colors from healthbars 2024-05-04 16:31:35 +02:00