Commit Graph

115 Commits

Author SHA1 Message Date
reaperrr
ee8e1f46c1 Move 'Activity' into its own namespace in OpenRA.Game. 2014-12-14 17:12:46 +01:00
huwpascoe
a660bb95b5 Actor properties consistency improved 2014-11-21 02:44:05 +00:00
Paul Chote
04d61f465a Don’t rebuild the actor bindings every query. 2014-09-28 14:46:39 +13:00
Paul Chote
ca6119821f Allow lua API to bind a minimal set of properties to dead actors. 2014-09-28 14:46:37 +13:00
Paul Chote
56332251f5 Don’t double-remove dead actors from the world. 2014-09-27 22:14:16 +12:00
Matthias Mailänder
04f1ebe969 abort change owner when the actor is destroyed
fixes #5638
2014-07-03 09:19:51 +02:00
Paul Chote
1c8a8ca6ff Merge pull request #5400 from RoosterDragon/equatable
Implemented IEquatable<T>
2014-06-09 17:32:17 +12:00
RoosterDragon
0c8bdff5be Formatting fixes.
Spaces to tabs, indents, etc.
2014-05-26 18:10:59 +01:00
RoosterDragon
a0db80cb6a Changes to reduce allocations in the main loop.
Targeted some methods that generated allocated a lot of memory in the main game loop:
- Actor.Render - Changed LINQ calls into equivalent loops. No allocation for delegates.
- Animation.Render - Returned an array rather than a yield expression. The array uses less memory than the complier generated enumerable.
- FrozenActor and FrozenUnderFog - Materialize the footprint into an array: The enumerable is not-trivial to evaluate is and evaluated many times inside the Tick function. The memory needed is minimal. Changed LINQ into equivalent loops to prevent delegate allocation. Should result in overall much faster calls.
- Widget.GetEventBounds - Changed LINQ calls into equivalent loops.
- MobileInfo.CanEnterCell - Changed LINQ calls into equivalent loops. Don't materialize list of blocking actors every time, instead enumerate them and only when they need to be checked.
- FrozenUnderFog.TickRender - Generate the renderables lazily and also remove a no-op Select call.
2014-05-23 14:48:11 +01:00
RoosterDragon
67594b844a Implemented IEquatable<T> to speed up equality comparisons.
Actor, CPos, CVec, WAngle, WPos, WRange, WRot and WVec structs now implement IEquatable<T> which means unboxing/casting costs can be eliminated.

Also simplified the ToString method by concatenating components directly rather than using a format string since the overhead is a bit high for simple cases like this.
2014-05-23 08:04:43 +01:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Paul Chote
d73af0190f Add a new native-lua implementation. 2014-05-02 22:18:34 +12:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
1b2a90c00c Migrate to System.Lazy. 2014-04-09 20:20:41 +12:00
Matthias Mailänder
67cd0645a4 update to .NET 4.0 2014-04-09 20:20:26 +12:00
Curtis Shmyr
76f7e87633 Add Actor.IsDisguised 2014-03-16 19:37:38 -06:00
Curtis Shmyr
8576c24988 Add IEffectiveOwner trait 2014-03-14 19:36:51 -06:00
Pizzaoverhead
ed6147ce0b Fixes order lines not being shown after reselect once their lifetime has expired.
Adds INotifyBecomingIdle.
2014-03-05 18:14:57 +00:00
Paul Chote
0fe839add0 Move HealthExts.IsDead and Kill to Actor. 2013-12-01 00:14:47 +13:00
Paul Chote
19e0c2a83f Remove PPos and PVecInt. 2013-09-27 15:58:56 +12:00
Paul Chote
ad44610e5a Replace dynamic Actor.Bounds with the (unchanging) relative rect. 2013-09-27 15:39:57 +12:00
Matthias Mailänder
8e4ef0462d StyleCop clean Actor 2013-08-29 17:40:26 +02:00
Matthias Mailänder
8c6074a081 WithCrumbleOverlay for Dune 2000 buildings 2013-08-17 23:47:09 +02:00
Paul Chote
c3f04cc32e Convert non-aircraft positioning to world coords.
This removes the incomplete and unused hover code
on Mobile, which would be more trouble that it is
currently worth to carry over.
2013-07-21 17:35:47 +12:00
Paul Chote
6a435752fd Remove *PxPosition from IOccupySpace/IPositionable. 2013-07-21 17:35:46 +12:00
Paul Chote
ecc119cb29 Combine IHasLocation -> IOccupySpace, IMove -> ITeleportable. 2013-07-21 17:33:32 +12:00
Paul Chote
7bce2017c3 Simplify and increase robustness of Shroud et al. Fixes #3440. 2013-06-22 13:15:27 +12:00
Matthias Mailänder
11755798cc Don't reserve airfields/helipads for husks that just fall down
fixes #3376
2013-06-16 12:43:41 +02:00
Chris Forbes
ae809ce39f Use actor/target generations to invalidate targets on ownership change 2013-06-13 09:44:50 +12:00
Chris Forbes
5bc47f4834 Add generation counting to Actor and Target
This allows us to invalidate targets based on arbitrary conditions,
just by bumping the actor's generation number.

