• 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.

Desync

Status
Not open for further replies.
Level 27
Joined
Apr 3, 2018
Messages
500
My map desyncs but the only places using GetLocalPlayer:

1. change unit transparency
2. change texttag text
3. show/hide multiboards
4. set camera distance, target, etc.
5. create and show a fade filter

Which one of these could it be?

The map triggers are here, they are in cjass (ignore the "character data" folder)
Trigger Viewer | HIVE

Personally I suspect either the multiboards or the fade filters.
 
Last edited:
JASS:
if IAbsBJ(View[GetPlayerId(GetLocalPlayer())].battle_index) != a {text=""}
JASS:
if IAbsBJ(View[GetPlayerId(GetLocalPlayer())].battle_index) == index
{
    CinematicFadeCommonBJ(33, 67, 67, 0.5 * 0.5, "ReplaceableTextures\\CameraMasks\\White_mask.blp", 75, 75)
    FinishCinematicFadeAfterBJ(0.5)
}
Using string literals or concatenations in local blocks has been known to cause desyncs if the string doesn't already exist in the string table.
The function FinishCinematicFadeAfterBJ creates a timer handle, which is obviously very bad.
JASS:
function FinishCinematicFadeAfterBJ takes real duration returns nothing
    // Create a timer to end the cinematic fade.
    set bj_cineFadeFinishTimer = CreateTimer()
    call TimerStart(bj_cineFadeFinishTimer, duration, false, function FinishCinematicFadeBJ)
endfunction
 
Level 27
Joined
Apr 3, 2018
Messages
500
The function FinishCinematicFadeAfterBJ creates a timer handle, which is obviously very bad.
JASS:
function FinishCinematicFadeAfterBJ takes real duration returns nothing
    // Create a timer to end the cinematic fade.
    set bj_cineFadeFinishTimer = CreateTimer()
    call TimerStart(bj_cineFadeFinishTimer, duration, false, function FinishCinematicFadeBJ)
endfunction
Right, this must be it, how did I overlook it?
Thanks!

Not sure about the strings but will put them somewhere in initialization to add to string table, just in case.
 
5. create and show a fade filter
This could be the dangerous point. Have a look at @WaterKnight 's script to use filters properly for one player.
Using string literals or concatenations in local blocks has been known to cause desyncs if the string doesn't already exist in the string table.
I believe same as:
Source? I use local string manipulation extensively in my code, but it never caused any issues.
.. it should be a common tequnique for local usage, so string table seems does not need to be synced. @DracoL1ch made a thread about this topic.
 
Last edited:
Status
Not open for further replies.
Top