Commit Graph

1306 Commits

Author SHA1 Message Date
Pavel Penev
9ed7ef10b9 Merge pull request #8227 from obrakmann/fix8219_rise_of_the_undead_bridges
Fix broken bridges being initialized with a non-zero HP value
2015-05-24 15:05:29 +03:00
Oliver Brakmann
d9f0ca362f Fix broken bridges being initialized with a non-zero HP value 2015-05-24 02:02:20 +02:00
reaperrr
5f68516070 Cleaned up IVoiced-related code.
Added Volume control and descriptions to Voiced.

Streamline voice checks in WorldUtils and DeathSounds.
2015-05-22 01:51:54 +02:00
reaperrr
251d3e6864 Move PlayVoice and PlayVoiceLocal from Sound to Voiced.
Move HasVoice, HasVoices and GetVoices from WorldUtils to Voiced.
2015-05-22 01:51:53 +02:00
reaperrr
0d05fdefbb Extract actor voice set into Voiced trait 2015-05-22 01:51:51 +02:00
deniz1a
e290975952 Reverts #8097.
It caused units not targeting enemies under fog even with satellite.
2015-05-21 00:24:27 +03:00
Oliver Brakmann
9397749118 Merge pull request #8097 from deniz1a/cloaked-targetability
Fixes location of phase transport being revealed by attack line.
2015-05-18 23:04:09 +02:00
deniz1a
db38f52721 Fixes location of phase transport being revealed by attack line. 2015-05-16 15:20:07 +03:00
Paul Chote
9e5e1f1a89 Add methods to IOccupySpaceInfo. 2015-05-15 17:08:31 +01:00
Paul Chote
7eae157ad8 Rework player palette loading. 2015-05-10 00:01:14 +01:00
abcdefg30
8d2307db83 Convert the float health percentage to an int one 2015-05-01 14:16:19 +02:00
Paul Chote
f46e15c63e Separate terrain geometry visualization from DevMode.
Also adds a “terrainoverlay" console command.
2015-04-29 05:26:50 +12:00
Paul Chote
098d69f120 Prevent resources from spawning on ramps. 2015-04-27 19:21:12 +12:00
RoosterDragon
2937a31463 Make IsDisabled a method on Actor.
This allows us to cache the disabled traits, which simplifies life for some callers since we relieve them of having to cache it, as well as improving perf for all IsDisabled calls.
2015-04-25 20:42:26 +01:00
Oliver Brakmann
a48a878a71 Merge pull request #7983 from pchote/radar-colors
Adjust IRadarSignature to support per-cell colors.
2015-04-25 16:38:28 +02:00
Matthias Mailänder
1476a0eb70 Merge pull request #7847 from RoosterDragon/screen-map-refactor-perf
Refactored ScreenMap & improved perf of updates, removals and region lookups
2015-04-25 10:12:52 +02:00
RoosterDragon
09dc1db651 Refactored ScreenMap & improved perf of updates, removals and region lookups.
Reduce code duplication by extracting a common class to deal with spatial partitioning of actors, and use some (cached) delegates to reduce duplication further without affecting performance too much.

Speed up updates and removal of actors by caching their location so we only need to update or remove them from bins they are actually in (typically very few), compared to having to check every bin for removals which is much more work in comparison.

