Commit Graph

24957 Commits

Author SHA1 Message Date
reaperrr
5276636598 Extract a HarvesterManager from HackyAI
This takes action when AI harvesters don't find ore near the base or became idle for some other reason.
2018-04-06 20:16:36 +02:00
reaperrr
82867b6c3a Move some stuff from HackyAI to new AIUtils 2018-04-06 20:16:36 +02:00
abcdefg30
63093eb986 Fix color picker actors being abstract 2018-04-04 18:33:53 +02:00
RoosterDragon
c9b19ffe52 Prevent attack move crashing if selected actors die.
- Cancel attack move if all actors die.
- Command bar no longer shows available actions from any dead units.
2018-04-04 18:30:47 +02:00
Paul Chote
7be71eb381 Remove broken Server.ExternalPort setting. 2018-03-31 18:09:07 +02:00
IceReaper
12407ae995 Fix asset browser displaying wrong file
If multiple files with same filename are present.
2018-03-31 16:08:35 +02:00
Kanar
dc46dd1f26 Re-active Edge-Scrolling for inverted Mouse-Scrolling 2018-03-30 23:47:32 +01:00
Paul Chote
2400b152ea Process shared map includes as part of the mod rules.
This ensures that they are only updated once instead
of repeating the updates for every map that includes them.
2018-03-30 21:31:15 +02:00
Paul Chote
02f769964e Fix a crash in UpdateMapCommand. 2018-03-30 21:31:15 +02:00
Paul Chote
aa5b9401c3 Add Chrome update plumbing. 2018-03-30 17:35:30 +02:00
abcdefg30
910064dfe5 Fix FormatMessageList appending a new line at the end of the list 2018-03-30 12:57:18 +01:00
abcdefg30
207a355909 Fix map files being labeled as "<no filename available>" 2018-03-30 12:57:18 +01:00
abcdefg30
13b89b1c50 Add IgnoreAbstractActors.cs 2018-03-30 12:57:18 +01:00
abcdefg30
972255c6a6 Fix line endings in upgrade rules files
- Use unix line endings
- No "\n" at the end of a message
2018-03-30 12:57:18 +01:00
CH4Code
5b24649c44 Add vision and VTOL husk to the carryall while in process of lifting harvesters. 2018-03-25 13:16:20 +02:00
abcdefg30
d15b462350 Remove the deprecated Difficulty member from MapGlobal (lua) 2018-03-23 20:23:09 +01:00
Paul Chote
ea68f1abb9 Implement new mod/map updater framework. 2018-03-23 20:04:52 +01:00
Thomas Ze
7552afeb16 Fix ActorMap.RemoveInfluenceInner see #14939 (RemoveInfluenceInner(influenceNode.Next.Next) call on influenceNode.Actor == toRemove) 2018-03-23 04:43:03 -03:00
RoosterDragon
f6471d411e Reuse set when rendering actors in the world to avoid allocations. 2018-03-22 23:32:03 -03:00
reaperrr
3069bbfa7d Fix infinite loop in HeliReturnToBase
This can happen if HeliAttack tells the heli to return to base when the player doesn't have any of the RearmBuildings available, because the activity queues itself after the HRTB, and the latter will, after a forced land, then queue back HeliAttack, which then immediately queues back HRTB and so on.

