diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 44cdd46e6..b68ea7e7e 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ March 15, 2008 +- Fixed: The only time bestslideline is ever NULL is before it ever gets set. + That means my P_BounceWall() from March 6 wasn't really correct. - Fixed: If an object is flagged for euthanization while it's in the gray list, it should just be ignored during the propagation stage. - After sleeping on it and realizing what was really going in, I generalized diff --git a/src/p_map.cpp b/src/p_map.cpp index e35fe0740..3fbf855a9 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2449,7 +2449,7 @@ bool P_BounceWall (AActor *mo) leady = mo->y-mo->radius; } bestslidefrac = FRACUNIT+1; - bestslideline = NULL; + bestslideline = BlockingLine; if (P_PathTraverse(leadx, leady, leadx+mo->momx, leady+mo->momy, PT_ADDLINES, PTR_BounceTraverse) && BlockingLine == NULL) { // Could not find a wall, so bounce off the floor/ceiling instead. @@ -2466,7 +2466,7 @@ bool P_BounceWall (AActor *mo) return true; } } - line = bestslideline ? bestslideline : BlockingLine; + line = bestslideline; if (line->special == Line_Horizon) {