Speed up checking for actors inside a region by checking if items are located entirely within the bin they are located in. If so, we don't need to add them to the hash-set for de-duplication purposes which is fairly expensive.
2015-04-23 21:06:09 +01:00
Paul Chote
145f7b28f5 Adjust IRadarSignature to support per-cell colors. 2015-04-19 22:27:47 +12:00
Taryn Hill
96d6ea79ce Remove explicit private.
Remove unnecessary delegate.
Use extension method syntax.
Fix HealthInfo.NotifyAppliedDamage’s desc.
Remove unused using directives.
Remove explicit type declaration in Manifest.
2015-04-09 13:59:20 -05:00
Oliver Brakmann
4ca27234e6 Merge pull request #7686 from reaperrr/custom-visibility-update
Skip visibility updates when fog & shroud are disabled via lobby
2015-04-03 20:58:56 +02:00
RoosterDragon
3885ca3f14 Speed up frozen actor visibility updates.
Cache the isVisibleTest function in the ctor for FrozenActor. The footprint never changes so the test will always be valid.
2015-04-03 12:21:03 +01:00
Pavel Penev
cedfe5c0b5 Merge pull request #7734 from RoosterDragon/frozen-lazy-render
Lazily generate frozen actor renderables.
2015-04-03 04:16:19 -07:00
reaperrr
4fc58b4491 Skip shroud/fog calculations when both are disabled via lobby option. 2015-04-02 00:42:51 +02:00
Taryn Hill
4ed53c5952 Simplify return statements.
Remove redundant ‘this’.
Remove unused using directives.
Simplify LINQ chains.
Add some trait property descriptions.
Add readonly where viable.
Add fullstops to some yaml descriptions.
2015-04-01 12:33:17 -05:00
Paul Chote
49624e335c Remove legacy DIY view -> world conversions. 2015-03-31 20:59:52 +01:00
RoosterDragon
1853ddde94 Use MPos indexer for CellLayer in Shroud.
This reduces us to one conversion per cell rather than two or three.
2015-03-27 19:50:07 +00:00
RoosterDragon
1584018dcd Batch shroud cell changes.
By maintaining a set of changed cells we can avoid repeating work for cells that change multiple times before being rendered. The shroud renderer and radar widget now delay their work until they must render, and thus process each changed cell only once. This avoids significant repetition that was causing major slowdown when many actors were in the world.
2015-03-27 19:50:05 +00:00
reaperrr
f9332c9efe Renames BlocksBullets to BlocksProjectiles and projectile High property to Blockable 2015-03-27 00:04:37 +01:00
RoosterDragon
777a57af62 Lazily generate frozen actor renderables.
Previously actors that could be frozen under fog but were currently visible would be rendered by the frozen under fog system constantly in order to keep a copy of the renderables ready to go for the frozen counterpart when the actor became invisible. Instead, we now delay this extra rendering until the actor actually becomes invisible. This eliminates the wasted rendering to generate renderables that were never used.
2015-03-24 21:08:27 +00:00
reaperrr
09a0d83936 Merge pull request #7577 from RoosterDragon/shroud-visibility-perf
Speed up shroud visibility updates.
2015-03-22 22:38:41 +01:00
Paul Chote
8fd4eca2da Merge pull request #7560 from RoosterDragon/let-it-go
Speed up frozen actor updates & prevent flicker
2015-03-22 13:52:33 +00:00
penev92
1b616123ef Introduce INotifyDiscovered interface and use it to move notifications from EnemyWatcher to AnnounceOnSeen 2015-03-21 07:53:41 +02:00
Matthias Mailänder
7be8c4461b Merge pull request #7405 from Rydra/upstream/int2immutable
Made int2 class immutable
2015-03-20 16:03:46 +01:00
David Jiménez
f15f1e41e8 Made int2 struct immutable 2015-03-20 13:54:01 +01:00
RoosterDragon
c3531d6f70 Avoid duplicated frozen visibility checks.
The FrozenUnderFog.Tick method will now reuse the calculation do by the frozen actor when it had to calculate its visibility, this prevents it having to re-do the fairly expensive visibility calculation.
2015-03-19 17:30:40 +00:00
WolfGaming
bf3ddcfbf1 Implemented an interface that allows traits to add custom information to tooltips. 2015-03-19 05:53:44 +00:00
abcdefg30
63fe578ba8 Allow picking of a random subfaction 2015-03-12 21:34:23 +01:00
RoosterDragon
6234e311ca Speed up shroud visibility updates.
A unit with the CreatesShroud or RevealsShroud trait must update all shrouds when it changes position. Calculating the tiles it can currently see is an expensive calculation that previously had to be repeated for every shroud that needed to know these tiles.

Now, we lazily populate a ref parameter to allow it to be reused for an actor if possible. The biggest improvement comes from the fact that allied players can re-use this calculation when updating their shrouds. Since many games includes a neutral player allied to both sides, most games will see a decent speedup.
2015-03-02 22:18:06 +00:00
Paul Chote
00a2146299 Adjust GetImage plumbing in preparation for race-specific sequences. 2015-03-02 20:46:24 +00:00
Bynnar18
0abe8f9b2b Fixes issues with support powers and adds property to all IOrderGenerator classes to determine priority over selection in the left-click order scheme. 2015-03-01 14:58:19 -06:00
Oliver Brakmann
4beef806d6 Merge pull request #7521 from delftswa2014/bugfix/cheatfix
Forgot shroud on all-cheat
2015-02-25 23:35:00 +01:00
pevers
6d716d301a DisableShroud cheat now properly disables after disabling the all-cheat
Smaller code base

Added newline

Added newline between assignment and statement

fixed spacing

fixed spacing

fixed spacing
2015-02-23 21:19:07 +01:00
Oliver Brakmann
293ec6577b Merge pull request #7507 from delftswa2014/bugfix/cheatfix
Fixed all cheat code
2015-02-22 15:10:17 +01:00
pevers
3f1db45ea6 changed all cheat to really enable everything on call
added givecash to the all cheat

fixed spacing

fixed spacing
2015-02-22 14:43:42 +01:00
Pavel Penev
20ca9b2ab1 Merge pull request #7486 from delftswa2014/bugfix/apcbibs
Fixed #7472 so that cargo is only shown on allied vehicles
2015-02-21 02:08:41 +02:00
Paul Chote
1a6de9a03c Merge pull request #7374 from DeadlySurprise/cashOverflowFix
Added a check for overflowing player credits
2015-02-20 17:24:57 +00:00
pevers
329d610577 Fixed #7472 so that cargo is only shown on allied vehicles
fixed spacing

pips are shown on every team when shroud is disabled

removed comment

Remove unwanted comment explaining how ally-detection works

fixed the real problem in RenderAfterWorld
2015-02-19 21:09:37 +01:00
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13:00
DeadlySurprise
4f07de2af8 Added a check for overflowing player credits 2015-02-01 13:28:47 +01:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00