Author Topic: W3MMD library causes desyncs?  (Read 1934 times)

Strikest

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
W3MMD library causes desyncs?
« on: February 22, 2014, 01:22:28 pm »
Hi, recently I implemented the W3MMD standard into my map, that I got from this link. Ever since, I've noticed that sometimes when a match is completed, and I execute my Flag winner/leaver functions, the game desyncs and drops someone. Normally this wouldn't be a problem, since the match is over and starts have been recorded, but my map has a rematch function, so the desync kind of ruins that. Here is my code, which doesn't appear to be the problem, since I don't use GetLocationZ() or GetLocalPlayer(). I'm sure it has to do with the W3MMD, since desyncs have never been a problem before I implemented it:
Code: [Select]
if((SC<=0))then
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"East Side has won! Congratulations! |cFFFF0000Please stay for the rematch.|r")
if FLAGREMATCH then
if HasPlayerLeft[0]==false or HasPlayerLeft[1] == false or HasPlayerLeft[2]== false or HasPlayerLeft[3] == false then
set loopi = 4
loop
exitwhen loopi>7
if HasPlayerLeft[loopi]==false then
    call MMD_FlagPlayer(Player(loopi), MMD_FLAG_WINNER)
endif
set loopi= loopi+1
endloop
endif
if HasPlayerLeft[4]==false or HasPlayerLeft[5] == false or HasPlayerLeft[6]== false or HasPlayerLeft[7] == false then
set loopil = 0
loop
exitwhen loopil>3
if HasPlayerLeft[loopil]==false then
    call MMD_FlagPlayer(Player(loopil), MMD_FLAG_LOSER)
endif
set loopil = loopil + 1
endloop
endif
set FLAGREMATCH = false
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"Stats have been recorded. If you wish to record stats for the rematch, red must type -sr.")
endif
else
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"West Side has won! Congratulations! |cFFFF0000Please stay for the rematch.|r")
if FLAGREMATCH then
if HasPlayerLeft[4]==false or HasPlayerLeft[5] == false or HasPlayerLeft[6]== false or HasPlayerLeft[7] == false then
set loopi = 0
loop
exitwhen loopi>3
if HasPlayerLeft[loopi]==false then
    call MMD_FlagPlayer(Player(loopi), MMD_FLAG_WINNER)
endif
set loopi= loopi+1
endloop
endif
if HasPlayerLeft[0]==false or HasPlayerLeft[1] == false or HasPlayerLeft[2]== false or HasPlayerLeft[3] == false then
set loopil = 4
loop
exitwhen loopil>7
if HasPlayerLeft[loopil]==false then
    call MMD_FlagPlayer(Player(loopil), MMD_FLAG_LOSER)
endif
set loopil = loopil + 1
endloop
endif
set FLAGREMATCH = false
call DisplayTimedTextToForce(bj_FORCE_ALL_PLAYERS,20.,"Stats have been recorded. If you wish to record stats for the rematch, red must type -sr.")
endif
endif

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: W3MMD library causes desyncs?
« Reply #1 on: February 22, 2014, 03:20:02 pm »
Is the player who desyncs using a third party program such as fog click detector hack or map hack? This is the typical cause.

Strikest

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: W3MMD library causes desyncs?
« Reply #2 on: February 22, 2014, 05:03:40 pm »
Well, there's no way for me to know if desynced players are using 3rd party programs, but I've found that the chance of a desync happening increases when someone has left the game before the stats are recorded.

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: W3MMD library causes desyncs?
« Reply #3 on: February 22, 2014, 05:16:59 pm »
Try generating a list of usernames and the number of times they desync, and see if it's just a few players who desync most of the time.

Strikest

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: W3MMD library causes desyncs?
« Reply #4 on: February 22, 2014, 05:18:49 pm »
How would I generate this list? I don't want to use any more W3MMD functions in case they cause even more desyncs

uakf.b

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
  • Karma: +86/-12
    • View Profile
Re: W3MMD library causes desyncs?
« Reply #5 on: February 22, 2014, 11:29:18 pm »
Code: [Select]
SELECT name, COUNT(*) FROM gameplayers WHERE leftreason = 'was dropped due to desync' GROUP BY name ORDER BY COUNT(*) DESC LIMIT 50;