From cc2885c2ded8afc906b79a7feab2f89e864f804a Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 7 Mar 2016 22:05:19 +0100 Subject: [PATCH] - fixed int/fixed_t mixup with P_RadiusAttack's 'bombdistance' parameter. (Why is this thing even an int...?) --- src/p_map.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/p_map.cpp b/src/p_map.cpp index e4830c68fd..e3ab370d00 100644 --- a/src/p_map.cpp +++ b/src/p_map.cpp @@ -5245,12 +5245,13 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo if (bombdistance <= 0) return; fulldamagedistance = clamp(fulldamagedistance, 0, bombdistance - 1); + fixed_t bombdistfix = bombdistance << FRACBITS; double bombdistancefloat = 1.f / (double)(bombdistance - fulldamagedistance); double bombdamagefloat = (double)bombdamage; FPortalGroupArray grouplist; - FMultiBlockThingsIterator it(grouplist, bombspot->X(), bombspot->Y(), bombspot->Z() - (bombdistance<height + ((bombdistance*2)<X(), bombspot->Y(), bombspot->Z() - bombdistfix, bombspot->height + bombdistfix*2, bombdistfix); FMultiBlockThingsIterator::CheckResult cres; if (flags & RADF_SOURCEISSPOT)