- fixed int/fixed_t mixup with P_RadiusAttack's 'bombdistance' parameter. (Why is this thing even an int...?)

This commit is contained in:
Christoph Oelckers 2016-03-07 22:05:19 +01:00
parent 3c25b2c066
commit cc2885c2de

View file

@ -5245,12 +5245,13 @@ void P_RadiusAttack(AActor *bombspot, AActor *bombsource, int bombdamage, int bo
if (bombdistance <= 0)
return;
fulldamagedistance = clamp<int>(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<<FRACBITS), bombspot->height + ((bombdistance*2)<<FRACBITS), bombdistance);
FMultiBlockThingsIterator it(grouplist, bombspot->X(), bombspot->Y(), bombspot->Z() - bombdistfix, bombspot->height + bombdistfix*2, bombdistfix);
FMultiBlockThingsIterator::CheckResult cres;
if (flags & RADF_SOURCEISSPOT)