UFO: Alien Invasion Issue Tracker
UFO: Alien Invasion
Go to the previous open issue
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
icon_project.png UFO: Alien Invasion / Closed Submit Patch #4520 Stairway problem, part two
Go to the next issue (open or closed)
Go to the next open issue
This issue has been closed with status "Closed" and resolution "Not determined".
Issue basics
  • Type of issue
    Submit Patch
  • Category
    General
  • Targetted for
    Not determined
  • Status
    Closed
  • Priority
    3. Normal
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
Attachments (0)
There is nothing attached to this issue
Duplicate issues (0)
This issue does not have any duplicates
Description
[http://sourceforge.net/p/ufoai/patches/393 Item 393] imported from sourceforge.net tracker on 2013-01-28 20:34:58


By UFO standards, the floor in a standard building is 4 mapunits high and the ceiling is at 64, but already belongs to the level above. So when calculating in QUANTs (as routing does) one would expect the floor at 1 and the ceiling at 16, leaving an opening of 15.

But the results from RT_CheckCell are 2 and 15, leaving an opening of 13. Usually no problem, because a standing actor is 11 QUANTs high. But when it comes down to standard stairways in buildings, the first square of the stairs is considered 6 high, leaving an opening of only 9. So pathfinding forces us to crouch.

RT_CheckCell strictly rounds up the floor and the ceiling down. That is perfectly fine if there is a small obstacle with a height of 2-3 mapunits.
But the boxtrace stops DIST_EPSILON before the surface it detects, calculating the floor as 4.03125. So we lose 2 QUANTs because of some 0.063 mapunits (which aren't even really there btw).

The patch makes sure that we don't round just for DIST_EPSILON reasons.
===== Comments Ported from Sourceforge =====

====== aduke1 (2009-01-03 17:19:32) ======


====== tlh2000 (2009-01-03 22:28:32) ======

commited to trunk in r21500 - assigned to mike and not closed until he reviewed it. thanks for the patch.

====== wilminator (2009-01-03 23:37:46) ======

This works and is on track- I'm giving my blessing and closing this item. I will repost to stair related bugs for now, but expect to need to work on the stair issue some more.
Todos (0 / 0)
Issue created
footer_logo.png The Bug Genie 4.3.1 | Support | Feedback spinning_16.gif