Healthbar / Damnum backport from sidemods.

This commit is contained in:
Mari the Deer 2022-08-22 17:36:57 +02:00
commit b40d8d0633
1743 changed files with 683 additions and 869 deletions

View file

@ -63,7 +63,15 @@ extend Class SWWMHandler
// damage numbers, combat tracking, etc.
private void DoDamageHandling( WorldEvent e )
{
SWWMScoreObj.SpawnFromHandler(self,-e.Damage,e.Thing.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+e.Thing.Height/2),ST_Damage);
SWWMDamNum.SpawnFromHandler(self,e.Damage,e.Thing.Vec3Offset(FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8),FRandom[ScoreBits](-8,8)+e.Thing.Height/2),e.DamageType);
// combat tracker updates if either an ally of the player is hit, or an ally hit this enemy
// (this automatically also does the same for the player itself, of course)
for ( int i=0; i<MAXPLAYERS; i++ )
{
if ( !playeringame[i] || !players[i].mo ) continue;
if ( players[i].mo.IsFriend(e.Thing) || (e.DamageSource && players[i].mo.IsFriend(e.DamageSource)) )
SWWMQuickCombatTracker.Update(self,players[i],e.Thing,e.Damage);
}
// stats
if ( e.Thing.player )
{