Refactor SWWMHandler profiling routines.
This commit is contained in:
parent
ba6a01a190
commit
f6b891c9fe
7 changed files with 104 additions and 74 deletions
|
|
@ -390,12 +390,12 @@ extend Class SWWMHandler
|
|||
|
||||
override void WorldThingDamaged( WorldEvent e )
|
||||
{
|
||||
if ( profiling ) curms = MSTime();
|
||||
if ( profiling ) ProfileTick();
|
||||
if ( e.Damage > 0 ) DoDamageHandling(e);
|
||||
if ( e.DamageSource && (e.DamageSource != e.Thing) ) DoCombatHit(e);
|
||||
if ( (e.Thing.Health > 0) || e.Thing.bKilled || e.Thing.bCorpse )
|
||||
{
|
||||
if ( profiling ) worldthingdamaged_ms += MSTime()-curms;
|
||||
if ( profiling ) ProfileTock(PT_WORLDTHINGDAMAGED);
|
||||
return;
|
||||
}
|
||||
DoGibThing(e);
|
||||
|
|
@ -406,10 +406,10 @@ extend Class SWWMHandler
|
|||
e.DamageSource.DamageMobj(null,null,Actor.TELEFRAG_DAMAGE,'EndLevel');
|
||||
if ( !e.Thing.player && !e.Thing.bIsMonster && !e.Thing.bCountKill && !(e.Thing is 'ScriptedMarine') )
|
||||
{
|
||||
if ( profiling ) worldthingdamaged_ms += MSTime()-curms;
|
||||
if ( profiling ) ProfileTock(PT_WORLDTHINGDAMAGED);
|
||||
return;
|
||||
}
|
||||
DoKillScoring(e);
|
||||
if ( profiling ) worldthingdamaged_ms += MSTime()-curms;
|
||||
if ( profiling ) ProfileTock(PT_WORLDTHINGDAMAGED);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue