• Check out the results of the Techtree Contest #19!
  • Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.
  • Create a void inspired texture for Warcraft 3 and enter Hive's 34th Texturing Contest: Void! Click here to enter!
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!

SetBlight Desync Issues

Status
Not open for further replies.
Level 5
Joined
Jan 5, 2017
Messages
9
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.
 
Interesting. Has this always been there or just in recent patches?
Do you fancy writing a PR for my jassdoc as i'm not really into discord. Also i cannot recreate this in singleplayer so mp only effect?
 
Can neither reconstruct it in singleplayer nor multiplayer using SetBlight(Player(0), 0, 0, 512, true).

But in the World Editor, in the terrain editor, you can invert the effect of placing Blight, placing Boundary or removing Boundary by holding left or right shift (regardless of capslock).

Also with SetTerrainType(0, 0, 'NOTH', 0, 3, 0), you can place boundary or remove boundary when holding left or right shift (regardless of capslock) ingame both in singleplayer and multiplayer, but it's only a graphical overlay without changes to pathing.
 
The SetBlight comment was mistaken, the discussion evolved into why the SHIFT check is there. I tested SetBlight in 1.27 and 1.36. NOT AFFECTED BY SHIFT.
Instead SetTerrainType(0, 0, FourCC('NOTH'), 0,5,1) is affected by the SHIFT key. Water explained above.

Detailed explanation in jassdoc issue
PS: It'd be great if you removed the desync tag and changed the title @SwissDerd
 
Status
Not open for further replies.
Back
Top