HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Desyncs/splits.. reasons?

08-07-2006, 09:44 PM#1
vile
I have issues with netsplits after some duration on my map.

I have several GetLocalPlayer conditions on my map, I will post them all and hopefully some of you who understand this can help me out and tell me exactly what CAN cause a split, and what can't.. i'll post everything that has to do with GetLocalPlayer. Btw, if there are other reasons for desyncs, can you post them here? i'd like to get rid of this issue once and for all.

Collapse JASS:
    if (GetLocalPlayer() == ForPlayer) then
        call DisplayTimedTextToPlayer( ForPlayer, .52, -1, 2, "|cffffcc00"+msg+"|r" )
        call StartSound(error)
    endif
I don't suppose that could cause a split? it's vexorian's simerror.

Collapse JASS:
function FadingTextSingle takes player p, string msg, integer red, integer green, integer blue, real x, real y, real vel, real fade, real life returns nothing
    local texttag t=CreateTextTag()
    call SetTextTagText(t,msg,0.024)
    call SetTextTagPos(t,x,y, 0.00)
    call SetTextTagColor(t,red,green,blue,255)
    call SetTextTagVelocity(t,0,vel)
    call SetTextTagVisibility(t,(GetLocalPlayer() == p))

Not sure about that one either.

Collapse JASS:
    if GetLocalPlayer() == p2 then
        call ClearTextMessages()
        call ClearSelection()
    endif
Collapse JASS:
            if GetLocalPlayer() == GetOwningPlayer(temp) then
                call PingMinimapEx(GetRectCenterX(gg_rct_Light_Spirit_Master), GetRectCenterY(gg_rct_Light_Spirit_Master), 10, 255, 255, 255, true)
            endif

Collapse JASS:
        if GetLocalPlayer()==p then
            call SetCameraQuickPosition(GetUnitX(axe2), GetUnitY(axe2))
        endif
Collapse JASS:
        if GetLocalPlayer() == p then
            call ClearSelection()
            call SelectUnit(u, true) 
        endif
Collapse JASS:
    if GetLocalPlayer() == GetTriggerPlayer() then
        call SetCameraField(ConvertCameraField(0), CameraSetupGetField(gg_cam_Zoomout1, ConvertCameraField(0)), 2)
    endif


Stuff i'm worried about especially is the cameraquickposition that is being used ALOT, however, it is from a BJ, so I wonder about that.

Everything here are from BJ's, thats why im confused as to why i still got netsplits.
08-07-2006, 09:53 PM#2
Vexorian
nothing there seems suspicious enough, you know, there are other ways to cause desyncs without even using GetLocalPlayer.
08-07-2006, 10:05 PM#3
vile
Quote:
Btw, if there are other reasons for desyncs, can you post them here? i'd like to get rid of this issue once and for all.
08-07-2006, 10:14 PM#4
PitzerMike
Well several natives retrieve local information that shouldn't be used unsynced.
These are essentially:

Collapse JASS:
GetCameraTargetPosition, GetCamera...Whatever, IsMultiboardDisplayed/Minimized

and maybe others.
08-07-2006, 11:01 PM#5
shadow1500
This site has some info about desynchs: http://dwarfcampaign.com/wiki/index....ltiplayer_maps
some of those may be false though.
08-07-2006, 11:20 PM#6
Vexorian
I would say that

Quote:
# Too small waits (clients do not have enough wait time for processing: use minimum waits of 0.30 seconds)
# Too quick Periodic Time Events (clients do not have enough wait time for processing: use minimum interval of 0.30 seconds)
# Too small wait in Time Elapsed Event (clients do not have enough wait time for processing: use minimum wait of 0.30 seconds)
# Using Wait instead of Wait Game Time (you should favor Wait Game Time, although it is not mandatory)
# 0 sight range

Are false
08-07-2006, 11:40 PM#7
PipeDream
Changing game speed during the game and having lots of creep camps close to each other are two other possible causes.
08-07-2006, 11:41 PM#8
Captain Griffen
Anyone who could write that stuff has obviously never seen the PolledWait function. It has never caused a desync, and breaks those rules. Additionally, I've never seen 0 sight range cause a desync, despite a lot of maps using it.

Best bet to think logically about what is happening at the time, and which of them are slightly unusual (ie, you don't KNOW won't cause a desync).
08-08-2006, 04:41 AM#9
vile
I do actually have an ability that causes 0 sight range, either way I'll try to eliminate that and see whats up.
08-08-2006, 01:02 PM#10
Vexorian
As far as I know the caster system's dummy uses 0 sight range, then every map with the caster system would desync, hey even dota uses that dummy unit.
08-08-2006, 01:13 PM#11
DioD
DotA is stable and is not server splitting
--link removed--
here you can dl source like version.
08-08-2006, 01:34 PM#12
Vexorian
No need for that link is there?
08-08-2006, 02:35 PM#13
DioD
This version is copy/paste secured...
I dont see any problem here.

Local player for non existant player cause split, add check for this inside functions.

Any string typed will be registered inside wc3
simerror may be unsafe some times.

best way to declare string outside localplayer.
08-08-2006, 02:54 PM#14
vile
Quote:
Originally Posted by DioD
This version is copy/paste secured...
I dont see any problem here.

Local player for non existant player cause split, add check for this inside functions.

Any string typed will be registered inside wc3
simerror may be unsafe some times.

best way to declare string outside localplayer.

Thanks, that will help me greatly.
08-08-2006, 04:16 PM#15
Vexorian
Quote:
simerror may be unsafe some times.

best way to declare string outside localplayer.
But SimError takes the string as argument so it is certainly declared outside GetLocalPlayer() dependant if blocks.