From c455c60480691ef3bd970cb48a6335b12a3b840a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 5 Mar 2016 01:23:27 +0100 Subject: [PATCH] - fixed: calculating open.range requires signed math. - fixed: FMultiBlockLinesIterator initialized continueup twice but forgot continuedown. - fixed: One of the debug messages in P_AimLineAttack was missing an if (aimdebug). --- src/p_map.cpp | 3 ++- src/p_maputl.cpp | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index 09a209496..7894e7382 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -3991,7 +3991,8 @@ struct aim_t if (sv_smartaim < 2) { // friends don't aim at friends (except players), at least not first - Printf("Hit friend %s at %f,%f,%f\n", th->GetClass()->TypeName.GetChars(), th->X() / 65536., th->Y() / 65536., th->Z() / 65536.); + if (aimdebug) + Printf("Hit friend %s at %f,%f,%f\n", th->GetClass()->TypeName.GetChars(), th->X() / 65536., th->Y() / 65536., th->Z() / 65536.); SetResult(thing_friend, in->frac, th, thingpitch); } } diff --git a/src/p_maputl.cpp b/src/p_maputl.cpp index c6453285e..ffaa2b4e4 100644 --- a/src/p_maputl.cpp +++ b/src/p_maputl.cpp @@ -265,7 +265,7 @@ void P_LineOpening (FLineOpening &open, AActor *actor, const line_t *linedef, } // avoid overflows in the opening. - open.range = (fixed_t)MIN((QWORD)open.top - open.bottom, FIXED_MAX); + open.range = (fixed_t)MIN((SQWORD)open.top - open.bottom, FIXED_MAX); } @@ -874,7 +874,7 @@ void FMultiBlockLinesIterator::startIteratorForGroup(int group) void FMultiBlockLinesIterator::Reset() { - continueup = continueup = true; + continueup = continuedown = true; index = -1; portalflags = 0; startIteratorForGroup(basegroup);