From a5004f882742d5eb0519d113a21e0778850cc42c Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Fri, 7 Mar 2008 01:29:26 +0000 Subject: [PATCH] - Fixed: If P_BounceWall() can't find a wall when it does its trace, but it was entered because a line blocked the projectile, then it should still use that blocking line for the bounce. SVN r788 (trunk) --- docs/rh-log.txt | 3 +++ src/p_map.cpp | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 804d301d3f..62326c52db 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,7 @@ March 6, 2008 +- Fixed: If P_BounceWall() can't find a wall when it does its trace, but it + was entered because a line blocked the projectile, then it should still use + that blocking line for the bounce. - The full master volume SysEx is now always sent to the MIDI device, even if it seems to have a working volume control. - Renamed music_midi_stream.cpp to music_midi_base.cpp. diff --git a/src/p_map.cpp b/src/p_map.cpp index d1d9d1f35d..f132a9c1ef 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -2449,7 +2449,7 @@ bool P_BounceWall (AActor *mo) } bestslidefrac = FRACUNIT+1; if (P_PathTraverse(leadx, leady, leadx+mo->momx, leady+mo->momy, - PT_ADDLINES, PTR_BounceTraverse)) + PT_ADDLINES, PTR_BounceTraverse) && BlockingLine == NULL) { // Could not find a wall, so bounce off the floor/ceiling instead. fixed_t floordist = mo->z - mo->floorz; fixed_t ceildist = mo->ceilingz - mo->z; @@ -2470,7 +2470,7 @@ bool P_BounceWall (AActor *mo) } */ } - line = bestslideline; + line = bestslideline ? bestslideline : BlockingLine; if (line->special == Line_Horizon) {