Attributes not correctly synced / Damage counted double on remote client

ChristianWiele

Active member
Hi,

attributes like health and shield are not correctly synced over the network. You can see this in the demo scene. Run the master in the build, and the client in the editor. If you shoot at the master player from the client just once, you will see that on the master the shield will go down from 50 to 30, but on the client (editor) the shield will go down to 10. Similar for the health. So damage is counted double on the remote client.

Regards, Christian
 

ChristianWiele

Active member
I am using the Deathmatch AI with PUN and this relies on the health attribute for selecting a target. What I have not understood is that the PunHealthMonitor syncs the damage, but on the client it is applied twice for some reason. So I only need to get rid of the double damage.
 

ChristianWiele

Active member
I found the issue. The shootable weapon syncs the damage through the ShootableHitscanDamageRPC of the PunCharacter, and in addition the PunHealthMonitor sends the same damage amount to the remote clients triggered by the OnDamage. This is why the damage is counted twice.

For the other weapon types the damage is only synced by the PunHealthMonitor.
 
Top