- fixed: When trying to calculate the damage for a blasted actor hitting another one, the velocity checks used the signed values, causing totally random damaging effects depending on the direction the objects were moving. This bug had been present in the original Hexen source as well.

This commit is contained in:
Christoph Oelckers 2016-11-27 16:22:23 +01:00
parent 6417c1a7a3
commit 2e99681ced

View file

@ -1256,7 +1256,7 @@ bool PIT_CheckThing(FMultiBlockThingsIterator &it, FMultiBlockThingsIterator::Ch
{
// ideally this should take the mass factor into account
thing->Vel += tm.thing->Vel.XY();
if ((thing->Vel.X + thing->Vel.Y) > 3.)
if (fabs(thing->Vel.X) + fabs(thing->Vel.Y) > 3.)
{
int newdam;
damage = (tm.thing->Mass / 100) + 1;