Commit Graph

20 Commits

Author SHA1 Message Date
Paul Chote
7053e59acb Expose a parameter for reveal behaviour.
VisibilityType.CenterPosition reveals the actor
only if its CenterPosition is inside a cell that
is visible.

VisibilityType.Footprint reveals the actor if any
of its footprint cells are visible (this includes
Mobile actors moving between two cells).
2015-07-04 16:14:47 +01:00
atlimit8
a9908bffb4 UpgradeManager after IUpgradables 2015-06-28 10:24:00 -05:00
Paul Chote
b887d2bfd7 Introduce IDefaultVisibility. 2015-06-19 22:02:06 +01:00
Paul Chote
aee951c86f Remove region assumptions from fast shroud tests. 2015-06-15 18:06:42 +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
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
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
RoosterDragon
6baa35a763 Adjust DisabledOverlay.ModifyRender to be more efficient.
When not disabled, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is disabled, then the modifying enumerable has one less condition to check inside the loop.
2015-02-26 21:58:29 +00:00
RoosterDragon
b4993efff1 Avoid some minor allocations.
- Don't call string.Format in Actor.ToString since it gets called often, instead prefer a simple concat.
- In HiddenUnderFog.IsVisible, avoid a needless level of lambda indirection.
2015-02-02 21:16:14 +00:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
reaperrr
c619c06999 Merge pull request #7292 from RoosterDragon/upgradeoverlay-modifyrender
Adjust UpgradeOverlay.ModifyRender to be more efficient.
2015-01-08 08:48:55 +01:00
RoosterDragon
df6956867a Adjust UpgradeOverlay.ModifyRender to be more efficient.
When IsTraitDisabled is set, ModifyRender doesn't actually alter the sequence, so we can just return it directly and avoid adding another layer of enumerable. If it is unset, then the modifying enumerable has one less condition to check inside the loop.
2015-01-08 00:52:03 +00:00
RoosterDragon
7cfece6dc0 Introduce a new type for representing map coordinates.
To resolve the ambiguity introduced when the introduction of isometric maps meant that cell and map coordinates were no longer equivalent, a new type has been introduced so they can each be represented separately.
2015-01-07 17:30:34 +00:00
Matthias Mailänder
bc3acfeee7 StyleCop clean OpenRA.Game 2015-01-04 15:38:54 +01:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
reaperrr
9dfd369446 Move some Building traits and related elements to Mods.Common 2014-12-26 21:38:49 +01:00
Paul Chote
ecd3809bc2 Fix a collection of whitespace-style issues in Mods.Common. 2014-12-14 17:06:43 +13:00
atlimit8
bbd54cb32f Added IDisabledTrait & rewrote upgrade code using a level-based approach.
Upgradeable traits are notified whenever an upgrade of their declared types are granted or revoked.  The traits maintain their own internal level counter, which is then used to enable or disable the trait functionality.  A trait can register for multiple upgrade types which then all affect the internal level counter.

	IDisabledTrait for identifying (and filtering) disabled traits
	UpgradableTrait provides an abstract base for traits to support upgrade levels
	Added IDisabledTrait support to GlobalButtonOrderGenerator

	Includes rework by pchote with alterations.
2014-11-26 05:45:26 -06:00
reaperrr
f3f051fd46 Move Common Modifiers and PaletteEffects into Traits space 2014-11-18 18:10:59 +01:00