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

Make Cannon respect srcPos on HaveFreeLineOfFire. #1852

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

saurtron
Copy link
Collaborator

@saurtron saurtron commented Dec 25, 2024

Work done

  • Make Cannon respect srcPos on HaveFreeLineOfFire.

Details

I think all other weapons do this.

Looks safe since the only in-engine user is HaveFreeLineOfFire(GetAimFromPos(preFire), tgtPos, trg) at TryTarget. And GetAimFromPos for cannon is hardcoded to use weaponMuzzlePos anyways. (see Cannon.h).

Could break lua api users (GetUnitWeaponHaveFreeLineOfFire) but I think those seem fine too (actually the fix is for them) since also using GetAimFromPos unless user wants a different srcPos.

Marking as "lua api" since afaics this only affects Spring.GetUnitWeaponHaveFreeLineOfFire.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Lua API
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant