mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-22 12:11:25 +00:00
- 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
|
@ -1,4 +1,7 @@
|
|||
September 10, 2009
|
||||
- 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".
|
||||
- Changed the SCROLLTYPE define so that any extra bits set cause it to default
|
||||
to 7. This effects action.wad, MAP02, lines 12054 and 12059, which had them
|
||||
at 128, so they no longer scrolled in r832+.
|
||||
|
|
|
@ -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…
Reference in a new issue