• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] desync problem, tried everything

Status
Not open for further replies.
Level 4
Joined
Jan 20, 2011
Messages
65
hi,

this code line is desyncing one of my buddys every time:
call TriggerRegisterPlayerEvent(gg_trg_PlayerLeaves, Player(i), EVENT_PLAYER_LEAVE)

when i comment it out it works fine

the other buddy is fine

some data:
they both have windows 7 but the buddy who gets the disconnect installed his windows7 on a mac computer

things i tried:
1. putting this function in various other places in my map
2. putting it out of a loop
3. makeing a new map and importing everything in the new map because i thought maybe newgen editor corrupted it
4. useing TriggerSyncReady() at the end
5. deactivateing everything else

after all theese things i still have no clue why it disconnects and im not doing any silly mistakes and im not a idiot or somethin
please turn on the creative mind and give me some usefull feedback :)

JASS:
function Trig_initialisation_Actions takes nothing returns nothing
local integer i = 0
local integer i2 = 0
local integer i3 = 0
local real tempr1
local real tempr2
local real tempr3

set udg_PlayerColorsRGB[0+0] = 255
set udg_PlayerColorsRGB[0+1] = 30
set udg_PlayerColorsRGB[0+2] = 30
set udg_PlayerColorsRGB[1+0] = 0
set udg_PlayerColorsRGB[1+1] = 66
set udg_PlayerColorsRGB[1+2] = 255
set udg_PlayerColorsRGB[2+0] = 28
set udg_PlayerColorsRGB[2+1] = 230
set udg_PlayerColorsRGB[2+2] = 184
set udg_PlayerColorsRGB[3+0] = 83
set udg_PlayerColorsRGB[3+1] = 0
set udg_PlayerColorsRGB[3+2] = 129
set udg_PlayerColorsRGB[4+0] = 255
set udg_PlayerColorsRGB[4+1] = 251
set udg_PlayerColorsRGB[4+2] = 10
set udg_PlayerColorsRGB[5+0] = 253
set udg_PlayerColorsRGB[5+1] = 185
set udg_PlayerColorsRGB[5+2] = 14
set udg_PlayerColorsRGB[6+0] = 33
set udg_PlayerColorsRGB[6+1] = 191
set udg_PlayerColorsRGB[6+2] = 0
set udg_PlayerColorsRGB[7+0] = 229
set udg_PlayerColorsRGB[7+1] = 91
set udg_PlayerColorsRGB[7+2] = 175
set udg_PlayerColorsRGB[8+0] = 147
set udg_PlayerColorsRGB[8+1] = 147
set udg_PlayerColorsRGB[8+2] = 150
set udg_PlayerColorsRGB[9+0] = 124
set udg_PlayerColorsRGB[9+1] = 191
set udg_PlayerColorsRGB[9+2] = 239
set udg_PlayerColorsRGB[10+0]= 0
set udg_PlayerColorsRGB[10+1]= 70
set udg_PlayerColorsRGB[10+2]= 0
set udg_PlayerColorsRGB[11+0]= 125
set udg_PlayerColorsRGB[11+1]= 54
set udg_PlayerColorsRGB[11+2]= 0

// constants
set udg_PlayableMaxXMinXMaxYMinY[0] = GetRectMaxX(bj_mapInitialPlayableArea)
set udg_PlayableMaxXMinXMaxYMinY[1] = GetRectMinX(bj_mapInitialPlayableArea)
set udg_PlayableMaxXMinXMaxYMinY[2] = GetRectMaxY(bj_mapInitialPlayableArea)
set udg_PlayableMaxXMinXMaxYMinY[3] = GetRectMinY(bj_mapInitialPlayableArea)
    
// call some general functions

call DisplayTextToForce(GetPlayersAll(),R2S(udg_OTTE_WALL_THICKNESS )+" Welcome to Electric motion")
call ClearMapMusic()
call StopMusic(false)
call SetMusicVolume(0)

set udg_StartTournamentTriggerFix = CreateTrigger()
call TriggerAddAction( udg_StartTournamentTriggerFix, function StartTournamentLobby )

set udg_UpdateDamageEventTriggerFix = CreateTrigger()
call TriggerAddAction( udg_UpdateDamageEventTriggerFix , function UpdateTankDamageEvent )

