Commit Graph

24 Commits

Author SHA1 Message Date
Taryn Hill
da001385ae Added some trait [Desc()]s. 2014-07-12 13:31:14 -05:00
RoosterDragon
8a60880cf1 Tackle the last of the low hanging fruit for memory allocations in the main game loop.
- Avoid calling string.Split twice in SprintFont.Measure.
- Change ActorsInBox method of ActorMap and ScreenMap to avoid allocating and intermediate list. As a bonus this allows the sequence to be lazily consumed. Also avoid LINQ in these methods.
- In FrozenUnderFog.TickRender, the method exits early if no players are visible so the attempt at lazy generation was not needed.
- Unwrap a LINQ Any call in ClassicProductionQueue.Tick.
- Merge some successive Where calls in ProximityCapturable into single predicates.
2014-06-22 17:29:45 +01:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
Paul Chote
800acdbdf2 Rename FindUnitsInCircle -> FindActorsInCircle. 2013-07-20 15:34:27 +12:00
Paul Chote
e6865c5996 Remove PPos overload of FindUnitsInCircle. 2013-07-20 15:34:27 +12:00
Paul Chote
39d2095e54 Remove PPos overload of ClosestTo. 2013-07-20 15:34:27 +12:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
3a1613667b drop unnecessary ISync from ProximityCapturable 2011-07-19 21:14:12 +12:00
Chris Forbes
8544930db9 ProximityCapturable simplifications 2011-07-19 21:14:12 +12:00
Chris Forbes
47e25bb5a1 use common version of AreMutualAllies in PC 2011-07-14 20:29:08 +12:00
Chris Forbes
e44b965785 fixed #999 -- replace order/first[ordefault] with .ClosestTo(point) 2011-07-14 20:29:07 +12:00
Chris Forbes
0e45968573 remove 'private' keyword where possible 2011-06-29 09:15:39 +12:00
Chris Forbes
c4a72f016a remove some more bits 2011-04-10 11:15:39 +12:00
Chris Forbes
c2966978f3 start trimming down prox code 2011-04-10 11:15:37 +12:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Chris Forbes
39fef604c2 fix desync in ProximityCapturable 2011-02-28 20:36:02 +13:00
geckosoft
0f17fa34a8 Added ProximityCaptor and filtering of possible captors for KOTH 2011-02-05 19:22:06 +13:00
Chris Forbes
f52620f6fc add ISync to all traits that have [Sync] members 2011-01-26 21:00:28 +13:00
Chris Forbes
3149f3efa2 fix up some of the capturing duplication 2010-12-23 14:25:39 +13:00
Paul Chote
dba7335594 Fix a pile of compiler warnings. 2010-11-21 13:10:22 +13:00
geckosoft
65ac607d90 Fixed: ProximityCaptureable now allows allies nearby 2010-11-21 10:59:33 +13:00
geckosoft
fbb117705e Changed: Owner maps to Self.Owner now IF captured, otherwise returns the OriginalOwner 2010-11-21 10:59:30 +13:00
geckosoft
78dea9eecb Added: ProximityCaptureable 2010-11-21 10:59:30 +13:00