Commit Graph

122 Commits

Author SHA1 Message Date
RoosterDragon
4d5101a7c4 Vastly improve shroud rendering performance.
Changes in the shroud are now tracked. If a cell changes it will mark itself and its neighbors as dirty. During the render phase all dirty cells will have their vertices calculated and cached. If a cell is not dirty, the pre-calculated vertices are retrieved from cache. Then the sprite renderer is provided the sprite and the pre-calculated vertices to draw.

This prevents constant recalculation of vertices for the shroud in the render phase, requiring instead only dirty cells in the visible area. The update phase is reduced to a practical noop, instead incurring the cost only of changed cells each frame, rather than checking the visible area.
2015-02-20 20:03:42 +00:00
Matthias Mailänder
38dbb3063b Merge pull request #7462 from obrakmann/fix7459_build_area
Fix extent of buildable area below structures
2015-02-16 22:04:03 +01:00
penev92
9664e32005 Merge pull request #7424 from RoosterDragon/minor-alloc
Avoid some memory allocations
2015-02-16 20:20:40 +02:00
Oliver Brakmann
de16d29aa6 Merge pull request #7445 from jwbuurlage/bleed
Fixes #7219. In addition, sets cursor corresponding to the order with hi...
2015-02-14 12:22:34 +01:00
ScottNZ
582b6635ff Brace style fixes 2015-02-13 02:32:49 +13:00
Oliver Brakmann
7f4b62b7ee Fix extent of buildable area below structures
Restore use of GetBuildingAt to take bibs into account for buildable area, and only consult the actor map if the actor at that location is not a building.
2015-02-10 19:28:54 +01:00
Jan-Willem Buurlage
ce6c883fb1 Fixed #7219. Reduce boarding priority to resolve conflict with force-attacking own units. 2015-02-08 22:31:56 +01:00
penev92
494b600ed8 Move refinery and harvester logic to Mods.Common;
Remove unused interface IAcceptOreDockAction
2015-02-06 13:23:07 +02:00
RoosterDragon
b4993efff1 Avoid some minor allocations.
- Don't call string.Format in Actor.ToString since it gets called often, instead prefer a simple concat.
- In HiddenUnderFog.IsVisible, avoid a needless level of lambda indirection.
2015-02-02 21:16:14 +00:00
Matthias Mailänder
5040baac9b Merge pull request #7415 from obrakmann/gdi05a
Add mission gdi05a
2015-02-01 18:49:27 +01:00
Oliver Brakmann
4aa97ec776 Allow support powers to start with a full charge when created 2015-02-01 15:49:45 +01:00
atimoschenkow
f2ae11f247 Adjust nudging for cases where no enterable cell is found
- Randomly select one of the occupied "non-stupid" cells
- Notify blockers in that cell
- Wait until it can be entered
- Move to cell
2015-02-01 14:57:10 +01:00
Matthias Mailänder
bcda232a1c Merge pull request #7231 from RoosterDragon/linq-checks
Checked LINQ queries and collections for inefficiencies.
2015-02-01 08:56:15 +01:00
Oliver Brakmann
22b1f4de59 Merge pull request #7331 from Phrohdoh/dune-armor-bonuses
TerrainModifiesDamage trait.
2015-01-30 17:30:43 +01:00
Matthias Mailänder
4899b555a9 Merge pull request #7191 from Mailaender/ts-superweapons
Added the Nod missile silo and the Ion Cannon to the Tiberian Sun mod
2015-01-29 21:48:14 +01:00
RoosterDragon
82bea961ba Checked LINQ queries and collections for inefficiencies.
- Made Array.IndexOf available via extension method.
- Made ToHashSet extension method.
- Change collections queried often via Contains into sets.
- Avoid Count() extension if Count or Length property exist.
- Made Count() > 0 checks and variations calls to Any() instead.
- Don't call ToList/ToArray if there is no benefit to materializing the sequence.
- If the sequence does benefit from materialization, follow this general pattern:
  - Collection queried often via Contains use ToHashSet to speed up lookups.
  - Short lived variables use ToList. This is because ToArray requires an extra copy to output the final size.
  - Collections persisted into fields or for a long time use ToArray to minimize memory overhead.