set udg_TournamentLobby1TriggerFix = CreateTrigger()
call TriggerAddAction( udg_TournamentLobby1TriggerFix , function AfterStartTournamentLobby1 )

set udg_MulR1[0] = CreateTextTag()
set udg_MulR1[1] = CreateTextTag()
set udg_MulR1[2] = CreateTextTag()

set udg_MulR2[0] = CreateTextTag()
call SetTextTagColor(udg_MulR2[0],255,255,0,255)
set udg_MulR2[1] = CreateTextTag()
call SetTextTagColor(udg_MulR2[1],255,255,0,255)
set udg_MulR2[2] = CreateTextTag()
call SetTextTagColor(udg_MulR2[2],255,255,0,255)

set i2 = 250 // size of the ottes
set tempr3 = i2 - udg_OTTE_WALL_THICKNESS * 0.5
// create rects for otte (gallos crazy name for safe spots where u cant be catched)
loop
exitwhen i > udg_OTTEGROUPS_AMOUNT-2
    set tempr1 = GetRandomReal(udg_PlayableMaxXMinXMaxYMinY[1]+500,udg_PlayableMaxXMinXMaxYMinY[0]-500)
    set tempr2 = GetRandomReal(udg_PlayableMaxXMinXMaxYMinY[3]+500,udg_PlayableMaxXMinXMaxYMinY[2]-500)
    set udg_OtteRects[i*4+0] = tempr1-i2
    set udg_OtteRects[i*4+1] = tempr2-i2
    set udg_OtteRects[i*4+2] = tempr1+i2
    set udg_OtteRects[i*4+3] = tempr2+i2
    set udg_OtteOwningPlayer[i] = null
    // 1 lever
    set bj_lastCreatedUnit = CreateUnit( Player(15) , 'h00F', tempr1 , tempr2 , GetRandomReal(0,360) )
    call SetUnitAnimation( bj_lastCreatedUnit , "death" )
    call SetUnitUserData(bj_lastCreatedUnit,i)
    // 4 walls
    set bj_lastCreatedUnit = CreateUnit( Player(15) , 'h00G', tempr1 , tempr2-tempr3 , 0*90 )
    call GroupAddUnit( udg_OtteRectWalls[i] , bj_lastCreatedUnit )
    call SetUnitAnimation( bj_lastCreatedUnit , "death" )
    set bj_lastCreatedUnit = CreateUnit( Player(15) , 'h00G', tempr1+tempr3 , tempr2 , 1*90 )
    call GroupAddUnit( udg_OtteRectWalls[i] , bj_lastCreatedUnit )
    call SetUnitAnimation( bj_lastCreatedUnit , "death" )
    set bj_lastCreatedUnit = CreateUnit( Player(15) , 'h00G', tempr1 , tempr2+tempr3 , 2*90 )
    call GroupAddUnit( udg_OtteRectWalls[i] , bj_lastCreatedUnit )
    call SetUnitAnimation( bj_lastCreatedUnit , "death" )
    set bj_lastCreatedUnit = CreateUnit( Player(15) , 'h00G', tempr1-tempr3 , tempr2 , 3*90 )
    call GroupAddUnit( udg_OtteRectWalls[i] , bj_lastCreatedUnit )
    call SetUnitAnimation( bj_lastCreatedUnit , "death" )
set i=i+1
endloop
set i2 = 0
set i = 0
// inner tournament otte rect
set udg_OtteRects[udg_OTTEGROUPS_AMOUNT*4+0] = -2000
set udg_OtteRects[udg_OTTEGROUPS_AMOUNT*4+1] = -1000
set udg_OtteRects[udg_OTTEGROUPS_AMOUNT*4+2] = 2000
set udg_OtteRects[udg_OTTEGROUPS_AMOUNT*4+3] = 1000
set udg_OtteOwningPlayer[udg_OTTEGROUPS_AMOUNT] = null
// outter tournament otte rect
set udg_OtteRects[(udg_OTTEGROUPS_AMOUNT-1)*4+0] = -2500
set udg_OtteRects[(udg_OTTEGROUPS_AMOUNT-1)*4+1] = -1500
set udg_OtteRects[(udg_OTTEGROUPS_AMOUNT-1)*4+2] = 2500
set udg_OtteRects[(udg_OTTEGROUPS_AMOUNT-1)*4+3] = 1500
set udg_OtteOwningPlayer[udg_OTTEGROUPS_AMOUNT-1] = null

