Commit Graph

486 Commits

Author SHA1 Message Date
Paul Chote
86f61298e6 Replace ITraitInfo interface with TraitInfo class. 2020-05-21 13:01:04 +02:00
Paul Chote
88cdad4189 Add support for polygon selection shapes. 2020-03-24 00:07:10 -05:00
Paul Chote
4ba50a4379 Remove IEquatable from ActorBoundsPair. 2020-03-24 00:07:10 -05:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
RoosterDragon
31918e8712 Add UnionRectangles extension method. 2019-09-14 22:09:40 +02:00
Mustafa Alperen Seki
9fef2c01ec Add AppearsOnMapPreview
Allows preplaced actors to be rendered on map preview when saving the
map.

Also removes requirements for ResourceLayer in OpenRA.Game and moves it
to OpenRA.Mods.Common.
2019-04-04 19:37:19 +02:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
b1e2ee9b79 ScreenMap should TickRender, rather than just Tick.
This is as FrozenUnderFog.TickRender queues an update to the screen map. If this is not processed in the same tick, this results in screen bounds for the frozen actor being 1 tick behind. By making ScreenMap TickRender, it ensures changes from both Tick and TickRender traits are processed, rather than just Tick traits.
2018-01-06 15:16:59 +01:00
Paul Chote
6f5d035e79 Introduce IMouseBounds and split/rework mouse rectangles.
The render bounds for an actor now include the area covered
by bibs, shadows, and any other widgets. In many cases this
area is much larger than we really want to consider for
tooltips and mouse selection.

An optional Margin is added to Selectable to support cases
like infantry, where we want the mouse area of the actor
to be larger than the drawn selection box.
2017-12-11 19:45:07 +01:00
Paul Chote
8fcc80b05a Use IRender.ScreenBounds in ScreenMap.
Traits are now required to trigger a ScreenMap update whenever they
believe that their ScreenBounds have changed.
2017-12-11 19:45:07 +01:00
Paul Chote
46f6263061 Update ScreenMap state in a single pass at the end of the tick. 2017-12-11 19:45:07 +01:00
Paul Chote
9e18ec7314 Simplify ScreenMap bounds checking. 2017-12-11 19:45:07 +01:00
Paul Chote
9d2935935c Add a debug visualization for screen map rectangles. 2017-12-04 23:10:23 +01:00
Paul Chote
1a1c6368fc Fix ScreenMap handling of flipped sprites. 2017-12-04 03:54:23 +02:00
reaperrr
be290cfabd Split Actor.Bounds into RenderBounds and SelectableBounds
Additionally, internally renamed VisualBounds to SelectionOverlayBounds to avoid confusion with RenderBounds.

This step was necessary to prevent actors with selectable area smaller than their graphics to be removed too early from ScreenMap even though part of the graphics should still be visible.
RA cruisers were a prime example, but to a lesser extent several other actors were affected as well.

This separation also serves as preparation to determine the final RenderBounds from multiple source bounds later, to fix the remaining ScreenMap issues (building 'bibs', aircraft shadows).
2017-11-21 01:00:09 +02:00
reaperrr
4ae92a5c22 Only add partitioned effects to ScreenMap if (current) bounds are valid
This serves to avoid adding effect where either width or height is 0.
2017-09-24 10:54:58 +01:00
Matthias Mailänder
1aebf9857c Add support for only rendering effects inside screen bounds 2017-09-17 12:52:04 +01:00
reaperrr
03c3a5f310 Make ITick implementations explicit in OpenRA.Game 2017-09-16 15:51:37 +02:00
Matthias Mailänder
8ae2a65d9d Shroud is actually a player trait. 2017-08-26 22:47:48 +01:00
rob-v
d4e9e0e069 Add Visualization chat commands 2017-07-23 15:08:24 +02:00
Paul Chote
695a572dc3 Move ActorMap to mod code. 2017-01-29 18:57:36 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
ff94dd914a Fix missing array bounds check in Shroud.IsExplored. 2016-11-24 19:07:18 +00:00
reaperrr
c4b5b745ef Merge pull request #12307 from pchote/passive-visibility
Add plumbing for improved RA gap generator behaviour.
2016-11-18 14:34:35 +01:00
Paul Chote
d68c705512 Block actor sight above cliffs. 2016-11-11 17:46:53 +00:00
Paul Chote
983d8ac39e Add passive visibility type. 2016-11-06 15:40:22 +00:00
Paul Chote
fdac5a6d8a Rework internal shroud plumbing. 2016-11-06 15:40:22 +00:00
reaperrr
0aefd87485 Make Shroud object- instead of actor-based 2016-10-25 16:09:52 +02:00
Paul Chote
365bd5b9bd Rename ResourceType trait fields for consistency. 2016-09-25 17:04:18 +01:00
Paul Chote
fdc6ea4564 Add trait descriptions to ResourceType. 2016-09-25 17:04:17 +01:00
Paul Chote
9edf4be229 Disable hide map crate if explored map is enabled. 2016-06-18 14:18:05 +01:00
Paul Chote
eb884ca76f Convert lobby checkboxes to new options backend. 2016-06-04 10:03:06 +01:00
reaperrr
b0e90989a6 Add plumbing for customizable vertical ProximityTrigger range
And check DistanceAboveTerrain instead of just vertical distance to upgrade
source.
This is necessary to avoid situations where an actor is technically on the right
vertical distance above/below ground, but not upgraded because it is located on a lower/higher terrain level than the upgrade source.
2016-05-26 22:47:45 +02:00
Paul Chote
1eba0bea13 Prepare Shroud code for trait-defined lobby options. 2016-05-14 18:54:44 +01:00
Paul Chote
a0b5b5ce66 Move initial map exploration to Shroud. 2016-05-14 18:54:44 +01:00
Paul Chote
e79fbe1bb9 Reference SubCells directly from MapGrid. 2016-03-16 18:57:07 +00:00
Paul Chote
7993068c8f Remove Map.SequenceProvider. 2016-03-12 19:46:20 +00:00
Paul Chote
62f28d2909 Move shroud options to rules. 2016-03-07 21:41:12 +00:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
abcdefg30
d416138cec Merge pull request #10542 from RoosterDragon/simplify
General Cleanup
2016-01-18 11:37:30 +01:00
Oliver Brakmann
d151343216 Merge pull request #10468 from RoosterDragon/fix-dev-shroud-invalidation
Fix shroud not updating when disabled
2016-01-17 22:42:34 +01:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Pavel Penev
861d1368a4 Unhardcode internal terrain palette name from all over the codebase 2016-01-17 19:02:16 +02:00
RoosterDragon
21fd4df586 Invalidate shroud when enabling/disabled the shroud.
This ensures when shroud is toggled during a replay, the shroud renderer and radar update correctly.
2016-01-09 23:07:32 +00:00
RoosterDragon
b0619a3e25 Added comments in performance sensitive code. 2015-12-13 16:24:54 +00:00
RoosterDragon
c0286bb147 Remove ActorMap.ActorsInWorld.
Prefer the more direct and efficient query on World.Actors instead.
2015-12-12 20:42:44 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00