Commit Graph

130 Commits

Author SHA1 Message Date
Matthias Mailänder
4203feed40 Merge pull request #10576 from abcdefg30/bridgeRepaired
Add support for playing a BridgeRepaired notification
2016-01-28 20:09:05 +01:00
teees
65e1e301f4 Added Gates
FIXUP: account for full gate footprint when updating neighbours.

FIXUP: gate-wall connection adjacency yaml.
2016-01-25 09:14:00 +01:00
abcdefg30
db1d83fc4e Add support for playing a BridgeRepaired notification 2016-01-24 21:16:26 +01:00
Paul Chote
0039a2bdbf Split out an ActivityUtils class. 2016-01-19 23:34:13 +00:00
Paul Chote
e46fc644c1 Remove Util.QuantizeFacing from trait code. 2016-01-19 23:34:13 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Paul Chote
3b18c7815d Remove Util.GetFacing. 2016-01-16 22:38:17 +00:00
teees
b7a3a446e1 Unload passengers on death 2016-01-08 08:50:35 +01:00
teees
f46185b85f Reworked cloaking behaviour 2016-01-07 13:44:16 +01:00
Paul Chote
5b99a0c2da Implement enter behaviour for building/bridge repair. 2015-12-30 19:54:18 +00:00
Paul Chote
f5fafb1b9d Move EnterBehaviour behaviour to Enter. 2015-12-30 19:53:06 +00:00
Oliver Brakmann
71478aa2b8 Merge pull request #9734 from RoosterDragon/auto-target-perf
Improve AutoTarget performance
2015-12-20 19:53:17 +01:00
abcdefg30
cf9ea91606 Fix the idle animation of the hostBuilding in Rearm.cs
using the damage state of the reloaded actor
2015-12-13 16:00:18 +01:00
RoosterDragon
d0c23ef2dd Prevent redundant enumerations in Attack.InnerTick.
The armaments variable is enumerated several times, but the results won't change. If we cache it straight away we can improve performance.
2015-12-12 20:55:23 +00:00
RoosterDragon
dcf375a412 Store Targetables in Actor.
This can be used to avoid several lookups for these traits, as well as allow Actor to provide specialised methods to deal with target types efficiently. This also reduces some code duplication.
2015-12-12 20:55:17 +00:00
abcdefg30
0976972f7c Merge pull request #10141 from reaperrr/fix-anim-cancel
Fix actors not going back to idle animation after custom animation
2015-12-07 15:13:00 +01:00
Oliver Brakmann
8c8e29e2fa Merge pull request #9802 from RoosterDragon/move-min-range
Fix MoveWithinRange not moving far enough for min range checks
2015-12-06 17:11:22 +01:00
atlimit8
c827dbe183 Replace IDisableMove with upgradability 2015-12-04 19:26:49 -06:00
atlimit8
0fc04b7a4a Make Mobile upgradable 2015-12-04 19:22:23 -06:00
abcdefg30
07bfd5f59e Merge pull request #9786 from RoosterDragon/reserve-fixes
Reserve fixes
2015-12-01 21:13:41 +01:00
Pavel Penev
e1dc53a0d2 Merge pull request #10093 from teees/harvesterdocksequence
Made the HarvesterDockSequence class abstract
2015-12-01 13:53:21 +02:00
teees
c9e5dba38b Fixed FallToEarth groundlevel check 2015-11-30 13:02:16 +01:00
reaperrr
e9ed50a831 Fix actors not going back to idle animation after custom animation 2015-11-28 22:45:05 +01:00
Paul Chote
4c0ffe98f1 Merge pull request #10121 from RoosterDragon/spelling
Fix some spellings
2015-11-28 10:42:58 +00:00
RoosterDragon
bfe1804bf6 Fix some spellings. 2015-11-27 16:19:59 +00:00
Paul Chote
6304d72f44 Add enter behaviour customisation to C4Demolition. 2015-11-25 21:16:15 +00:00
teees
0c17188f24 Made the HarvesterDockSequence class abstract 2015-11-23 23:49:00 +01:00
RoosterDragon
26d7d59c1a Fix MoveWithinRange not moving far enough for min range checks.
MoveWithinRange was only moving the unit far enough away so the center of the target was above the minimum distance. However, the min range checks in the attack code require all positions on the target to be above the minimum distance. For large targets (e.g. buildings) this means some of the target was still too close, and the unit would get stuck in a loop.

Now MoveWithinRange uses the same range checks in order to ensure units are moved the correct distances.
2015-10-29 22:59:20 +00:00
atlimit8
b6f17df260 Add ActorsHavingTrait<TTrait>([Func<TTrait, bool]) 2015-10-28 16:36:45 -05:00
RoosterDragon
b4180615a8 Add Aircraft.MakeReservation.
This provides a simpler method for making reservations and also ensures the previous reservation is definitely unreserved before being discarded.
2015-10-27 22:15:56 +00:00
RoosterDragon
e2dd967757 Fix some reservation issues.
- TakeOff.Tick was nulling a local variable, rather than the Reservation field - this is changed to call UnReserve which does the right thing.
- Aircraft.ResolveOrder was missing an UnReserve call before setting a new reservation.
2015-10-27 22:00:26 +00:00
RoosterDragon
30aee56d78 Improve some actor queries.
Use ActorsWithTrait if possible to avoid querying all actors in the world.
2015-10-25 01:19:29 +01:00
atlimit8
1e890a921f Merge pull request #9709 from reaperrr/unitsat-actorsat
Rename ActorMap *UnitsAt* occurences to *ActorsAt*
2015-10-21 09:56:41 -05:00
reaperrr
2f69711341 Rename ActorMap *UnitsAt* occurences to *ActorsAt*
These enumerate actors in general, not just mobile actors (which the term 'unit' usually refers to).
2015-10-16 00:07:06 +02:00
Huw Pascoe
c95fc793e4 Moved Health trait to OpenRA.Mods.Common
In preparation for custom hitboxes.
2015-10-12 01:56:00 +01:00
Matija Hustić
d94c645046 First step in the attack mechanism's refactor.
Enabled firing multiple armaments at a target simultaneously.
Each armament defines own cursor for targeting.
The force attack modifier influences armament choice for target.
Autotargeting modified to handle firing multiple armaments simultaneously.
As a consequence, healers (medics) no longer require separate Heal
activity and AttackMedic and AutoHeal traits.
2015-10-06 01:46:55 +02:00
atlimit8
49d7604bd9 Cache WeaponInfo look-ups 2015-10-03 22:29:40 -05:00
Pavel Penev
0ee38de4bb Rename HeliReturn
Rename HeliReturn to HeliReturnToBase to keep somewhat with the convention established for Plane- against Heli- oriented traits.
2015-10-01 20:15:50 +03:00
Pavel Penev
8a44366667 Merge Plane and Helicopter into Aircraft 2015-10-01 20:15:41 +03:00
Pavel Penev
0ee1ad3fa4 Add a default value to ReturnToBase's constructor for non-Lua usages 2015-10-01 20:09:16 +03:00
atlimit8
74a9dc6793 Added IRangeMultiplier 2015-09-24 16:37:43 -05:00
atlimit8
527675db8d Attack activities use armaments directly through constructor 2015-09-24 16:17:06 -05: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
atlimit8
09984683a7 Add ActorInfo.TraitInfo[OrDefault]<T>() requiring ITraitIfo types 2015-09-19 09:56:14 -05:00
atlimit8
6970959ef1 .Trait[OrDefault]<Trait> => .Info.Traits.Get[OrDefault]<TraitInfo> where applicable 2015-09-19 09:49:24 -05:00
atlimit8
8162fa27ab Add ActorInfo.HasTraitInfo<T>() requiring ITraitInfo types 2015-09-19 09:49:24 -05:00
atlimit8
85fab45451 Remove Actor.HasTrait<T>() 2015-09-19 09:49:23 -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
Matthias Mailänder
0df8b3ba39 bring back AI search for new resource patches avoiding enemies 2015-09-06 12:56:23 +02:00