Possibly unwanted side-effects of cancelling "weaponDamageEvent"

While developing I have found that cancelling “weaponDamageEvent” will lead to possibly unwanted results:

  • When client-1’s events of damagin client-2 are blocked frequently, client-2 will appear dead for (only) client-1. If client-2 becomes damageable for client-1 afterwards, shots at the corpse will damage client-2. Additionally, client-2 which seems dead to client-1 can still damage him.

I have made a little video which shows both perspectives and explains the process better:

My suggestion would be (if possible) to “resync” client-1 by sending information that the damage event was cancelled.

1 Like

Any info on this?
Is this intended or fixable?

This is ‘intended’ game code behavior, and ‘fixable’ depends on your use case. The game will generally assume that any entity not marked as ‘unable to be damaged’ will have damage accepted by the remote side, but this may be mitigateable by, say, having the server synthesize a damage reply, assuming that will arrive fast enough for the game to not go ‘eh, whatever’.

1 Like

How do you recommend to fix this for a use case of just not wanting a certain weapon to do damage to actual players but only entities.