Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missed ranged attacks go wildly astray #18889

Closed
mutability opened this issue Oct 18, 2016 · 3 comments
Closed

Missed ranged attacks go wildly astray #18889

mutability opened this issue Oct 18, 2016 · 3 comments

Comments

@mutability
Copy link
Contributor

It seems that ranged attacks are either exactly on target (right tile) or wildly off target (miss by large angles), there is very little middle ground.

From a quick look, this is pretty suspicious (ranged.cpp, Creature::projectile_attack, in the "missed by at least one tile" path):

        // Cap spread at 30 degrees or it gets wild quickly
        double spread = std::min( dispersion / ARCMIN( 1 ), DEGREES( 30 ) );

This should be ARCMIN( dispersion ) not dispersion / ARCMIN( 1 ) if I'm reading the unit conversions right? dispersion is measured directly in arc-minutes AFAICS.

@mutability
Copy link
Contributor Author

I think this originally got broken in c77a51f

@mutability
Copy link
Contributor Author

Here's an example of firing around 100 arrows from a longbow (dispersion 210, precise shots) at a stationary turret - green = are the missed arrows.
spray-arrows

210 arcminutes of dispersion should have them clustered within about 7 degrees (2 std dev), but clearly it's much more than that.

@mutability
Copy link
Contributor Author

Same thing with the code changed as above:
arrows2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant