Commit Graph

3625 Commits

Author SHA1 Message Date
Matthias Mailänder
32a4bedd6e don't use country specific decimal separators for decimals 2014-07-23 06:19:45 +02:00
Paul Chote
6b1cecc6b4 Add a workaround for the legacy map editor. 2014-07-23 11:40:30 +12:00
Paul Chote
1d77cd5391 Merge pull request #5851 from RoosterDragon/shroud-perf
Speed up shroud checks
2014-07-23 11:02:27 +12:00
Paul Chote
dab94bcc00 Merge pull request #5904 from ScottNZ/c4-flashtarget
Add target flashing for C4.
2014-07-23 10:36:54 +12:00
Chris Forbes
58ac641578 Merge pull request #5985 from RoosterDragon/random-try-collection
Improve Exts.Random
2014-07-23 09:57:23 +12:00
Paul Chote
029da5116b Move VoxelRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
4589e93180 Move TextRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
1cb6026c38 Move ContrailRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
6005262992 Move BeamRenderable into Mods.RA. 2014-07-22 16:43:39 +12:00
Paul Chote
51abbad5ff Move RenderSprites and RenderSimple into Mods.RA. 2014-07-22 16:43:39 +12:00
Matthias Mailänder
7d0f4a261f don't break apart when using empty IReadOnlyDictionary 2014-07-20 14:50:38 +02:00
Matthias Mailänder
1071a94d1d document traits 2014-07-20 14:50:37 +02:00
Matthias Mailänder
ef5178407c add spaces for proper linebreaks in trait documentation tables 2014-07-20 13:52:00 +02:00
Oliver Brakmann
ff90a7559d Make sure actors are removed from control groups when captured
Fixes #5976.
2014-07-20 02:49:58 +02:00
Paul Chote
bcc32d15ed Fix frozen actors being targetable under shroud. Fixes #5979, #5978. 2014-07-19 12:56:52 +12:00
RoosterDragon
c672ac5bad Improve Exts.Random by testing if the input sequence is a collection, thus avoiding the need to create a copy to get the count.
Using the ElementAt method also means that if the sequence is a list too, then the selection can be done via the indexer rather the enumerating the elements.
2014-07-18 20:58:50 +01:00
Oliver Brakmann
42f963d687 Fix aircraft losing selection outside the map borders
Fixes #5651
2014-07-18 10:03:57 +02:00
ScottNZ
04cd99cd75 Add target flashing for C4. Closes #4659 2014-07-15 16:06:38 +12:00
reaperrr
eb96b72878 Add MaxSpread to Warhead to allow setting a specific area of effect. 2014-07-12 12:14:56 +02:00
Pavlos Touboulidis
dcb7a44aa2 Use available TypeConverters to serialize and deserialize types 2014-07-12 04:46:45 +03:00
Pavlos Touboulidis
451426bc3f Trivial typo in exception message 2014-07-12 04:35:31 +03:00
Pavlos Touboulidis
e9dd0b0fab Make FieldLoader/FieldSaver able to work with private fields
* Unify the FieldLoader-related attributes (Ignore, LoadUsing,
FieldFromYamlKey) into a new 'Serialize' attribute. Keep the
previous attributes as shortcuts/aliases to the new attribute.

* Add 'YamlName' field to the new 'Serialize' attribute to allow
yaml names different from the field names. Example:
    [Serialize(YamlName = "Width")]
    private int widthExpression = "0";

* The FieldLoader will treat private fields like public now and
will try to load their values. The FieldSaver gets an optional
parameter specifying whether to save private fields by default.
The 'Serialize' attribute can be used to fine-tune individual
fields.

* Updated the traits documentation exporter to write the yaml
name if it has been overriden.
2014-07-12 04:33:36 +03:00
Paul Chote
be2357f509 Merge pull request #5917 from pavlos256/deterministic-sort
Make tiles sorting deterministic in all cases
2014-07-11 17:53:08 +12:00
Pavlos Touboulidis
f45d063f1e Make tiles sorting deterministic in all cases
This may fix issue #5916.

In any case, it's wanted because this kind of sort is "unstable".
According to the docs:

    "This implementation performs an unstable sort; that is, if two
    elements are equal, their order might not be preserved."
