Don't track fall damage if monster fall damage is disabled.
This commit is contained in:
parent
632c99b21c
commit
591e9dcf28
3 changed files with 33 additions and 5 deletions
|
|
@ -85,8 +85,9 @@ extend Class SWWMHandler
|
|||
}
|
||||
}
|
||||
if ( !e.DamageSource || !e.DamageSource.player ) return;
|
||||
// fall dmg
|
||||
SWWMWhoPushedMe.SetInstigator(e.Thing,e.DamageSource);
|
||||
// fall dmg tracking
|
||||
if ( !e.Thing.player && (e.Thing.bFALLDAMAGE || level.monsterfallingdamage) )
|
||||
SWWMWhoPushedMe.SetInstigator(e.Thing,e.DamageSource);
|
||||
dealtdamage[e.DamageSource.PlayerNumber()] = true;
|
||||
let s = SWWMStats.Find(e.DamageSource.player);
|
||||
if ( s ) // deathmatch telefrag-on-spawn may cause this to be null
|
||||
|
|
@ -151,7 +152,10 @@ extend Class SWWMHandler
|
|||
// fall damage tracking hack
|
||||
let src = e.DamageSource;
|
||||
if ( (e.DamageType == 'Falling') && !e.DamageSource )
|
||||
src = SWWMWhoPushedMe.RecallInstigator(e.Thing);
|
||||
{
|
||||
let inst = SWWMWhoPushedMe.RecallInstigator(e.Thing);
|
||||
if ( inst ) src = inst;
|
||||
}
|
||||
if ( (!src || !src.player || (src == e.Thing)) ) return;
|
||||
let inflictor = e.Inflictor;
|
||||
if ( inflictor is 'SWWMPuff' ) inflictor = inflictor.master;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue