Skip to content

Commit

Permalink
Fixed (All games): "Incorrect blast damage calculation". (see here ht…
Browse files Browse the repository at this point in the history
  • Loading branch information
danij-deng committed Mar 2, 2010
1 parent db16391 commit a76713f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doomsday/plugins/common/src/p_map.c
Expand Up @@ -2096,7 +2096,7 @@ void P_LineAttack(mobj_t* t1, angle_t angle, float distance, float slope,
*/
boolean PIT_RadiusAttack(mobj_t* thing, void* data)
{
float dx, dy, dz, dist;
float dx, dy, dz, dist;

if(!(thing->flags & MF_SHOOTABLE))
return true;
Expand All @@ -2122,7 +2122,7 @@ boolean PIT_RadiusAttack(mobj_t* thing, void* data)

dx = fabs(thing->pos[VX] - bombSpot->pos[VX]);
dy = fabs(thing->pos[VY] - bombSpot->pos[VY]);
dz = fabs(thing->pos[VZ] - bombSpot->pos[VZ]);
dz = fabs((thing->pos[VZ] + thing->height / 2) - bombSpot->pos[VZ]);

dist = (dx > dy? dx : dy);

Expand All @@ -2145,7 +2145,7 @@ boolean PIT_RadiusAttack(mobj_t* thing, void* data)
// Must be in direct path.
if(P_CheckSight(thing, bombSpot))
{
int damage;
int damage;

damage = (bombDamage * (bombDistance - dist) / bombDistance) + 1;
#if __JHEXEN__
Expand Down

0 comments on commit a76713f

Please sign in to comment.