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

Comments

Projects
None yet
1 participant
@mutability
Copy link
Contributor

commented Oct 18, 2016

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

This comment has been minimized.

Copy link
Contributor Author

commented Oct 18, 2016

I think this originally got broken in c77a51f

@mutability

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2016

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

This comment has been minimized.

Copy link
Contributor Author

commented Oct 19, 2016

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
You can’t perform that action at this time.