Commit Graph

58 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
45ccf0035e Only render the frozen actors that are visible. Fixes #4300. 2013-12-13 22:36:25 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
dfd51c0caa Introduce ScreenMap trait for caching screen-coord queries. 2013-09-27 15:36:25 +12:00
Matthias Mailänder
aa9408ca9e ToString() for FrozenActor 2013-08-29 17:40:27 +02:00
Paul Chote
2a7318b69f Add GPSDot for RA structures. Fixes #3631. 2013-08-17 20:11:09 +12:00
Paul Chote
eef941fd42 Track per-player frozen actors. 2013-08-12 21:34:18 +12:00