Commit Graph

1268 Commits

Author SHA1 Message Date
abcdefg30
b98d98c6d6 Merge pull request #8212 from matija-hustic/selectable_classes
Added selection classes
2015-06-13 01:53:32 +02:00
Matija Hustić
e965a0d3f0 Touched up selection functionality. 2015-06-08 15:03:09 +01:00
Oliver Brakmann
ce1eed6bcc Merge pull request #8432 from pchote/shroud-wpos
Add WPos shroud visibility queries.
2015-06-07 21:57:39 +02:00
Paul Chote
66dd3c553c Introduce WPos versions of FogObscures and ShroudObscures. 2015-06-07 19:50:02 +01:00
Paul Chote
cac7ec39f4 Rework shroud rendering using TerrainSpriteLayer. 2015-06-07 17:02:56 +01:00
Paul Chote
bf4722fb9f Distinguish between all map cells and cells inside map bounds. 2015-06-02 21:53:25 +01:00
Oliver Brakmann
206c33ed41 Merge pull request #8226 from pchote/actor-disposal
Dispose traits when destroying an actor.
2015-06-02 19:33:22 +02:00
Matthias Mailänder
ea5003cd2d add new long WRange.RangeSquared to avoid integer overflows 2015-05-31 23:51:30 +02:00
Matthias Mailänder
aade0197ff fix a possible NRE 2015-05-31 15:24:06 +02:00
Paul Chote
8ae3afa3c5 Properly clean up traits that used to hook only death. 2015-05-29 19:21:35 +01:00
Paul Chote
585a43fd8f Rename Actor.Destroy/Destroyed to Dispose/Disposed. 2015-05-29 19:08:38 +01:00
deniz1a
106286da23 Prevents satellite icons from being drawn over frozen actors. 2015-05-25 06:31:04 +03:00
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