• 🏆 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!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

[Crash] Things that causes desnch without GetLocalPlayer()

Status
Not open for further replies.
Level 10
Joined
Oct 5, 2008
Messages
355
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
539
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