Instead, we now assume that if there is no base to return to, going to NextActivity is pointless and don't queue NextActivity.
RTB was likely ordered by HeliAttack due to lack of ammo, so resuming the attack would be pointless.
2018-03-22 22:50:50 +01:00
Paul Chote
d79d4479c7 Work around AI orders to invalid cells. 2018-03-22 13:52:41 +01:00
Paul Chote
7e94fa8c8a Fix multi-turreted actors not appearing in the map editor. 2018-03-22 12:21:34 +01:00
Michael Silber
6b24271a17 Pass ActorInfo through building-placement-validation code. 2018-03-21 12:53:50 +01:00
Paul Chote
8ea1da1046 Apply map upgrade rules without instantiating the Map object.
This avoids a crash that stops the maps from being updated
when the base mod ruleset is not valid (e.g. a trait is missing a
FieldLoader.Required property).  This also significantly improves the
upgrade performance.
2018-03-21 12:15:23 +01:00
Peter Antal
d2ff5b49fd Allow each caller on MergeOrDefault to discard nodes.
Use filtering ActorInfo's to drop template actors.
2018-03-21 12:10:31 +01:00
reaperrr
40d7b41e84 Tweak Cruiser and Destroyer turret offsets
Moved back turret of cruiser a bit more backwards and destroyer turret a bit forward.
2018-03-21 12:09:18 +01:00
RoosterDragon
d0f7511a62 Add TrimExcess to TypeDictionary.
After adding is finished, this can be used to reduce the memory footprint of the dictionary.
2018-03-21 12:08:23 +01:00
RoosterDragon
e17ede34ef Add Int32Matrix4x4 struct.
This allows matrices to be represented as a value type, and additionally allows avoiding array allocations when calculating rotations.
2018-03-21 12:07:53 +01:00
RoosterDragon
5bd5a384b7 Use a BitSet for representing target types.
- Rename Bits<T> to BitSet<T>.
- Implement set based helpers for BitSet<T>.
- When representing TargetTypes of ITargetable in various traits, use a BitSet<TargetableType> instead of HashSet<string> for better performance & reduced memory usage.
- Fix FieldLoader to trim input values when generating a BitSet<T>.
- Require T in BitSet<T> and BitSetAllocator<T> to be a class since it's just a marker value. This allows the JIT to instantiate generic code for these classes once, as they don't benefit from specialized code for T. (Typically JITs will generate shared code for all reference types, and unique code for every value type encountered).
2018-03-21 12:07:44 +01:00
Peter Antal
8fa94c5301 -Perform null check and add exception logging in RuleSet.
-Explicitly recognize connection termination on ServerOrder.Deserialize()
-Use explicit exception type for SDL2HardwareCursor failures.
2018-03-21 01:55:42 -03:00
reaperrr
f351f0346f Cache map option ShortGame at game load
To reduce MapOptions calls.
2018-03-21 01:49:52 -03:00
RoosterDragon
0555ce9321 Reduce allocations in AutoTarget.ChooseTarget.
- Cache active target query.
- Prefer .Count == 0 over Any when working with Lists.
- Use helper for GetEnabledTargetTypes.
- Don't declare target variable until actually needed.
2018-03-21 01:08:59 -03:00
RoosterDragon
986025ca76 Reuse HashSets for actors entered/exited in CellTrigger & ProximityTrigger.
Actors involved in the trigger are determined as actors move around near the trigger - and can be expensive in some maps. This allows us to avoid allocating new sets and the CPU hit required to set it up each time.
2018-03-21 01:01:48 -03:00
abcdefg30
11b44963da Remove duplicated rules from nod02a
They are already inherited from 'campaign-maprules.yaml'
and 'campaign-palettes.yaml'.
2018-03-21 00:52:18 -03:00
abcdefg30
7f55e85530 Rename DefaultCashLocked to DefaultCashDropdownLocked in yaml 2018-03-21 00:52:18 -03:00
Mustafa Alperen Seki
9122aac555 Fix rendering of IProductionIconOverlay on Spec UI 2018-03-19 23:11:48 +01:00
Paul Chote
e0bcfa918d Fix half-pixel offset in ColorBlock rendering. 2018-03-19 17:31:44 +01:00
Paul Chote
27d9a9e6ff Remove pre-20171014 upgrade rules. 2018-03-19 15:00:41 +01:00
David Wilson
9bc9ce4577 Color picker update with team color presets. Bots added will use available team color presets by default 2018-03-18 23:29:47 -03:00
netnazgul
b383b9abc9 Fix actors with PauseOnCondition ammo not scanning for targets when reloading 2018-03-18 22:57:18 +01:00
C. Helmig
aa829427f0 Fix silo preventing player elimination. 2018-03-18 22:11:36 +01:00
RoosterDragon
d2f2029caf Add FirstNonEmptyBounds method for IDecorationBounds interface.
This provides a more efficient way of determining the bounds by avoiding LINQ. A helper that works directly on arrays prevents allocation of an enumerator when the collection is know to be an array.
2018-03-18 22:06:12 +01:00
RoosterDragon
3b642b1a79 Reuse TargetTypes collection in FrozenActor.RefreshState. 2018-03-18 16:50:20 +01:00
RoosterDragon
b4609337f8 Reuse a HashSet for deduplicating footprints in AffectsShroud.
Shroud footprints are recalculated as actors move around the map, and thus this gets called quite often. This allows us to avoid allocating a new set and the CPU hit required to set it up each time.
2018-03-18 16:46:07 +01:00
RoosterDragon
63810220e4 Improve some usages of Aggregate. 2018-03-18 16:44:17 +01:00
RoosterDragon
adc4538c44 Prevent crash when invalid or not yet created LAN games are discovered. 2018-03-18 16:23:06 +01:00
RoosterDragon
f47595b780 Hide map preview when no replay is selected.
This prevents interaction with the widget than can cause crashes as no replay is selected yet.
2018-03-18 16:06:27 +01:00
Mustafa Alperen Seki
356f24b78c Add logic to disallowing On Hold on a queue. 2018-03-18 15:58:57 +01:00
RoosterDragon
f2e270ce06 Return IRenderable[] rather than IEnumerable<IRenderable> for animations.
Since some callers now know they have an array, then can enumerate it more efficiently and without allocating an enumerator.
2018-03-17 17:51:16 +01:00
fruehstueck
65c42a68ce Add shortcuts for make.ps1 commands 2018-03-15 17:46:39 +00:00