Commit Graph

22 Commits

Author SHA1 Message Date
Paul Chote
b74ff33039 Revert "Fix QuantizeFacing returning values >= numFacings."
This reverts commit f35ee8c30325f478d8bcd4bdf6772c543c3c1691.
2018-12-31 00:01:03 +00:00
Paul Chote
9b3ddee517 Fix QuantizeFacing returning values >= numFacings. 2018-12-24 00:00:06 +01:00
Alexis Hunt
08ad7d7f4e Refactor handling of hit radii in projectiles.
penev discovered that the RulesetLoaded functions of projectiles were
never being called, meaning that their blocking calculations were not
properly accounting for actors with large hitboxes.

The best fix for this is to change FindActorsOnLine to always account
for the largest actor's hit radius, rather than forcing callers to pass
the largest radius. Per the comment in Util.cs, as a result, move this
computation to ActorMap. I decided to simplify by not making a separate
calculation for actors that block projectiles only; this may cause a
small performance degradation as the search space is a bit larger.

Similarly to this, I've removed the ability to specify a search radius
manually. Because this is only a search radius, setting a value smaller
than the largest eligible actor makes no sense; that would lead to
completely inconsistent blocking. Setting a larger value, on the other
hand, would make no difference.

CreateEffectWarhead was the only place in core code any of these search
radii were set, and that's because 0 was a mysterious magic value that
made the warhead incapable of hitting actors. I replaced it with a
boolean flag that more clearly indicates the actual behaviour.

Fixes #14151.
2018-02-21 23:26:41 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
forcecore
d1328212c6 AttackFrontal's FacingTolerance is now in effect 2017-08-07 10:26:26 +02:00
Matthias Mailänder
fdad5e2c48 Add weapon rules documentation. 2017-08-05 21:00:06 +02:00
Matthias Mailänder
1a54b36e2b Cache shouldn't be exposed at all so drop it. 2017-08-05 21:00:06 +02:00
Matthias Mailänder
55ea54ff2d Explain the color notation. 2017-08-05 21:00:06 +02:00
Matthias Mailänder
59d88199cf Give Dictionaries a friendlier notation. 2017-08-05 21:00:06 +02:00
Matthias Mailänder
0a150bcc75 Move friendly type names into shared helper class. 2017-08-05 21:00:06 +02:00
reaperrr
43b55ae333 Move Shape from Health to new HitShape trait
Renamed Shape to Type
2017-06-04 00:07:08 +02:00
reaperrr
9f9d1f9e5f Added helper utility for finding best hit-shape scan radius 2017-05-13 11:15:38 -07:00
reaperrr
e23a866979 Move RandomDelay from AmbientSound to Util 2017-02-04 12:31:11 +01:00
Paul Chote
2bd5a392d1 Add plumbing for custom movement layers. 2017-01-29 18:58:33 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
3b1e4d708d Fix an off-by-one error in NormalizeFacing. 2016-09-02 19:57:32 +01:00
Paul Chote
59f5e24189 Simplify and fix missile turnaround facing check. 2016-04-23 17:14:56 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
3a99111a42 Improve Util.Shuffle.
Reduce algorithmic complexity from O(n^2) to O(n).
2016-02-14 22:22:00 +00:00
Paul Chote
608b5d1674 Add UseClassicFacingFudge flag for TD/RA. 2016-01-27 21:32:21 +00:00
Paul Chote
b0bd252343 Move Util to Mods.Common. 2016-01-19 23:35:18 +00:00