2014-07-10 12:40:38 +03:00
Paul Chote
2e9e4cff5c Allow NormalizeSequence to remove existing damage prefixes. Fixes #5909. 2014-07-10 17:16:46 +12:00
Pavlos Touboulidis
b88b87b899 Improve game loop
Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
2014-07-10 04:06:29 +03:00
RoosterDragon
ffd2e8ea9d Sped up ActorMap.ActorsInBox.
- By ensuring both the add and remove actor lists are sets, we ensure the partitioning bins will contain only distinct actors. We can remove the HashSet and Distinct in ActorsInBox and ActorsInWorld which provides a nice speedup for queries. ActorsInBox sees nearly a 3x speedup in the RA shellmap.
2014-07-09 18:43:40 +01:00
Paul Chote
5e96bb3f8c Merge pull request #5824 from reaperrr/pronedamage
Moved ProneDamage to Warhead
2014-07-09 11:02:02 +12:00
Paul Chote
e5b863f926 Merge pull request #5698 from Mailaender/sonar
Added the sonar pulse to reveal sub marines
2014-07-09 10:44:47 +12:00
reaperrr
fabca5dca6 Move ProneDamage modifier from TakeCover to Warhead.
Rename it to ProneModifier and convert it to integer.
2014-07-08 21:05:42 +02:00
Paul Chote
2b91a2363b Fix make animations. 2014-07-08 16:56:09 +12:00
Paul Chote
5650d5fc98 Revert "use TickRender() for RenderSprites and PaletteModifier"
This reverts commit 87fd576b26.
2014-07-08 11:09:54 +12:00
Paul Chote
802b6a652c Revert "new PauseState to differentiate game and editor pausing"
This reverts commit d1e18cad7a.
2014-07-08 10:42:00 +12:00
Paul Chote
18c9a25232 Revert "freeze animations during pause to visualize it better"
This reverts commit 960248fe44.
2014-07-08 10:40:06 +12:00
Paul Chote
3c2d9910e3 Revert "Undo changes to World::SetLocalPauseState to unbreak Lua"
This reverts commit 77e3d17527.
2014-07-08 10:39:18 +12:00
Oliver Brakmann
77e3d17527 Undo changes to World::SetLocalPauseState to unbreak Lua
Fixes #5864.
2014-07-07 21:50:37 +02:00
RoosterDragon
a512d9ad0a Sped up shroud rendering.
- Only update shroud within the visible screen area, rather than the whole map. This improves performance on larger maps significantly when scrolling around since large portions of the shroud do not need to be updated.
- Provide methods in Shroud to return delegates to check for explored/visibility for tiles within a certain region. This allows it to return more efficient delegates whenever the region is within the map bounds, or shroud/fog is disabled. In the typical case where the region is in bounds and shroud/fog is enabled, the fast check is almost twice as fast as the slow check.
- Use the Shroud delegate functions in shroud rendering, frozen actors, minimap rendering and resource layer areas to provide a speedup since these areas of code can often take advantage of the fact they perform checks within the map boundary.
- Cache current element in CellRegionEnumerator to prevent repeated work if the element is accessed more than once.
- Decrease the size of elements in some arrays in hopes of reducing memory needs and improving cache hits.
2014-07-07 17:34:31 +01:00
RoosterDragon
2351c43237 Refactoring pass.
- Extract an enum for edges rather than using magic numbers for everything.
- Remove duplicated code between FoggedEdges and ShroudedEdges by hosting the visibility function into a delegate.
- Make minimap methods more readable.
- Tidy formatting.
- Make some fields readonly.
- Remove unused usings.
2014-07-07 17:34:25 +01:00
Matthias Mailänder
5cdf0e6a67 generalize MoveFlash as parametrized SpriteEffect 2014-07-07 15:23:14 +02:00
Matthias Mailänder
b8756d9de7 Merge pull request #5860 from pchote/news-fix
News fixes
2014-07-07 13:25:25 +02:00
Paul Chote
c352ff644f Use a shared url for news updates. Fixes #5603. 2014-07-07 21:48:07 +12:00
Matthias Mailänder
d4627479b5 fix a NullReferenceException in preview.Map 2014-07-07 09:18:24 +02:00
Matthias Mailänder
b466a066a9 Merge pull request #5839 from ihptru/downloadingstatus
depend on proper status in auto-downloading
2014-07-06 17:46:04 +02:00
ihptru
305f76e300 depend on proper status in auto-downloading 2014-07-06 19:17:38 +04:00
Matthias Mailänder
fe41ac7fa3 @pchote breaks all the things 2014-07-06 14:45:05 +02:00
Matthias Mailänder
443b46ca64 fix Tiberian Sun installation from CD 2014-07-06 14:04:26 +02:00
Paul Chote
3f7293b206 Let FieldLoader do the hard work of loading fields. 2014-07-06 14:04:26 +02:00
Matthias Mailänder
a67e2290d1 fix the music list not being populated after CD asset install 2014-07-06 14:04:26 +02:00
Matthias Mailänder
2f55768c1b restart the game instead of unmounting on the fly
avoid more redundancy between the load screens
2014-07-06 14:04:26 +02:00
Matthias Mailänder
dbb4132b66 add TrimOrEmpty to avoid NREs 2014-07-06 14:04:25 +02:00