The next patches will use this.
2013-06-13 09:44:13 +12:00
Paul Chote
ca5f2c3785 Split Renderable into an IRenderable interface and SpriteRenderable implementation. 2013-05-17 18:12:28 +12:00
Paul Chote
9e4bab07e5 Add conversions and helpers for world coordinates. 2013-03-29 20:39:27 +13:00
Matthias Mailänder
0a82bfe552 format TODO: uniformly to auto-generate task list in MonoDevelop 2013-03-27 09:45:17 +01:00
Matthias Mailänder
72841a51e6 add shroud, creates shroud and reveals shroud to syncreport 2013-03-06 16:05:31 +01:00
Matthias Mailänder
2bc7570674 remove conditional compile left-over junk 2013-02-28 21:59:18 +01:00
Paul Chote
dddec1ec61 Add INotifyOwnerChanged interface 2013-02-26 09:35:41 +13:00
Paul Chote
3380817865 Pass WorldRenderer to Render(). 2013-02-25 21:11:33 +13:00
Paul Chote
0703f3f164 Extract auto-selection-size into its own interface. 2013-02-25 21:10:08 +13:00
Paul Chote
000a5eaa56 Pass WorldRenderer to IRenderModifiers and replace more palette lookups. 2013-02-24 15:45:03 +13:00
Kenny
f41fb32d60 Introducing per-player shrouds.
- Each player has their own shroud and their visibility does not extend outside of the shroud. 
- Units and buildings can no longer target other units outside of their visibility. Buildings can still be targetted if they have been explored.
- GPS will provide visibility in the fog-of-war.
- Spies that infiltrate radar domes will gain their victim's exploration and reset it on all clients (if the victim does not have GPS)
2012-12-13 15:16:56 -08:00
James Dunne
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
2bc260c833 move Activity from OpenRA.Traits.Activities namespace to OpenRA.Traits 2011-10-06 23:11:58 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
663a323f29 remove trait lookup spam everywhere for IOccupySpace. 2011-08-13 15:01:41 +12:00
Chris Forbes
0e45968573 remove 'private' keyword where possible 2011-06-29 09:15:39 +12:00
Chris Forbes
9b3e6c5c4a remove FP sillyness from FindUnits & friends 2011-05-22 20:38:52 +12:00
Chris Forbes
ccc245ded4 reintroduce Cached<T>; use for Actor.Bounds, Actor.ExtendedBounds, which replace Actor.GetBounds(bool) 2011-05-22 20:38:48 +12:00
Chris Forbes
310ecc34ce clean up usings everywhere 2011-05-21 17:26:18 +12:00
Chris Forbes
7341b1f8f8 batch-process INotifyIdle, and add PerfSample wrappers for tick_idle and tick_activities 2011-05-04 19:23:40 +12:00