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

[Crash] Things that causes desnch without GetLocalPlayer()

Status
Not open for further replies.
Hey guys,

i have found out that a project of mine, while running properly on singleplayer, causes a desynch right at the lnitialisation of the map.

So i gave the triggers with the corresponding event a look, but neither of these uses getlocalplayer, which is the most common cause of desynchs. So i wanted to ask for a good list of things which can cause a desynch
 
Level 11
Joined
Jun 2, 2004
Messages
849
First things that come to mind:
- Certain camera pan actions (the smart one iirc).
- Getting unit height after any sort of terrain deformation (shockwave, warstomp, etc).
- Triggered terrain modifications seem to have some issues, though I don't know specifics (had a buddy who had extensive terrain generation during map init and could never fix the desyncs it caused).
 

LeP

LeP

Level 13
Joined
Feb 13, 2008
Messages
545
Using the jassdb we can easily query all async functions:
Code:
$ sqlite3 jass.db 'select fnname from annotations where anname == "async"'
JASS:
GetDestructableName
GetSoundDuration
GetSoundFileDuration
GetCameraBoundMinX
GetCameraBoundMinY
GetCameraBoundMaxX
GetCameraBoundMaxY
GetCameraField
GetCameraTargetPositionX
GetCameraTargetPositionY
GetCameraTargetPositionZ
GetCameraTargetPositionLoc
GetCameraEyePositionX
GetCameraEyePositionY
GetCameraEyePositionZ
GetCameraEyePositionLoc
GetObjectName
GetLocalizedString
GetLocalizedHotkey
GetLocalPlayer
GetLocationZ
GetItemName
GetUnitName

Async here means that these functions might return different values for different players which in itself doesn't mean that they desync. But if you use the values of these functions in the wrong way it could cause a desync.
Also these are probably all natives since noone annotated the BJ-functions yet.
 
Status
Not open for further replies.
Top