2015-01-29 19:20:11 +00:00
Oliver Brakmann
7ddc340d5b Merge pull request #7314 from Unit158/Levelup-command
Added a levelup command
2015-01-28 20:58:17 +01:00
Oliver Brakmann
2e1ca40bb5 Merge pull request #7155 from cjshmyr/buildarea
Use ActorMap instead of BuildingInfluence for finding buildable area
2015-01-28 19:03:49 +01:00
Curtis Shmyr
30cf02c8e2 Use ActorMap instead of BuildingInfluence for finding buildable area 2015-01-26 20:22:21 -07:00
Taryn Hill
86f6d634c0 Add TerrainModifiesDamage trait.
^Infantry take 80% damage on Rough terrain in D2k.
2015-01-26 18:08:44 -06:00
Matthias Mailänder
24deec2a7b fix CodeLineMustNotEndWithWhitespace 2015-01-25 18:41:29 +01:00
Matthias Mailänder
3489794713 replace PlayMusicOnMapLoad trait with Lua Media.PlayMusic method 2015-01-25 14:43:36 +01:00
Christopher Grant
66c33452e8 Added a levelup command 2015-01-24 14:56:33 -05:00
Matthias Mailänder
fc16990c05 unhardcode and self-document 2015-01-24 17:35:21 +01:00
Oliver Brakmann
2c71e954bf Merge pull request #7170 from penev92/bleed_enemySightedNotification
Implement "Enemy unit sighted" notification
2015-01-22 21:58:58 +01:00
abcdefg30
2fd1576d15 Ignore buildlimits with AllTech cheat 2015-01-18 20:36:26 +01:00
penev92
52cc69fd1f Move Crate, CrateSpawner and all CrateActions to Mods.Common 2015-01-18 16:40:55 +02:00
penev92
f1a0f6e2a5 Move Parachute, Parachutable and ParaDrop to Mods.Common 2015-01-18 16:15:14 +02:00
Matthias Mailänder
44f1c52e44 Merge pull request #7204 from Mailaender/ts-harvest-overlay
Added the Tiberian Sun harvest animation
2015-01-18 12:58:46 +01:00
Oliver Brakmann
c2dac459bb Merge pull request #7334 from RoosterDragon/less-alloc
Cache or inline some delegates to avoid allocations.
2015-01-17 16:04:36 +01:00
Matthias Mailänder
c1c1960b44 Merge pull request #7337 from reaperrr/common29
Moved Lint, UtilityCommands and Scripting properties to Mods.Common
2015-01-17 14:53:48 +01:00
penev92
e2832bb3d7 Implement EnemyWatcher and AnnounceOnSeen traits 2015-01-17 14:41:22 +02:00
Matthias Mailänder
e694692b97 add the Tiberian Sun harvest animation 2015-01-17 11:36:41 +01:00
Oliver Brakmann
e58d4ae87e Merge pull request #7257 from Mailaender/d2k-guarding-voice
Added the Dune 2000 Guarding voice
2015-01-15 23:26:57 +01:00
reaperrr
e82b2ce8dd Moves BaseAttackNotifier to Mods.Common 2015-01-15 22:59:43 +01:00
Oliver Brakmann
c092c0231f Merge pull request #7316 from reaperrr/move-stuff28
Moved Upgrades, SupportPowers and some misc features to Mods.Common
2015-01-15 20:57:40 +01:00
abcdefg30
15c07d94ac Add repairing and unit repaired sounds to fix 2015-01-15 20:16:24 +01:00
reaperrr
e8fbfc366a Moves some misc traits/activities to Mods.Common, moves some RA traits into the Traits folder 2015-01-15 13:18:12 +01:00
reaperrr
be9d37f30e Moves SupportPowers and related Widgets to Mods.Common 2015-01-15 13:18:11 +01:00
reaperrr
f897a9ff01 Moves Upgrades and Invulnerable trait to Mods.Common 2015-01-15 00:07:27 +01:00
RoosterDragon
930d9cbea3 Cache or inline some delegates to avoid repeated allocations. 2015-01-14 22:57:41 +00:00
penev92
e6f1c6b460 Enhance sandworm targeting logic by having actors produce noise 2015-01-14 21:26:55 +02:00
penev92
e42cf58cb1 Add IgnoresVisibility field to AttackBase 2015-01-14 21:26:54 +02:00
penev92
ea9ebaa08d Add IgnoresCloak trait 2015-01-14 21:26:53 +02:00
Oliver Brakmann
75a9848468 Merge pull request #7276 from penev92/bleed_fixAttack
Minor targeting cleanup
2015-01-12 18:48:18 +01:00
abcdefg30
b7d8b2c6b3 Don't remove power while the dev hack is enabled 2015-01-11 21:37:32 +01:00
reaperrr
c431545a44 Wrap up Render traits move 2015-01-11 03:04:42 +01:00
reaperrr
0e1773ac5d Move Production to Mods.Common 2015-01-11 03:04:39 +01:00
Matthias Mailänder
a95abd7b38 setup the Guarding voice 2015-01-10 22:34:57 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00