jassdoc icon indicating copy to clipboard operation
jassdoc copied to clipboard

Reach a conclusion on SetBlight desync

Open Luashine opened this issue 1 year ago • 2 comments

Making an issue to track it formally.

https://www.hiveworkshop.com/threads/setblight-desync-issues.350885/

I haven't seen anyone post about this but thanks to the guys working on W3CE it's been revealed that the SetBlight native has a major problem: it will remove blight (regardless of the value of the addBlight argument) for any player that is holding down the shift key. This can easily cause a desync.

Link to conversation

The solution is to use the other natives, which aren't affected by the shift key: JASS:

native SetBlightRect takes player whichPlayer, rect r, boolean addBlight returns nothing native SetBlightPoint takes player whichPlayer, real x, real y, boolean addBlight returns nothing native SetBlightLoc takes player whichPlayer, location whichLocation, real radius, boolean addBlight returns nothing

Abilities that create blight, such as the Sacrificial Skull and Undead building creation, also don't suffer from the issue.

Luashine avatar Sep 19 '23 22:09 Luashine