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

REBOUND_IMMUNE shot property makes the shot glide along walls. #2811

Open
Loobinex opened this issue Dec 9, 2023 · 0 comments
Open

REBOUND_IMMUNE shot property makes the shot glide along walls. #2811

Loobinex opened this issue Dec 9, 2023 · 0 comments

Comments

@Loobinex
Copy link
Member

Loobinex commented Dec 9, 2023

Giving a shot a REBOUND_IMMUNE causes the following behavior:
https://github.com/dkfans/keeperfx/assets/13840686/83d6cf3d-f814-4e4f-a827-faa17f3f0a39

Observe the arrows glide along the wall instead of hitting it.

I suspect this is caused in the thing_fire_shot function, specifically in this piece of script:

    if (((shotst->model_flags & ShMF_StrengthBased) != 0) && 
       ((shotst->model_flags & ShMF_ReboundImmune) != 0) && (target->class_id != TCls_Door))
    {
      flag1 = true;
      pos1.z.val = pos2.z.val;
    }

At the end of the function, this follows:

      set_flag_byte(&shotng->movement_flags,TMvF_Unknown10,flag1);
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

1 participant