Excesive computation using fort_character DamagedEvent

Summary

I track damage dealt and damage taken with my verse code. When the DamageEvent() or DamagedShieldEvent() is being triggered, it will update that amount in my array using PlayerStatsManager.UpdateIntStat().
This gives no issue when you hit somebody with an ar, it will call the Damaged event once for both players. But when you a shotgun which has 12 bullets it creates noticable lag. This seems due to excesive computation. As a result we are unable to track damage deal because a shotgun may cause (12+12 = 24) function calls which creates a hitch.
This bug has been present in our maps since 3 months.

I believe this can be prevented by allowing another way to track damage, right now the only way is using verse. I think the tracker_device should be able to track damage dealt and taken.

Relevant code:


GetData returns a player_stat_table which is pretty big


image

I also tested with a simpler function but the hitch still happens, though it was way less.
image

Please select what you are reporting on:

Unreal Editor for Fortnite

What Type of Bug are you experiencing?

Verse

Steps to Reproduce

  1. Create a code where you listen for Damage event and have a function that does quite some computation.
  2. Damage someone with a shotgun
  3. See a hitch

Expected Result

There is no hitch

Observed Result

When using a shotgun the function is being triggered 24 times. Verse cannot handle this if the function being called is slightly complicated, like doing all sorts of persistence things.

Platform(s)

PC

Island Code

6570-5231-1418

Video

Video (Calling PlayerStatsManager.UpdateIntStat() 2400 times per shotgun shot to intensify the effect I want to display in this bug report)


This is what I mean with intensifying the effect:

Video (How my map is right now, calling UpdateIntStat() once per function call, this gives about a 200ms delay when using the shotgun)

Vouch.

FORT-925939 has been created and its status is ‘Unconfirmed’. This is now in a queue to be reproduced and confirmed.

FORT-925940 has been created and its status is ‘Unconfirmed’. This is now in a queue to be reproduced and confirmed.