Skip to content

Commit

Permalink
Apply z thrust in PIT_RadiusAttack
Browse files Browse the repository at this point in the history
  • Loading branch information
kraflab committed Jan 14, 2024
1 parent 2d88753 commit 14d9944
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions prboom2/src/p_map.c
Original file line number Diff line number Diff line change
Expand Up @@ -2822,6 +2822,21 @@ dboolean PIT_RadiusAttack (mobj_t* thing)
}

P_DamageMobj (thing, bombspot, bombsource, damage);

if (map_format.zdoom)
{
fixed_t thrust;
fixed_t direction;

thrust = damage * (FRACUNIT >> 3) * g_thrust_factor / thing->info->mass;
direction = thing->z + thing->height / 2 - bombspot->z;

thrust = direction > 0 ? thrust :
direction < 0 ? -thrust :
0;

thing->momz += thrust;
}
}

return true;
Expand Down

0 comments on commit 14d9944

Please sign in to comment.