Commit Graph

139 Commits

Author SHA1 Message Date
abcdefg30
a2af88da21 Add a InitialSpawnDelay to CrateSpawner 2015-09-25 16:53:43 +02:00
Pavel Penev
c41446e022 Merge pull request #9139 from Mailaender/editor-cash-counter
Added a total resource cash counter to the map editor
2015-09-24 15:07:15 +03:00
atlimit8
9acf121eb1 Replace ActorInfo.Traits.WithInterface with ActorInfo.TraitInfos<T>() 2015-09-21 15:50:57 -05:00
Paul Chote
ef55d646f7 Unstatic the Sound class. 2015-09-20 14:11:06 +01:00
Matthias Mailänder
fea59346a5 add a total resource cash counter to the map editor 2015-09-19 18:21:07 +02:00
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
RoosterDragon
519be4374c Fixed pooling of layers used for pathfinding.
The previous implementation:
- Was failing to dispose of pooled layers.
- Was using a finalizer to allow undisposed layers to be reused.

This means all pooled layers are kept alive indefinitely until the map changes. If the finalizer is slow for any reason then the pathfiinder will allocate new layers when the pool runs out. Since these new layers are eventually stuffed back into the pool when the finalizer does run, this can theoretically leak unbounded memory until the pool goes out of scope. In practice it would leak tens of megabytes.

The new implementation ensures layers are disposed and pooled correctly to allow proper memory reuse. It also introduces some safeguards against memory leaks:
- A cap is set on the number of pooled layers. If more concurrent layers are needed than this, then the excess layers will not be pooled but instead be allowed to be garbage collected.
- No finalizer. An implementation that fails to call dispose simply allows the layer to be garbage collected instead.
2015-09-16 21:25:46 +01:00
TheRaffy
1fc2158f2e Added a WeatherOverlay 2015-09-06 20:25:29 +02:00
atlimit8
8250f223c4 More HashSet trait fields & Lint support 2015-09-05 16:59:30 -05:00
RoosterDragon
77923a27c1 Tweak IPathSearch to avoid exposing the OpenQueue directly. 2015-09-01 17:29:36 +01:00
RoosterDragon
774992c246 Cache only unit paths in the pathfinder.
The path caching works on the assumption that the time saved from reusing a cached path outweights the cost of caching it in the first place.

For unit paths, this assumption holds. For path searchs, we spend more time caching them then we save when we get to reuse these cached paths. This is because they are reused less often, and calculating their key is more expensive in comparison.
2015-09-01 17:29:35 +01:00
Pavel Penev
09f67d18bb Some internal "race" to "faction" renaming 2015-08-22 23:34:36 +03:00
Pavel Penev
1e817fad76 Merge pull request #9089 from Mailaender/editor-coordinate
Added a coordinate display to the map editor
2015-08-18 00:12:10 +03:00
Matthias Mailänder
322358ff3d also check shroud sequences 2015-08-17 21:36:55 +02:00
Matthias Mailänder
118782a85e check palette references 2015-08-17 21:36:45 +02:00
Matthias Mailänder
51fabae106 change editor tooltip to actor: description (type) 2015-08-16 21:58:17 +02:00
Pavel Penev
4d11195989 Rename MPStartUnitsInfo.Races to Factions
Also add an upgrade rule.
2015-08-11 04:00:08 +03:00
Paul Chote
155d0cc97d Reveal the initial resources if shroud is disabled.
Fixes #8943.
2015-08-05 20:27:36 +01:00
Matthias Mailänder
3b47aff61c correct the namespace according to file location 2015-08-05 15:31:07 +02:00
Paul Chote
0b4543919d Account for disabled shroud/fog in ShroudRenderer.
Fixes #8827.
2015-08-03 21:07:02 +01:00
Oliver Brakmann
9e2f06aa2d Merge pull request #8876 from pchote/music
Refine the music playlist code.
2015-08-02 15:49:13 +02:00
Oliver Brakmann
4b6c37f90f Merge pull request #8878 from pchote/fix-cratebadger-spawn
Fix crate drop aircraft spawn height.
2015-08-02 14:51:42 +02:00
Paul Chote
5f2c62634c Merge pull request #8817 from penev92/bleed_cleanups
Touch up a few files
2015-08-02 09:30:43 +01:00
Paul Chote
1d307bfe07 Disable music auto-play unless tracks are installed. 2015-08-01 23:05:09 +01:00
Paul Chote
9b3ef9e7f7 Move MusicPlaylist to Mods.Common. 2015-08-01 22:56:07 +01:00
Paul Chote
180f6e83d4 Fix crate drop aircraft spawn height. 2015-08-01 20:01:45 +01:00
Oliver Brakmann
439bc4ab34 Revert "HACK: Testcase for edge clamping."
This reverts commit fb84f1157e.
2015-07-30 16:36:40 +02:00
Paul Chote
fb84f1157e HACK: Testcase for edge clamping.
Remove before merging!
2015-07-30 08:18:45 +01:00
Oliver Brakmann
dff56f6c20 Merge pull request #8781 from pchote/heightmap-shroud
Add plumbing for heighmap-aware shroud and map bounds checks.
2015-07-28 15:35:51 +02:00
Pavel Penev
7701980b76 Simple code style cleanups 2015-07-28 14:21:17 +03:00
Paul Chote
86ba26e013 Convert shroud calculations and rendering to PPos. 2015-07-27 19:34:50 +01:00
Paul Chote
e8794032e0 Introduce initial PPos plumbing.
PPos is best thought of as a cell grid applied in
screen space.  Multiple cells with different
terrain heights may be projected to the same PPos,
or to multiple PPos if they do not align with the
screen grid.