call SetPlayerName(Player(10),"hallo")
call SetPlayerName(Player(11),"hall34o")


// for every player
loop
    if( GetPlayerName(Player(i)) != "Player " + I2S(i+1)) then
        call ForceAddPlayer(udg_AllPlayers,Player(i))

    call TriggerRegisterPlayerEvent(gg_trg_Left_Depress, Player(i), EVENT_PLAYER_ARROW_LEFT_DOWN)
    call TriggerRegisterPlayerEvent(gg_trg_Right_Depress, Player(i), EVENT_PLAYER_ARROW_RIGHT_DOWN)
    call TriggerRegisterPlayerEvent(gg_trg_Up_Depress, Player(i), EVENT_PLAYER_ARROW_UP_DOWN)
    call TriggerRegisterPlayerEvent(gg_trg_Down_Depress, Player(i), EVENT_PLAYER_ARROW_DOWN_DOWN)
    
    call TriggerRegisterPlayerEvent(gg_trg_Left_Release, Player(i), EVENT_PLAYER_ARROW_LEFT_UP)
    call TriggerRegisterPlayerEvent(gg_trg_Right_Release, Player(i), EVENT_PLAYER_ARROW_RIGHT_UP)
    call TriggerRegisterPlayerEvent(gg_trg_Up_Release, Player(i), EVENT_PLAYER_ARROW_UP_UP)
    call TriggerRegisterPlayerEvent(gg_trg_Down_Release, Player(i), EVENT_PLAYER_ARROW_DOWN_UP)

    call TriggerRegisterPlayerEvent(gg_trg_PlayerLeaves, Player(i), EVENT_PLAYER_LEAVE)
    call TriggerRegisterPlayerUnitEvent( gg_trg_SelectionEvent , Player(i) , EVENT_PLAYER_UNIT_SELECTED, null)
    //call TriggerRegisterPlayerUnitEvent( gg_trg_DeselectionEvent , Player(i) , EVENT_PLAYER_UNIT_DESELECTED, null)

