Commit Graph

19 Commits

Author SHA1 Message Date
Matthias Mailänder
683edd2c37 fix frozen actors not visible under fog 2014-05-25 09:07:25 +02: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
Paul Chote
1b2a90c00c Migrate to System.Lazy. 2014-04-09 20:20:41 +12:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
eef941fd42 Track per-player frozen actors. 2013-08-12 21:34:18 +12:00
Paul Chote
190ce0fc90 Fix z-ordering of FrozenActorProxy. 2013-08-11 12:30:25 +12:00
Paul Chote
136ddf1697 Allow map-placed frozen actors to start revealed. 2013-08-04 11:41:24 +12:00
Paul Chote
126fc79eed Fix FrozenUnderFog. 2013-07-25 18:11:55 +12:00
Paul Chote
ca5f2c3785 Split Renderable into an IRenderable interface and SpriteRenderable implementation. 2013-05-17 18:12:28 +12:00
Paul Chote
c428cad70c Refactor per-player shrouds & fix shellmap shroud. 2013-04-10 19:36:03 +12: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
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Paul Chote
9655b34e5f Fix FrozenUnderFog; add to cnc. 2010-11-27 11:28:22 +13:00
Paul Chote
7c5c989eb2 Introduce World.LocalShroud. Breaks targeting stealth tanks. Probably breaks FrozenUnderFog. 2010-11-27 11:20:04 +13:00
Paul Chote
230d59f655 Tweak visibility; hopefully allows targeting of detected units 2010-08-15 06:18:46 +12:00
Bob
ae703d50b2 Actor.traits is implementation detail 2010-08-14 17:39:49 +12:00
Paul Chote
8fab45ae39 Move Cloak, HiddenUnderFog, FrozenUnderFog into Mods.RA; Simplify a pile of related stuff. 2010-07-28 21:11:50 +12:00