APDevTeam / Movecraft-Combat

Movecraft Combat Addon
GNU General Public License v3.0
7 stars 17 forks source link

Improved Contact Explosives #76

Closed drfiveminusmint closed 3 years ago

drfiveminusmint commented 3 years ago

The contact explosives system was designed to prevent ships with completely flat sides from becoming dominant, but with the advent of cannon directors we have seen a similar thing crop back up. This PR makes some slight improvements to the contact explosive code as well as making the sensitivity configurable.

drfiveminusmint commented 3 years ago

As a brief side note, the default Contact Explosives sensitivity has been left unchanged, but I would personally recommend values in the range of 2.0 for most servers.

drfiveminusmint commented 3 years ago

Looks good, just needs some documentation.

Do you have a simple test setup to verify this is functioning?

An example test setup would be to fire a cannon at a wall that is parallel to its flight path and a certain distance to the side, like so. 2021-07-06_17 21 15

At higher values (like the default of 10) it should almost always slide down the side, whereas at a value of, say, 2, it should detonate at sharper angles.

TylerS1066 commented 3 years ago

Compiled this, installed it on my testing server, immediately set the ratio to 1.0, and watched as everything had problems....

Once the ID10T error was resolved, this works great! Once switched over to a 2.0 ratio it promptly exploded on a sliding wall like shown.