Skip to content
Snippets Groups Projects

Fix #1025 and some P_PathTraverse bugs

Merged Fix #1025 and some P_PathTraverse bugs
1 unresolved thread
Merged MIDIMan requested to merge MIDIMan/SRB2:fix-blockmap-bugs into next
1 unresolved thread

This MR is a standalone version of the blockmap fixes from !2389:

  • Fixes #1025 (closed) by adding a new argument to P_BlockThingsIterator that takes an mobj_t and checks for it, instead of just checking for tmthing.
  • Fixes a few bugs with P_PathTraverse:
    • Ports over a couple of fixes regarding path traversal from ZDoom (traversing through blockmap corners, etc.).
    • Fixes incorrect calculation(s) of partial (now partialx and partialy), xstep, ystep, xintercept, and yintercept.
    • Path traversals can now go beyond a map's blockmap limit, granted they stay within the hardcoded limit of 65536x65536.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
1469 1473 trace.y = py1;
1470 1474 trace.dx = px2 - px1;
1471 1475 trace.dy = py2 - py1;
1472
1473 px1 -= bmaporgx;
1474 py1 -= bmaporgy;
1475 xt1 = (unsigned)px1>>MAPBLOCKSHIFT;
1476 yt1 = (unsigned)py1>>MAPBLOCKSHIFT;
1477
1478 px2 -= bmaporgx;
1479 py2 -= bmaporgy;
1480 xt2 = (unsigned)px2>>MAPBLOCKSHIFT;
1481 yt2 = (unsigned)py2>>MAPBLOCKSHIFT;
1476
1477 xt1 = px1>>MAPBLOCKSHIFT;
1478 yt1 = py2>>MAPBLOCKSHIFT;
  • Author Contributor

    I messed up here. The line is supposed to bit shift py1 instead of py2. This fix has already been applied to !2389, but I can make a new MR for it if necessary.

  • Please register or sign in to reply
Please register or sign in to reply
Loading