HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Functions that makes desynch in the replay

10-02-2008, 12:36 PM#1
popp
Hi everyone, does anyone knows if there are some functions that makes the replay desynch.
I mean if i play a game with my map, when i look at the replay it's a completely different game :s
Does anyone has an idea ?
10-02-2008, 12:44 PM#2
Captain Griffen
Anything that creates handles I think; any randomisation functions. Loads of stuff.
10-02-2008, 12:46 PM#3
popp
could you be more precise please ?
10-02-2008, 12:56 PM#4
Captain Griffen
Not really. Mainly (if not all, possibly a few less stuff actually) it's stuff that'd cause a desync online.
10-02-2008, 02:47 PM#5
Tide-Arc Ephemera
As far as I know, this isn't possible... due to the fact replays end when someone gets desynchronised and all.
10-02-2008, 03:20 PM#6
Troll-Brain
All functions with GetLocalPlayer are fucked up.
Because GetLocalPlayer returns the first human player full slot in a replay.
10-02-2008, 03:52 PM#7
popp
i know about the local player problem :)
but even if i turn off all stuffs linked to that it makes a desynch :'(
10-02-2008, 03:56 PM#8
Troll-Brain
Many gui functions use GetLocalPlayer as well.
10-02-2008, 03:59 PM#9
popp
examples
10-02-2008, 04:05 PM#10
Troll-Brain
Use Jasscraft to check every ones.

An example :

Collapse JASS:
function DisplayTextToForce takes force toForce, string message returns nothing
    if (IsPlayerInForce(GetLocalPlayer(), toForce)) then
        // Use only local code (no net traffic) within this block to avoid desyncs.
        call DisplayTextToPlayer(GetLocalPlayer(), 0, 0, message)
    endif
endfunction

In general if a function use a player or a force.
10-02-2008, 04:13 PM#11
popp
i check for GetLocalPlayer in the .j of my map, all triggers using it are disabled and the replay still desynch :s
10-02-2008, 04:25 PM#12
Tide-Arc Ephemera
It would help if you provided some information on how they're asynchronous.
10-02-2008, 04:37 PM#13
popp
it's really strange.
I do 2 games, the same start.
but i will play more in the second than in the first one.
at the beggining i order a unit to build few buildings. 5 for example.
if i leave the game and go watch replay now it will not desynch.
but if i do the same stuff and play more longer after it will desynch in replay, the unit will never build the 3rd building and after it's a completely different game :) :(
10-02-2008, 07:35 PM#14
Joker
Why do you care about the replay anyway?
10-02-2008, 08:03 PM#15
Captain Griffen
Replays do sometimes randomly desync, non-deterministically. Hmm...come to think of it, that could be when GetLocalPlayer changes during the replay (which it does, buggy).