- Joined
- Mar 3, 2010
- Messages
- 68
I have a question for any JASS users out there. Does using GetLocationZ() cause occasional desyncs? I am asking because my map is suffering from occasional desync problems and I suspect this is due to the function GetLocationZ() since they do not happen once I remove all references to it.
The problem does not seem to happen consistently but if anyone knows what causes it, I'd love to know.
Here is what I am using:
The problem does not seem to happen consistently but if anyone knows what causes it, I'd love to know.
Here is what I am using:
JASS:
function HeightDamageCalculation takes unit Source, unit Target returns real
local real D
set udg_ZLoc = GetUnitLoc( Source )
set D = GetLocationZ( udg_ZLoc )
call RemoveLocation( udg_ZLoc )
set udg_ZLoc = GetUnitLoc( Target )
set D = D-GetLocationZ( udg_ZLoc )
call RemoveLocation( udg_ZLoc )
return D
endfunction