call SetPlayerState( Player(i) , PLAYER_STATE_RESOURCE_GOLD , 100000 )
call FogEnable(false)
call FogMaskEnable(false)        


        set udg_NettoWorthCount[i] = 0
        

        // create tanks at random point in map
        set tempr1 = GetRandomReal(udg_PlayableMaxXMinXMaxYMinY[1]+500,udg_PlayableMaxXMinXMaxYMinY[0]-500)
        set tempr2 = GetRandomReal(udg_PlayableMaxXMinXMaxYMinY[3]+500,udg_PlayableMaxXMinXMaxYMinY[2]-500)
        call PanCameraToTimedForPlayer(Player(i),tempr1,tempr2,0)
        set bj_lastCreatedUnit = CreateUnit( Player(i) , 'h004', tempr1 , tempr2 , GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit// add to groups
        set i2 = i2 + 1
        set udg_SteamTanks[i3] = bj_lastCreatedUnit
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)// user data as handle to all data of the unit
        set udg_xVelocity[udg_iUniqueData] = 0// current velocity
        set udg_yVelocity[udg_iUniqueData] = 0
        set udg_rCollisionSize[udg_iUniqueData] = 130 / 2
        set udg_rMass[udg_iUniqueData] = udg_TANK_MASS// how heavy is the object
        set udg_StaticObject[udg_iUniqueData] = true// a static object is treated differently in QuadTree to improve performance
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit// unit safes its own handle for RemoveUnitWrap function .. and more?
        call AddUnitToOtteGroupBooleanArray(udg_iUniqueData)
        set udg_iUniqueData = udg_iUniqueData + 1// this int must allways point at a free slot, when something removed, it swaps last slot to removed slot

        call ShowUnit(bj_lastCreatedUnit,false)
        set udg_PeasantAbilityLevel[i] = 2
        call SetUnitAbilityLevel( bj_lastCreatedUnit , 'A000' , udg_PeasantAbilityLevel[i] )// level 2 = 1 peasant in tank
        call UnitRemoveAbility(bj_lastCreatedUnit,'A001')// removeing engine ability cuz it has an upgrade instead at first

        // create one silver to start with
        set bj_lastCreatedUnit = CreateUnit( Player(15) , 'h009', tempr1 + 500, tempr2, GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 160 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
        
        set i3 = i3 + 1
    endif
set i = i + 1
exitwhen i > 11
endloop
set udg_SteamTanks[i3] = null




if( i3 > 1 ) then
    call TimerStart(udg_TournamentTimer,20,false,function PreStartTournament)
    //call TimerStart(udg_TournamentTimer,GetRandomInt(900,1800),false,function PreStartTournament)
endif
call UpdateTankDamageEvent()
call UpdateMultiBoard()

// create many static objects on map
set i = 0
// create minerals
loop
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h002', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 180 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
set i = i + 1
exitwhen i > 100
endloop
// create minerals
set i = 0
loop
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h008', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 160 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
set i = i + 1
exitwhen i > 75
endloop
// create minerals
set i = 0
loop
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h009', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 160 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
set i = i + 1
exitwhen i > 50
endloop
// create minerals
set i = 0
loop
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h001', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 150 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
set i = i + 1
exitwhen i > 25
endloop
// create minerals
set i = 0
loop
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h00A', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 100 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
set i = i + 1
exitwhen i > 10
endloop
// create minerals
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h00B', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 120 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
// create obstacles
set i = 0
loop
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h007', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 150 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
set i = i + 1
exitwhen i > 20
endloop
// create obstacles
set i = 0
loop
        set bj_lastCreatedUnit = CreateUnitAtLoc( Player(15) , 'h006', GetRandomLocInRect(GetPlayableMapRect()), GetRandomReal(0,360) )
        set udg_CollisionGroup[i2] = bj_lastCreatedUnit
        set i2 = i2 + 1
        call SetUnitUserData(bj_lastCreatedUnit ,udg_iUniqueData)
        set udg_rCollisionSize[udg_iUniqueData] = 200 / 2
        set udg_StaticObject[udg_iUniqueData] = true
        set udg_UniqueDataUnits[udg_iUniqueData] = bj_lastCreatedUnit
        set udg_iUniqueData = udg_iUniqueData + 1
set i = i + 1
exitwhen i > 20
endloop


set udg_MotionGroup[0] = null
set udg_CollisionGroup[i2] = null
set bj_lastCreatedUnit = null

call TriggerSleepAction(1)

set i=0
loop
exitwhen udg_SteamTanks[i] == null
        call ShowUnit(udg_SteamTanks[i],true)
set i=i+1
endloop

set i=0
loop
exitwhen i == 12
    if( GetPlayerName(Player(i)) != "Player " + I2S(i+1) ) then
        call StartChillMusic(i)
    endif
set i=i+1
endloop


call DestroyTrigger( GetTriggeringTrigger() )
endfunction

//===========================================================================
function InitTrig_initialisation takes nothing returns nothing
    set gg_trg_initialisation = CreateTrigger(  )
    call TriggerRegisterTimerEventSingle( gg_trg_initialisation, 0.01 )
    call TriggerAddAction( gg_trg_initialisation, function Trig_initialisation_Actions )
endfunction
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,204
windows7 on a mac computer
Is he running it directly (booted as W7) or is he running it via a virtual machine (inside OSX)?

Has he tried reinstalling the game?

Have you tried calling that single line in a different function running at a different time? It might be worse seeing if the desync still occurs when it gets called separatly after a few seconds.
 
Level 4
Joined
Jan 20, 2011
Messages
65
he has bootable windows 7 professional

i allready tried doing it after 5 sec of game time, he disconnects after 5 sec then^^ as soon as i register this event

i even made new map with the function, hes not desyncing there, so mb it is some bad combination of functions im calling or something?
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,204
I am trying to think how on earth this can be...

There are very few variable systems he is exposed to that the other guy is not. The graphic systems of the 2 machines are different so it could be a bug with his graphic card / driver. It could be network related as both machines connect to each other differently (so it fails to sync at that moment). It could be load related (he loads some data WC3 needs too fast or too slow compared to the other person).
 
JASS:
if( GetPlayerName(Player(i)) != "Player " + I2S(i+1)) then

I don't know why you check that (if it's a computer player or an unused slot or whatever) but just use GetPlayerSlotState and GetPlayerController... I guess it may cause desyncs for players who are not from the host's country.

