Commit Graph

24434 Commits

Author SHA1 Message Date
RoosterDragon
ca01a1f186 Presize MemoryStream when possible.
Also use GetBuffer when we know we have presized the stream to the exact required size to prevent a needless copy.
2017-12-19 00:59:11 +01:00
RoosterDragon
5d8c9a560a Release audio resource for video when StopVideo is called. 2017-12-19 00:57:58 +01:00
RoosterDragon
3f8c1ad5df Don't allocate a full-sized array when creating a VertexBuffer.
We can allocate a much smaller zeroed buffer and copy that multiple times in order to zero the memory. When creating large VertexBuffers, this caps our temporary allocation size significantly.
2017-12-19 00:57:02 +01:00
Paul Chote
c269525397 Fix support power tooltip time coloring. 2017-12-19 00:55:09 +01:00
Mustafa Alperen Seki
77ef13816f Add 4PLAY10 2017-12-18 23:19:44 +00:00
Mustafa Alperen Seki
09f4c6339e Add 4PLAY8 2017-12-18 23:15:45 +00:00
Mustafa Alperen Seki
2251078dde Add 4PLAY5 2017-12-18 23:11:04 +00:00
Mustafa Alperen Seki
365251f845 Add 4PLAY1 2017-12-18 23:09:15 +00:00
Mustafa Alperen Seki
c6f0b3e1a0 Add 2PLAY14 2017-12-18 23:07:28 +00:00
Mustafa Alperen Seki
31206de855 Add 2PLAY11 2017-12-18 23:04:43 +00:00
Mustafa Alperen Seki
fe3534ebcd Add 2PLAY9 2017-12-18 23:02:29 +00:00
Mustafa Alperen Seki
0dd52acd98 Add 2PLAY4 2017-12-18 23:00:04 +00:00
Mustafa Alperen Seki
a36242d524 Add 2PLAY3 2017-12-18 22:57:32 +00:00
Mustafa Alperen Seki
ecc09256d8 Add 2PLAY5 2017-12-18 22:54:38 +00:00
Mustafa Alperen Seki
fe01afe794 Move Update Queue to bottom on Player.yaml and ingame-player.yaml 2017-12-18 19:22:07 +00:00
Mustafa Alperen Seki
6f41be209c Allow all upgradable structures to build upgrades. 2017-12-18 19:22:07 +00:00
Paul Chote
e35e93557c Remove obsolete NearestCellTo helper. 2017-12-18 07:47:15 +00:00
Paul Chote
30cafcbc25 Use Util.AdjacentCells to determine ExternalCapture validity.
This matches the set of cells targeted by MoveAdjacentTo.
2017-12-18 07:47:15 +00:00
reaperrr
85c54e04d9 Replace LINQ in AirStates.CountAntiAirUnits 2017-12-17 21:18:44 +00:00
reaperrr
01a88862b3 Remove IDisable for good 2017-12-17 21:18:44 +00:00
reaperrr
c1cba4ecc1 Make Gate more independent from Building and pausable-conditional
Replace Gate IsDisabled checks with IsTraitDisabled/Paused checks
2017-12-17 21:18:44 +00:00
reaperrr
383840135f Replace IsDisabled checks in production with IsTraitPaused/Disabled checks
Note: We might want to separate IsTraitDisabled checks later (possibly make the latter cancel the currently produced item), but that can be done in a follow-up.
2017-12-17 21:18:44 +00:00
reaperrr
3aa8b3ae29 Remove unit.IsDisabled check from AirStates 2017-12-17 21:18:44 +00:00
RoosterDragon
be761de768 Compute map UIDs without copying all data to a MemoryStream.
We can use MergedStream to create a single combined stream with all the input and pass this to the hash function. This saves copying all the data into a MemoryStream to achieve the same goal, which requires more memory and allocations.
2017-12-17 19:20:12 +01:00
Paul Chote
49f0e4ebcf Fix incorrectly named lobby option properties. 2017-12-17 14:51:10 +02:00
Paul Chote
1a405b17ba Register the current mod even if LaunchPath is bogus. 2017-12-17 04:21:17 +01:00
RoosterDragon
a9d1d374b8 Remove draw line 2D helper method.
Callers can provide 3D points easily, and this avoids the need to allocate and slow down enumeration via the points.Select(p => new float3(p, 0)) wrapper.
2017-12-17 01:51:51 +01:00
RoosterDragon
de38313579 Cache VariableExpressions on load.
Compiling these expressions is sadly expensive, and we needed new ones for every trait on every actor each time one was generated. The expressions thankfully can be shared as they are pure functions, which removes this overhead.
2017-12-17 01:42:21 +01:00
RoosterDragon
bf21fc5213 Use StringComparison.Ordinal for StartsWith checks in TechTree.cs. 2017-12-17 01:28:25 +01:00
RoosterDragon
13edaefcac Avoid LINQ when building map domains. 2017-12-17 01:28:25 +01:00
RoosterDragon
dd2ae9fe5e Avoid LINQ in some Tick methods.
As Tick is called often, avoiding allocation overhead in these methods is useful.
2017-12-17 01:28:25 +01:00
Kevin Hinton
86f9b8807e Add EffectiveOwner to Lua Scripting API. 2017-12-16 18:00:41 +00:00
FrameLimiter
72a11ec2a5 Removed duplicate values in defaults.yaml 2017-12-16 17:45:33 +00:00
FrameLimiter
60633dfdf2 Removed duplicate values in civilian.yaml 2017-12-16 17:45:33 +00:00
FrameLimiter
a6dc9c3b21 Removed duplicate value in allies-01 rules.yaml 2017-12-16 17:45:33 +00:00
RoosterDragon
5b51f2a0fa Avoid format strings in some places.
Where it is possible to directly concat strings, prefer this in some often-called methods.
2017-12-16 17:26:29 +01:00
RoosterDragon
f78c3bef33 Allow VS 2017 to format solution file. 2017-12-16 17:25:55 +01:00
RoosterDragon
c8c7629bce Convert some stray spaces to tabs. 2017-12-16 15:53:03 +00:00
Paul Chote
502c3e2bf5 Remove global chat integration. 2017-12-13 21:04:16 +01:00
GSonderling
488cec64b8 Added support for filtering exits by production type. 2017-12-13 04:08:52 +01:00
Arular101
1bf59e885d Upgrade rules for increasing HP and damage by 10x for the D2K mod 2017-12-12 23:56:25 +01:00
Arular101
50185d3ccd Small adjustments 2017-12-12 23:56:25 +01:00
Arular101
64a3187fd1 Increase damage and HP by 10x 2017-12-12 23:56:25 +01:00
Arular101
a1b3fe2bda Parabombs tooltip for airfield
with selection grouping
2017-12-12 23:14:30 +01:00
Arular101
56634564f2 Parabomb tooltip fixes 2017-12-12 23:14:30 +01:00
Mustafa Alperen Seki
fd1aa07f83 Adjust D2K Building Selection Boxes 2017-12-12 23:02:55 +01:00
Paul Chote
3ad6a87920 Center the vertical alignment of lobby options if less than the panel height.
This also enables an extra row to be shown before triggering the scroll bar.
2017-12-12 22:43:11 +01:00
Paul Chote
3f67feab0e Rename boolean LobbyOption fields. 2017-12-12 22:43:11 +01:00
Paul Chote
36fccbc453 Add Checkbox/Dropdown to lobby options yaml fields. 2017-12-12 22:43:11 +01:00
Paul Chote
ea32c758eb Expose default UI labels and tooltips to yaml. 2017-12-12 22:43:11 +01:00