Commit Graph

51 Commits

Author SHA1 Message Date
penev92
eda3dfa50f Added enum export to documentation generation 2022-09-17 15:15:42 +02:00
penev92
a522457bb6 Reworked weapon documentation generation
Switched the Utility's ExtractWeaponDocsCommand output to JSON.
Added a Python script to generate documentation Markdown from JSON.
2022-09-02 20:56:55 +02:00
penev92
a73d710bec Added Util.InternalTypeName() 2022-09-02 20:56:55 +02:00
penev92
9ed2e699c6 Fix tiny error in output string 2022-09-02 20:56:55 +02:00
AspectInteractive2
a1a50d6c98 Added rotation logic to the renderer to enable the use of Interpolated Facings. 2022-07-17 17:03:53 +02:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
Matthias Mailänder
a2a668077c Refactor RandomDelay:
Allow different types of random
and reflect other use cases by renaming.
2021-10-02 20:17:03 +02:00
Matthias Mailänder
58e482c05a Fix hashset documentation. 2021-09-18 13:16:25 +01:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
teinarss
10676be377 Replace F extension with string interpolation 2021-05-08 22:20:59 +02:00
Paul Chote
fcc3008b00 Implement proper TS Tiberium and Vein logic. 2021-03-20 16:45:41 +01:00
teinarss
ed295ae315 Change throw exceptions to use nameof in parameter 2021-02-28 18:43:51 +01:00
Paul Chote
3aa6fd3dc4 Add a friendly type name for Nullable<T>. 2021-01-02 11:38:24 +01:00
Paul Chote
77ffc20a5f Convert Attack*.FacingTolerance to WAngle. 2020-11-30 16:39:48 +01:00
teinarss
13581c030d Use in parameter for Target 2020-11-06 22:02:24 +01:00
reaperrr
8513a83331 Add ImpactOrientation to WarheadArgs
Allows to pass the horizontal facing/yaw
and vertical angle/pitch of the carrier
projectile to warheads for further use.

Add ImpactPosition to WarheadArgs

InflictDamage doesn't pass the impact pos
directly, and the very point of WarheadArgs
is to avoid adding more and more arguments
to the warhead methods.
2020-07-12 19:52:55 +02:00
Pavel Penev
76dfda164e Moved projectile inaccuracy calculations to Common.Util
Also moved the InaccuracyType enum there. This also quietly adds the RangeModifiers to the calculations for all projectiles, while they were only used on Bullet so far, which seemed very wrong.
2020-07-05 13:04:18 +02:00
Paul Chote
803b930405 Change IFacing.TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Paul Chote
6adf45bcb4 Convert IFacing.Facing and TurnSpeed to WAngle. 2020-06-12 18:35:41 +02:00
Paul Chote
6d6b21a0eb Convert Aircraft.Facing to WAngle. 2020-06-01 20:25:38 +02:00
Paul Chote
c999b2d778 Convert QuantizeFacing to WAngle facings. 2020-05-28 21:23:51 +02:00
Paul Chote
bfb6c671fb Change QuantizeFacing to return a facing instead of an index. 2020-05-28 21:23:51 +02:00
reaperrr
c10487d635 Move ClassicFacingFudge support to Mods.Cnc
This moves the TD/RA-specific re-mapping of sprite facings
and coordinates to Mods.Cnc.
2020-04-24 18:22:35 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
69970d42f3 Prevent movement pausing at invalid position. 2019-10-19 13:11:00 +02:00
Paul Chote
c253aaeb9d Replace for(;;) with while (true). 2019-06-08 18:46:03 +02:00
Paul Chote
3e404f6ac2 Remove HSLColor. 2019-03-04 18:26:42 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
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