I don't know why it would only affect the EVENT_PLAYER_LEAVE, though...

I pass through the leak and the indent which are terrible, but you have to fix that :ogre_rage:.
 
Level 4
Joined
Jan 20, 2011
Messages
65
Deactivate other parts of the map and show what's else done with the trigger. Or give map though could be futile in case cannot provoke the desync.

i also tried commenting the playerleave triggers action, still desyncing by simply registering its event

sorry for the bad indent^^

i tested now with this GetPlayerName statement commented and with registering one player after another every 10 seconds useing TriggerSleepAction(), also deactivated some big triggers
and he did not disconnect!!!!!

i will activate now all things one after another to check which caused it :)
 
Level 8
Joined
Apr 26, 2011
Messages
403
I guess it may cause desyncs for players who are not from the host's country.

I don't know why it would only affect the EVENT_PLAYER_LEAVE, though...

do you have more information/experience with this ?

I think I am have some descync problem with EVENT_PLAYER_LEAVE event, and still fail to fix it. (have to disable the code).

descync doesn't happen when I tested them.

but some player report them so I guess they may use difference country/language.
 
Level 8
Joined
Apr 26, 2011
Messages
403
HuanAk, TriggerSleepAction is used in PolledWait so what you said contradicted yourself.

Never use PolledWait as it leaks a handle. If you must use it, you need to call a custom decleration of it with the leak fixed.

I don't know why, but Strilanc post on his thread :

Yes. Every single wait ending must be logged in the replay, not to mention sent over the network, because they are real-time and would desync otherwise.

The reason there's a special entry for the desync probably has to do with making sure the replay plays out exactly as the saver saw it happen. There could be some gameplay differences between players disconnecting and desyncing.

At this point I think what is happening is MMD interacting badly with waits. I've noticed a few times that the action it uses, GameCacheSyncInteger, can cause waits to end early. I generally tell people to avoid them, even if they don't use MMD (waits have several other downsides).

I believe he is good programmer and been spent lots of time try find out why desync happen relate to W3MMD. he keep saying wait cause descyn on more than 1 website. (and he recommend use poolwait() to replace wait)
 
Level 8
Joined
Apr 26, 2011
Messages
403
PolledWait ueses TriggerSleepAction if you look at the function decleration.

yes, I just don't know why he say that.

do you know why Tirlititi said that ?
I guess it may cause desyncs for players who are not from the host's country.

I don't know why it would only affect the EVENT_PLAYER_LEAVE, though...

because I modified W3MMD and it seen ok for my tester and me.

but still mass descyn for some player that possible play from country that don't use english version of window or warcraft :(

I still try find out why descyn happen for them when player leave :(


edit: found something about leak on polledwait :
http://www.wc3c.net/showthread.php?t=87168&highlight=polledwait+triggersleepaction
The leak is minimal, and is fixed by Vex's optimiser.
 
Last edited:
Level 4
Joined
Jan 20, 2011
Messages
65
MOAHHAHAAH THE IMPOSSIBLE HAS BEEN DONE

thank you Tirlititi !!

my one buddy had a german tft version
the player names of the unused slots are dependant on the language of the game
so when on my computer the unused player slot names are "Player X" the names on my buddys unused player slots are "Spieler X"
i get through the if statement, he doesnt , thus desyncing :D

what have we learnd?
we can now use strings in multiply languages and test it useing the unused player slot names if u have close 2 zero life! :D :D

:ogre_haosis:
:vw_wtf:
:goblin_good_job:
:grin:
 
There are other strings you can use for checking a player's country and they are more reliable (I saw a library for that). GetLocalizedString( "GAMEOVER_CONTINUE" ) to give an example.

I guess it may cause desyncs for players who are not from the host's country.

I don't know why it would only affect the EVENT_PLAYER_LEAVE, though...
do you have more information/experience with this ?

I think I am have some descync problem with EVENT_PLAYER_LEAVE event, and still fail to fix it. (have to disable the code).

I said I don't see how EVENT_PLAYER_LEAVE has something to do with this...
 
Status
Not open for further replies.
Top