- Fixed: If a damaged actor has negative mass, it needs to have its damage
thrust set to maximum instead of 0. See Action Doom's broken glass "CommanderKeens". SVN r1816 (trunk)
This commit is contained in:
parent
e6174f5259
commit
38780d2d2a
2 changed files with 10 additions and 1 deletions
|
|
@ -1047,7 +1047,13 @@ void P_DamageMobj (AActor *target, AActor *inflictor, AActor *source, int damage
|
|||
|
||||
// Calculate this as float to avoid overflows so that the
|
||||
// clamping that had to be done here can be removed.
|
||||
double fltthrust = clamp((damage * 0.125 * kickback) / target->Mass, 0.,mod == NAME_MDK? 10. : 32.);
|
||||
double fltthrust;
|
||||
|
||||
fltthrust = mod == NAME_MDK ? 10 : 32;
|
||||
if (target->Mass > 0)
|
||||
{
|
||||
fltthrust = clamp((damage * 0.125 * kickback) / target->Mass, 0., fltthrust);
|
||||
}
|
||||
|
||||
thrust = FLOAT2FIXED(fltthrust);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue