Fix P_RadiusAttack dist depending on damage (#1099)

Fix variable "dist" in P_RadiusAttack depending on damage (like vanilla Doom), which causes attack radius to actually depend on damage. Now depends on distance arg (like dsda-doom).
This commit is contained in:
tomas7770 2023-06-12 07:48:41 +01:00 committed by GitHub
parent cdb9a57545
commit 51274c1c83
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1839,7 +1839,7 @@ boolean PIT_RadiusAttack(mobj_t *thing)
void P_RadiusAttack(mobj_t *spot, mobj_t *source, int damage, int distance)
{
fixed_t dist = (damage+MAXRADIUS)<<FRACBITS;
fixed_t dist = (distance+MAXRADIUS)<<FRACBITS;
int yh = (spot->y + dist - bmaporgy)>>MAPBLOCKSHIFT;
int yl = (spot->y - dist - bmaporgy)>>MAPBLOCKSHIFT;
int xh = (spot->x + dist - bmaporgx)>>MAPBLOCKSHIFT;