Commit Graph

116 Commits

Author SHA1 Message Date
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
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
Pavel Penev
27e16d0730 Don't try to play a rearming animation if it doesn't exist 2015-09-03 15:55:20 +03:00
atlimit8
f5c3575c5a Support multiple ITargetable traits 2015-09-02 23:14:40 -05:00
Pavel Penev
2042fccefd Merge pull request #9189 from reaperrr/bye-rendersimple3
Remove RenderBuilding
2015-09-02 19:21:01 +03:00
Pavel Penev
cdedfe6931 Don't get stuck in deployed mode because of an impossible move order 2015-09-01 20:19:29 +03:00
reaperrr
9da56f51e2 Remove RenderBuilding 2015-08-30 15:44:59 +02:00
Matthias Mailänder
7108344501 bail out early before trying impossible paths 2015-08-24 21:03:46 +02:00
Pavel Penev
71c5d69dc5 Merge pull request #8938 from abcdefg30/heliheigth
Have flying actors account for terrain height
2015-08-17 13:53:39 +03:00
abcdefg30
15f22c32b3 Merge pull request #8886 from atimoschenkow/fly-queue
Fix queue commands for Plane/Heli
2015-08-12 00:50:43 +02:00
atimoschenkow
b1c51cc910 Fix for #6161 queue commands for Plane/Heli (do not ignore Order.Queued in ResolveOrder()) 2015-08-07 23:41:03 +02:00
Pavel Penev
10aee9ffa9 Rid Transforms and Transform of "race" 2015-08-05 18:15:11 +03:00
abcdefg30
a94e35163a Have flying actors account for terrain height 2015-08-04 15:48:03 +02:00
Matthias Mailänder
25ee5f7287 add the takeoff and landing sound 2015-08-01 22:46:06 +02:00
Pavel Penev
cccf5c5931 Check if the inner activity is null before trying to cancel it 2015-07-26 02:15:38 +03:00
penev92
7c1ef2231d Rename RaceInit to FactionInit 2015-07-25 00:39:31 +03:00