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

map::find_clear_path returns invalid trajectory for some 3D cases #39693

Closed
olanti-p opened this issue Apr 18, 2020 · 4 comments · Fixed by #41470
Closed

map::find_clear_path returns invalid trajectory for some 3D cases #39693

olanti-p opened this issue Apr 18, 2020 · 4 comments · Fixed by #41470
Labels
<Bug> This needs to be fixed

Comments

@olanti-p
Copy link
Contributor

olanti-p commented Apr 18, 2020

Describe the bug

When 3D FOV enabled, map::find_clear_path returns weird values when abs(dx) == dz or abs(dy) == dz

Steps To Reproduce

  1. Move into a clear field
  2. Run the improvised tests: map_fcp_bug.cpp
  3. None of them fail, but 7 should

Expected behavior

map::find_clear_path returns a valid trajectory

Versions and configuration

  • OS: Linux
    • OS Version: Description: Ubuntu 19.10; Release: 19.10; Codename: eoan;
  • Game Version: f94cfe1 [64-bit]
  • Graphics Version: Tiles
  • Game Language: English [en]
  • Mods loaded: [
    Dark Days Ahead [dda],
    Disable NPC Needs [no_npc_food],
    Magiclysm [magiclysm]
    ]

Additional context

I'm not familiar with CDDA's tests, but there doesn't seem to be any for map::find_clear_path.

@olanti-p olanti-p changed the title A bug in map::find_clear_path map::find_clear_path returns invalid trajectory for some 3D cases Apr 18, 2020
@stale
Copy link

stale bot commented May 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label May 19, 2020
@kevingranade
Copy link
Member

Should be fixed by #38730

@olanti-p
Copy link
Contributor Author

olanti-p commented May 20, 2020

Nope, still happens on current master. You can see it while aiming: the code basically calls g->m.find_clear_path(g->u.pos, dst) (where dst is cursor position) and draws returned trajectory. Try aiming 10 tiles north, 2 tiles west and 2 levels up - the trajectory shrinks to "2 tiles north, 2 tiles west, 2 levels up"

Could be related to / a dupe of #13601 btw

@kevingranade kevingranade reopened this May 20, 2020
@stale stale bot removed the stale Closed for lack of activity, but still valid. label May 20, 2020
@stale
Copy link

stale bot commented Jun 19, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not 'bump' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

@stale stale bot added the stale Closed for lack of activity, but still valid. label Jun 19, 2020
@kevingranade kevingranade added the <Bug> This needs to be fixed label Jun 20, 2020
@stale stale bot removed the stale Closed for lack of activity, but still valid. label Jun 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bug> This needs to be fixed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants