From 424c6e8963187392ac3c937d08514d15f25c0d00 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 17 Nov 2009 23:09:21 +0000 Subject: [PATCH] - fixed: P_NowayTraverse was called with a trace distance of 128 instead of the 64 that should have been used. SVN r1986 (trunk) --- docs/rh-log.txt | 2 ++ src/p_map.cpp | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/rh-log.txt b/docs/rh-log.txt index 453bdf4d9..48abfcc2c 100644 --- a/docs/rh-log.txt +++ b/docs/rh-log.txt @@ -1,4 +1,6 @@ November 17, 2009 (Changes by Graf Zahl) +- fixed: P_NowayTraverse was called with a trace distance of 128 instead of + the 64 that should have been used. - fixed: R_PointToAngle could overflow with very long vectors passed to it. This caused rendering bugs on some maps. (Interestingly the only other port having a safeguard for this in place was PrBoom.) diff --git a/src/p_map.cpp b/src/p_map.cpp index 4a5f91e50..d95d81d4b 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -4046,12 +4046,16 @@ bool P_NoWayTraverse (AActor *usething, fixed_t endx, fixed_t endy) void P_UseLines (player_t *player) { angle_t angle; + fixed_t x1, y1; fixed_t x2, y2; bool foundline; foundline = false; angle = player->mo->angle >> ANGLETOFINESHIFT; + x1 = player->mo->x + (USERANGE>>FRACBITS)*finecosine[angle]; + y1 = player->mo->y + (USERANGE>>FRACBITS)*finesine[angle]; + x2 = player->mo->x + (USERANGE>>FRACBITS)*finecosine[angle]*2; y2 = player->mo->y + (USERANGE>>FRACBITS)*finesine[angle]*2; @@ -4067,7 +4071,7 @@ void P_UseLines (player_t *player) int spac = SECSPAC_Use; if (foundline) spac |= SECSPAC_UseWall; if ((!sec->SecActTarget || !sec->SecActTarget->TriggerAction (player->mo, spac)) && - P_NoWayTraverse (player->mo, x2, y2)) + P_NoWayTraverse (player->mo, x1, y1)) { S_Sound (player->mo, CHAN_VOICE, "*usefail", 1, ATTN_IDLE); }