Skip to content

Commit

Permalink
- Exhumed: Clean up push factor in runlist_CheckRadialDamage() for …
Browse files Browse the repository at this point in the history
…players.

* Some fudging was added due to issues that have now been properly resolved in `40265e649f924b6da1594bdc9e56cb6b25d55154`.
  • Loading branch information
mjr4077au committed Nov 6, 2023
1 parent 3066df5 commit 63f510f
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions source/games/exhumed/src/runlist.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#include "sound.h"
#include <assert.h>

CVARD(Bool, cl_exdamagepush, false, CVAR_ARCHIVE, "enables player damage pushback from explosions, etc.")

BEGIN_PS_NS

enum
Expand Down Expand Up @@ -1776,22 +1774,13 @@ int runlist_CheckRadialDamage(DExhumedActor* pActor)
{
if ((nPush = max((nRadialDamage * (nDamageRadius - nDist)) / nDamageRadius, 0.)) > 20)
{
const auto nVel = DVector3(pos.Angle().ToVector(), -24 * (1. / 256.)) * nPush;
pActor->vel.Z += nVel.Z;
pActor->vel += DVector3(pos.Angle().ToVector() * 0.125, -24 * (1. / 256.)) * nPush;

if (pActor->vel.Z < -14)
pActor->vel.Z = -14;

if (pActor->spr.statnum == 100)
{
// The player's max vel is 15.25 for reference.
pActor->vel.XY() += nVel.XY() * 0.1875 * cl_exdamagepush;
getPlayer(GetPlayerFromActor(pActor))->bJumping = true;
}
else
{
pActor->vel.XY() += nVel.XY() * 0.125;
}
}
}

Expand Down

0 comments on commit 63f510f

Please sign in to comment.