Commit Graph

4314 Commits

Author SHA1 Message Date
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
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
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
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
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
Mustafa Alperen Seki
9122aac555 Fix rendering of IProductionIconOverlay on Spec UI 2018-03-19 23:11:48 +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
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
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
Paul Chote
be96bafc69 Match missions using the unresolved path. 2018-03-11 16:32:10 +01:00
DESKTOP-7PLKRFC\jur_1
311cd521e3 Refinery spawned harvesters should prioritize lower ore #14827 2018-03-11 00:50:55 +01:00
xecollons
227cf35d5f Added TooltipDescription 2018-03-10 17:55:05 +01:00
Peter Antal
3ce2417a06 Create SupportDirPrefix and IsPathRelativeToSupportDirectory() as members on Platform class. 2018-03-10 12:54:01 +00:00
reaperrr
fd83cbf60f Fix WithTurretAimAnimation disabled handling
The old sequence was not recovering when this trait lost its required
condition while the aim anim was running.

Now it doesn't unconditionally return, but instead checks what the
current sequence is and resets to base turret sequence if AimAnim is
disabled.
2018-03-10 00:13:42 +01:00
Mustafa Alperen Seki
1d8b1906ef Add IsPlayerPalette support to WithDecoration 2018-03-10 00:12:56 +01:00
abcdefg30
b012fa62fe Replace 'target point' by 'center' in all descriptions 2018-03-09 23:32:07 +01:00
atlimit8
7283f9804e Added Polygon IHitShape 2018-03-09 23:32:07 +01:00
reaperrr
5a889c0efd De-duplicate some WithTurretAttackAnimation code 2018-03-09 21:30:30 +01:00
reaperrr
769a49ef0b Make WithTurretAimAnimation conditional 2018-03-09 21:30:30 +01:00
reaperrr
76da40bbda Make WithTurretAttackAnimation conditional 2018-03-09 21:30:30 +01:00
reaperrr
02b1530300 Fix upgrade rule dates 2018-03-09 19:28:29 +01:00
reaperrr
79c78090d1 Remove WithSpriteTurret.AimSequence
We can now use WithTurretAimAnimation instead.
2018-03-09 19:28:29 +01:00
reaperrr
a1ad76ba74 Split *AimAnimation from WithTurretAttackAnimation
These two didn't interact and actually even conflicted when used at the same time, so splitting them is the sensible thing to do.
2018-03-09 19:28:29 +01:00
reaperrr
d643d2ebda Remove legacy .aud sound defaults from Common traits
While C&C-specific sound defaults might be acceptable for C&C-specific traits like MadTank and Chronoshiftable, for common, generic traits like Building they no longer are.
2018-03-09 18:58:49 +01:00
Mustafa Alperen Seki
5e7e3bb011 Add DamageTypes to Kill() and make some traits use it. 2018-03-09 00:25:29 +01:00
Pavel Penev
b620e8107f Added GrantRandomCondition trait. 2018-03-08 18:15:54 +01:00
Mustafa Alperen Seki
c976bb1d7b Make BaseProvider PausableConditional 2018-03-08 17:19:23 +01:00
Matthias Mailänder
12054506e1 Add support for JASC and GIMP color palettes 2018-03-08 16:54:13 +01:00
reaperrr
92584c3c85 Fix upgrade rule dates to be after release-20180307 2018-03-08 16:03:14 +01:00
reaperrr
d90ff99e74 Replace WithReloadingSpriteTurret with conditions
WithReloadingSpriteTurret was bound to run into conflicts with any WithTurret*Animation traits due to overriding the turret sequence constantly via ITick.
Using (stacked) conditions instead avoids that.
2018-03-08 16:03:14 +01:00
reaperrr
55b11d1745 Don't cache ActorSpawners at creation
Re-evaluate before every spawn attempt instead.
Also accounts for ActorSpawner being conditional now.

While a bit more costly in terms of performance, this allows to create spawns mid-game.
2018-03-08 15:39:44 +01:00