PPos coordinates are used primarily for map edge
checks and shroud / visibility queries.
2015-07-27 19:34:49 +01:00
Paul Chote
a8c6a1aa97 Correct Contains check in DomainIndex. 2015-07-27 19:06:20 +01:00
Paul Chote
3a7300810c Correct Contains check in BridgeLayer. 2015-07-27 19:06:20 +01:00
penev92
7c1ef2231d Rename RaceInit to FactionInit 2015-07-25 00:39:31 +03:00
Oliver Brakmann
1e7da8514a Merge pull request #8735 from reaperrr/safe-pf-changes
Minor pathfinder-related changes (preparation for mobile refactor)
2015-07-22 14:42:52 +02:00
reaperrr
711ec0c600 Minor pathfinder changes 2015-07-22 06:36:00 +02:00
Paul Chote
ce4bdced47 Use a TerrainSpriteLayer for smudges. 2015-07-18 12:14:23 +01:00
Paul Chote
fe41ee0346 Clean up SmudgeLayer init. 2015-07-18 12:14:23 +01:00
Paul Chote
1f0f8c953b Use TerrainSpriteLayers for editor resources. 2015-07-18 12:14:13 +01:00
penev92
479eb307d6 Remove unused parameter from Player's constructor 2015-07-15 04:58:50 +03:00
penev92
bb648decc3 Rename Player.Country to Player.Faction 2015-07-15 04:06:52 +03:00
Oliver Brakmann
380cf22477 Merge pull request #8661 from penev92/bleed_renameCountry
Rename the Country trait to Faction
2015-07-14 21:05:52 +02:00
Oliver Brakmann
4ed7a4ce8a Merge pull request #8659 from penev92/bleed_playerReference
Rename PlayerReference.Race to Faction
2015-07-14 20:15:56 +02:00
penev92
2e04fb5ddd Rename Faction trait members
Rename Faction.Race to Faction.InternalName
2015-07-14 18:50:39 +03:00
atlimit8
1bcc07ce69 Add property requirements to safe traits 2015-07-12 12:44:30 -05:00
Matthias Mailänder
56e9bcd96e rename RangeSquard to LengthSquared 2015-07-09 21:16:01 +02:00
Matthias Mailänder
413baf9d8b rename WDist.Range to WDist.Length 2015-07-09 10:55:38 +02:00
Matthias Mailänder
7447e0bf93 rename WRange to WDist 2015-07-09 10:55:38 +02:00