mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-27 22:42:22 +00:00
- Blood: fixed bad damage scaling in ConcussSprite
This uses the square of the distance, so the factor between Build's Q28.4 format and floats is not 16, but 16*16 = 256.
This commit is contained in:
parent
307276a276
commit
7554808104
1 changed files with 2 additions and 3 deletions
|
@ -2544,9 +2544,8 @@ void actInit(TArray<DBloodActor*>& actors)
|
|||
static void ConcussSprite(DBloodActor* source, DBloodActor* actor, const DVector3& pos, double damage)
|
||||
{
|
||||
auto vect = actor->spr.pos - pos;
|
||||
|
||||
double dist2 = vect.LengthSquared() + 0x4000;
|
||||
damage *= 0x4000 / dist2;
|
||||
double dist2 = vect.LengthSquared() + 0x400;
|
||||
damage *= 0x400 / dist2;
|
||||
|
||||
if (actor->spr.flags & kPhysMove)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue