Commit Graph

80 Commits

Author SHA1 Message Date
RoosterDragon
b8b8b1e2df Minor changes to reduce allocation.
- Cache a predicate in ActorMap.
- Use short circuiting to skip a call to HasTrait in AttackBase.
- In AutoTarget.ScanForTarget, move the check for the scan time above the calculations since we can skip them if it's not time yet.
- In AutoTarget.ChooseTarget, merge four Where calls into one.
2014-06-12 05:32:44 +01:00
RoosterDragon
0027434fbd Avoid multiple enumerations of armaments in AttackBase.
- Avoid enumerating the collection more than once in a method as it is not trivial.
2014-06-04 02:17:44 +01:00
Pavlos Touboulidis
b560268495 Change animations to use the proper SequenceProvider
Remove references to the global "Game" and use the SequenceProvider
of the current world/map.
2014-05-17 14:33:16 +03:00
WolfGaming
5496636933 Fixes Camo Pillbox not decloaking when attacking 2014-05-14 10:54:29 +00:00
Pavlos Touboulidis
558924f265 Fixes #5278: SAM site on the TD shellmap starts open 2014-05-14 00:17:24 +03:00
reaperrr
7ba00ced5a Make MuzzleFlash palette customizable. 2014-05-03 15:38:34 +02:00
Matthias Mailänder
01a3162725 allow animations to pause on low power
closes #2949
2014-04-20 14:47:53 +02:00
Paul Chote
1b2a90c00c Migrate to System.Lazy. 2014-04-09 20:20:41 +12:00
Matthias Mailänder
67cd0645a4 update to .NET 4.0 2014-04-09 20:20:26 +12:00
Matthias Mailänder
c76ebbdc46 exclusive force fire on husks and bridges 2014-04-03 15:57:41 +02:00
Paul Chote
387a5ded4b Add AttackGarrisoned for allowing passengers to shoot outside. Fixes #4483. 2014-03-21 10:03:53 +13:00
Paul Chote
ea79eb28fc Allow Attack* to control a subset of armaments. 2014-03-21 10:03:53 +13:00
Paul Chote
9d1526f4e7 Clean up Attack*. 2014-03-21 10:03:53 +13:00
Paul Chote
0ca7ee280f Move unwanted AttackBase logic to the individual Armaments. 2014-03-21 10:03:53 +13:00
Pizzaoverhead
ce49d5df5e Display an "outside range" cursor for attacks. 2014-03-12 23:50:08 +13:00
Paul Chote
2fd47ee743 Remove some unnecessary trait/info lookups from AttackBase. 2014-03-12 23:50:08 +13:00
Paul Chote
113bfe5311 Make Attack*Info plumbing consistent. 2014-03-12 23:50:08 +13:00
Paul Chote
116e4acda3 Fix style nits in other Attack traits (no logic changes). 2014-03-12 23:50:08 +13:00
Paul Chote
a8bd25a6a5 Clean up AttackPopupTurreted. 2014-03-12 23:50:08 +13:00
Paul Chote
93c8be4e79 Clean up AttackOmni. 2014-03-12 23:50:07 +13:00
Paul Chote
6d95c93bea Clean up AttackCharge. 2014-03-12 23:50:07 +13:00
reaperrr
c1954f498b Fixes unused fields. 2014-03-07 14:28:22 +01:00
reaperrr
2319709749 Renamed AttackTesla into AttackCharge and improved it.
Delay for initial charge is no longer hard-coded and can be customized now.
Same for delay between each charge.
Changed default MaxCharges to 1.
Added descriptions (except for MaxCharges since it's self-explanatory).
2014-03-06 20:26:48 +01:00
Paul Chote
1759d73ed7 Add following to IMove. 2014-02-01 10:55:05 +13:00
Paul Chote
ecdae4cbbe Convert weapons to world coords. 2013-12-26 19:45:12 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
e30d8cb817 Remove redundant CanAttackGround flag. 2013-11-02 12:49:26 +13:00
Matthias Mailänder
a5b954a563 never heal enemies
fixes #3597
2013-09-21 07:37:20 +02:00
Paul Chote
bc5c11e44f Check ITargetable when deciding target validity. Fixes #3659. 2013-08-22 19:29:05 +12:00
Paul Chote
8fd4243861 Avoid unnecessary Mobile lookups in Follow. 2013-08-22 19:29:05 +12:00
ScottNZ
115a447b2f Fix the autotarget bug that made turrets uncontrollable in combat 2013-08-17 17:53:50 +12:00
Paul Chote
9c5b526a3d Enable frozen order: Attack. 2013-08-12 21:34:19 +12:00
Paul Chote
40a9caddc7 Add FrozenActor target type. 2013-08-12 21:34:18 +12:00
Paul Chote
e4d1c654ed Merge IOrderTargeter.CanTargetActor and CanTargetLocation. 2013-08-11 22:23:52 +12:00
Paul Chote
4f3c9aa0af Introduce Target.Type property. 2013-08-11 22:23:52 +12:00
Paul Chote
755fa6eaf4 Include Armament and Barrel in INotifyAttack. 2013-08-03 16:21:57 +12:00
Paul Chote
4a425e0fa0 Remove PSubVec from AttackWander. 2013-08-01 20:18:43 +12:00
Paul Chote
ecc119cb29 Combine IHasLocation -> IOccupySpace, IMove -> ITeleportable. 2013-07-21 17:33:32 +12:00
Paul Chote
0326d2bbd0 Use WRange for Follow. 2013-07-10 20:03:53 +12:00
Paul Chote
ae987b3c10 Tidy AttackFrontal. 2013-07-10 19:24:49 +12:00
Paul Chote
2cff2d8bbe Improve Leap behavior:
* Configurable jump speed.
* Configurable jump angle.
* Configurable attack sound (uses weapon report).
* Don't accidentally eat tanks.
2013-07-08 23:40:22 +12:00
Paul Chote
87361df043 Centralize weapon validity check into WeaponInfo. 2013-07-08 23:40:21 +12:00
Paul Chote
d0bed06765 Use WVec overload of Util.GetFacing where possible. 2013-07-08 21:52:27 +12:00
Paul Chote
9eaeeffae9 CenterLocation.ToCPos() -> CenterPosition.ToCPos(). 2013-07-08 21:52:26 +12:00
Paul Chote
561cb6cfe0 Rewrite Leap activity to be more robust.
The dog will now always leap to the target
subcell (even if the target dies or moves),
and will kill whatever happens to be in the
target cell when it lands.
2013-07-08 21:52:25 +12:00
Paul Chote
ec9054ceb1 Use Target range checks in AutoTarget and dependencies. 2013-07-06 19:16:16 +12:00
Paul Chote
4a471eff8b Use Target range checks in AttackLoyalty. 2013-07-06 19:12:26 +12:00
Paul Chote
07f9575bb7 Use Target range checks in AttackLeap. 2013-07-06 19:12:26 +12:00
Paul Chote
6f67602d57 Use Target range checks in attack activities. 2013-07-06 19:12:26 +12:00