From 3c6c60c730293b0c8b25317b788c2653df80fbb0 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Sun, 16 Mar 2008 01:32:54 +0000 Subject: [PATCH] - Fixed: The only time bestslideline is ever NULL is before it ever gets set. That means my P_BounceWall() "fix" from March 6 wasn't really a working fix. SVN r807 (trunk) --- docs/rh-log.txt | 2 ++ src/p_map.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 44cdd46e69..b68ea7e7eb 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 e35fe0740c..3fbf855a95 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) {