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

Shots with speeds over 255 aim too high #3154

Open
ErminioLucente opened this issue Apr 18, 2024 · 1 comment
Open

Shots with speeds over 255 aim too high #3154

ErminioLucente opened this issue Apr 18, 2024 · 1 comment

Comments

@ErminioLucente
Copy link

ErminioLucente commented Apr 18, 2024

Any projectile with speeds set above 256, warps their trajectory. Any angle that is not facing perfectly cardinal and the projectile veers off course from the center. see video example, its more extreme when looking up and down...

2024-04-02_03-50-43-1.mp4
@ErminioLucente ErminioLucente changed the title projectile trajectory projectile trajectory (Issue) Apr 18, 2024
@Loobinex Loobinex changed the title projectile trajectory (Issue) Shots with speeds over 255 aim too high Apr 20, 2024
@Loobinex
Copy link
Member

I looked into it a bit.

In thing_fire_shot the code is using the shot speed in this seemingly unrelated function:

        angles_to_vector(shotng->move_angle_xy, shotng->move_angle_z, speed, &cvect);
        shotng->veloc_push_add.x.val += cvect.x;
        shotng->veloc_push_add.y.val += cvect.y;
        shotng->veloc_push_add.z.val += cvect.z;

In angles_to_vector it does set vertical momentum too, which I have not bothered to figure out. It seems likely though that it assumes a max speed of 255.

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

No branches or pull requests

2 participants