Commit Graph

1420 Commits

Author SHA1 Message Date
Pavel Penev
256929073c Clean up some trait info loading code
Remove some methods that traits define to load their YAML values on their own.
2015-09-01 22:52:22 +03:00
Pavel Penev
899ea7e16d Add a description to DisableUpgrade 2015-09-01 20:19:31 +03:00
Pavel Penev
cdedfe6931 Don't get stuck in deployed mode because of an impossible move order 2015-09-01 20:19:29 +03:00
Pavel Penev
7668e0a30c Add deploy and undeploy sounds to DeployToUpgrade 2015-09-01 20:19:27 +03:00
Pavel Penev
21f9547fed Add facing to DeployToUpgrade
Make the actor turn to a desired facing before starting to deploy (and before granting the upgrade).
2015-09-01 20:19:25 +03:00
Pavel Penev
7d59aaa00c Add a deploy animation to DeployToUpgrade
Play a "deploy"/"undeploy" animation
2015-09-01 20:19:23 +03:00
Pavel Penev
3678e146cf Make WithVoxelBody upgradable 2015-09-01 20:19:21 +03:00
RoosterDragon
ac55c5bf09 Fix pathfinding using PriorityQueue incorrectly.
By providing a comparer that could change over time (as estimated costs on the graph were updated), this meant the priority queue could have its heap property invalidated and thus not maintain a correct ordering. Instead we store elements into the queue with their estimations at the time. This preserves the heap property and thus ensures the queue returns properly ordered results, although it may contain out of date estimations.

This also improves performance. The fixed comparer need not perform expensive lookups into the graph, but can instead use the readily available value. This speeds up adds and removes on the queue significantly.
2015-09-01 17:29:36 +01:00
RoosterDragon
77923a27c1 Tweak IPathSearch to avoid exposing the OpenQueue directly. 2015-09-01 17:29:36 +01:00
RoosterDragon
774992c246 Cache only unit paths in the pathfinder.
The path caching works on the assumption that the time saved from reusing a cached path outweights the cost of caching it in the first place.

For unit paths, this assumption holds. For path searchs, we spend more time caching them then we save when we get to reuse these cached paths. This is because they are reused less often, and calculating their key is more expensive in comparison.
2015-09-01 17:29:35 +01:00
reaperrr
7f7031d5c8 Update outdated description 2015-09-01 13:52:09 +02:00
Zimmermann Gyula
4aba64cc0f Fix armors. 2015-09-01 13:52:08 +02:00
RoosterDragon
0739fc80a3 Cache the speed modifiers enumerable, not just the traits, in Mobile. 2015-08-31 20:45:34 +01:00
RoosterDragon
76303e9699 In PathGraph.GetConnections, return a List of neighbors directly, rather than a LinkedList typed an IEnumerable.
The caller can enumerate the list more efficiently without the IEnumerable indirection, and the reduced memory allocation is marginally faster than allocating a linked list and several nodes.
2015-08-31 20:45:31 +01:00
RoosterDragon
7d44eb953e Reduce size of GraphConnection for allocation efficiency. 2015-08-31 20:45:29 +01:00
RoosterDragon
be59d045ce Only enumerate crushable traits once in MobileInfo.IsBlockedBy. 2015-08-31 20:45:25 +01:00
RoosterDragon
ac1658c9ce Refactor movement cost method to avoid repeated terrain information lookups.
As the world tileset is fixed, the pathfinder can look up the terrain information for that tileset on creation. This is implemented by the WorldMovementInfo struct. When calculating node costs, this allows the pathfinder to avoid having to repeat this expensive dictionary lookup on every node.
2015-08-31 20:43:18 +01:00
reaperrr
3175ef4d67 Merge pull request #9193 from Mailaender/quanbo-fixup
Fixed BodyOrientation refactor regressions
2015-08-31 20:12:53 +02:00
Matthias Mailänder
f60080e0ac Merge pull request #9186 from LavenderMoon/bleed
Combine Shrapnel into Bullet
2015-08-30 18:40:26 +02:00
reaperrr
c39c7cdc4e Fix d2k NukePower sequence requirement 2015-08-30 15:45:00 +02:00
reaperrr
9da56f51e2 Remove RenderBuilding 2015-08-30 15:44:59 +02:00
Matthias Mailänder
0b8d7708ef add more lint interfaces to reduce boiler plate 2015-08-30 13:12:25 +02:00
Lavender Moon
81e5b7866b Combine Shrapnel into Bullet 2015-08-30 06:37:38 -04:00
Matthias Mailänder
838faa4ae3 Merge pull request #9200 from penev92/bleed_upgradableResources
Make SeedsResource upgradable
2015-08-30 11:41:12 +02:00
Pavel Penev
55045d691a Make SeedsResource upgradable 2015-08-30 02:13:56 +03:00
reaperrr
bf51e0600d RenderBuildingWall -> WithWallSpriteBody 2015-08-30 00:22:53 +02:00
reaperrr
21186c10b6 RenderBuildingTurreted -> WithTurretedSpriteBody 2015-08-30 00:22:52 +02:00
reaperrr
69d062495c RenderBuildingSilo -> WithSiloAnimation 2015-08-29 23:33:18 +02:00
reaperrr
2df318cd3e RenderBuildingCharge -> WithChargeAnimation 2015-08-29 23:33:17 +02:00
reaperrr
bc2b60be05 Extend WithSpriteBody funtionality
Move building placement range circle to PlaceBuilding, add
PauseAnimationWhenDisabled.
2015-08-29 23:10:22 +02:00
Matthias Mailänder
539e25920c add missing spaces 2015-08-29 21:24:58 +02:00
Matthias Mailänder
25a0143b46 avoid unnecessary trait lookups 2015-08-29 18:58:30 +02:00
Matthias Mailänder
5fc8a413e6 emitError for undefined sequences 2015-08-29 08:18:52 +02:00
Matthias Mailänder
45f7526967 fix dereference after null check 2015-08-29 08:05:00 +02:00
Matthias Mailänder
fda39f7136 add missing ISync 2015-08-29 08:04:37 +02:00
Matthias Mailänder
9c1eeafa08 Merge pull request #9004 from reaperrr/quanbo
Introduce QuantizeFacingsFromSequence
2015-08-28 22:46:29 +02:00
RoosterDragon
637a87c33b Use a better name for HashSet in ExtractTraitDocsCommand.FriendlyTypeName. 2015-08-28 19:55:25 +01:00
Pavel Penev
d1a3bf97a6 Merge pull request #9105 from RoosterDragon/cmfi-refactor-perf
Mobile Blocking Refactor
2015-08-28 15:35:49 +03:00
RoosterDragon
6d183b6d63 Merge pull request #9178 from LavenderMoon/bleed
Move duplicate Tick() code from Plane and Helicopter to Aircraft.
2015-08-27 21:42:18 +01:00
RoosterDragon
42123d5653 Merge pull request #9143 from LipkeGu/mod_loadscreen_crash
LoadScreen: Do not crash when Image or Text is not defined.
2015-08-27 21:25:26 +01:00
Lavender Moon
4649c03260 Move duplicate Tick() code from Plane and Helicopter to Aircraft. 2015-08-27 16:21:51 -04:00
Guido L
bc39fcda98 LoadScreen: Add fallback message when no Text or Image is specified. 2015-08-25 20:44:38 +02:00
reaperrr
508c99655c Made Armor upgradable 2015-08-25 20:12:37 +02:00
Pavel Penev
d5e0bf2169 Merge pull request #9006 from reaperrr/remove-cantarget
Remove legacy 0% = not targetable assumption
2015-08-25 20:03:31 +03:00
reaperrr
aff1e5afe7 Upgrade notice 2015-08-25 18:54:01 +02:00
Pavel Penev
d48cf695f3 Merge pull request #9144 from Mailaender/opt-find-resource
Optimized FindResources worse case scenario path finding
2015-08-25 04:24:05 +03:00
abcdefg30
d5680f0ee0 Merge pull request #8952 from Mailaender/ts-debris-variation
Added more variation to Tiberian Sun debris
2015-08-24 22:02:13 +02:00
abcdefg30
67966ad704 Merge pull request #8731 from deniz1a/simplify-lobby-logic
Simplifies Start button logic in lobby
2015-08-24 21:27:05 +02:00
Matthias Mailänder
5c2849a08f add a simple projectile with random sequences for debris effects 2015-08-24 21:05:37 +02:00
Matthias Mailänder
2a21c7d1f2 don't let bots do 2x the amount of path searches 2015-08-24 21:03:46 +02:00