HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

GetLocationZ() and SetUnitFlyHeight()

08-18-2007, 06:52 PM#1
cohadar
I know GetLocationZ() desyncs on maps with local terrain deformations,

how about SetUnitFlyHeight() ?
08-18-2007, 07:14 PM#2
moyack
no, it doesn't desync. But if you want to get the accurate height of a unit, you should sum the GetLocationZ and the FlyunitHeight.
08-18-2007, 07:26 PM#3
cohadar
I don't,
I hate desyncs so much I refuse to use GetLocationZ()
besides who cares if units move a little weird from time to time,
it is a fantasy game after all :D

Tnx for the answer btw.
08-18-2007, 07:32 PM#4
moyack
You're welcome. if you're going to do in a single player map, there's no problem, but in b.net this function and terrain deformations should be avoided too.
08-18-2007, 07:40 PM#5
grim001
Don't spread lies... GetLocationZ is fine on bnet as long as you don't use local terrain deformations or certain abilities that cause them
08-18-2007, 07:51 PM#6
moyack
My intention is not spread lies.

Quote:
Originally Posted by common.j
Collapse JASS:
// This function is asynchronous. The values it returns are not guaranteed synchronous between each player.
//  If you attempt to use it in a synchronous manner, it may cause a desync.

Anyways, this function can be sure if you can manage appropriately. But if you can avoid it, better for the map.

EDIT: Because I'm pretty sure you use GetLocationZ in your physic system, I think it would be interesting if you share your experience with us about how to manage this function on multiplayer maps.
08-18-2007, 07:52 PM#7
cohadar
@Grim001
Man you behave very strange lately,
you on some drugs or something?
08-18-2007, 08:34 PM#8
grim001
Simple:

1.) Don't use local terrain deformations
2.) Don't use abilities that cause terrain deformations like shockwave or warstomp
08-18-2007, 09:30 PM#9
MaD[Lion]
shockwave and warstomp cause desync on terrain yes ^^ so HATE IT. i had tat problem :P
08-18-2007, 09:45 PM#10
Toadcop
i agree cause this shit lags also terribly =\ (terraindeformations)

it's just like "Just Another Shit What You Would Better Avoid"...

+ GetLocationZ() ownz ! + no problems with DeSyncs if your are not lame.
08-18-2007, 10:10 PM#11
Tide-Arc Ephemera
Quote:
Originally Posted by grim001
Don't spread lies... GetLocationZ is fine on bnet as long as you don't use local terrain deformations or certain abilities that cause them
I assume your object engine used GetLocationZ, when I attempted to test it online (nothing else to do), a few people ALWAYS got disconnected. At least 1 per game anyway.
08-18-2007, 10:56 PM#12
Toadcop
Tide-Arc Ephemera don't do that =\ as for me it a direct "balls" kick...
+ maybe your are Dial-up freaks ^^ so thats why you getted disconected... or maybe there are some other reason for this disconects... for example i got disconects cause i have called this code...

...
if GetLocalPlayer()==Player(x) then
// HERE IS NOTHING !!!
endif
...

and this code HAS DISCONECTED PLAYERS ! it's not a fake it's a fact ! after i have removed this local block no disconects happend... so war3 is full of bugs ^^ // I DON'T SAY WHAT GENERALY SUCH CODE DESYNC BUT I GOT ONE CASE IN WHICH IT WAS SO ! you can belive or not it's your problem...
08-19-2007, 06:33 AM#13
cohadar
Too many things could go wrong in wc3,
so yeah f*** GetLocationZ() there is no way I am using it.

Jump looks pretty good without it so who cares anyway....
Better safe than sorry.
08-19-2007, 10:04 AM#14
grim001
GetLocationZ is safe and required for anything remotely resembling 3d movement. Then again people should know better than to listen to cohadar by now.
08-19-2007, 11:09 AM#15
cohadar
Well I did not say people should not use GetLocationZ()
I simply state that I have no intention of using it in my map,
because it is safe only under circumstances that I don't like,
and besides jump can be made without it,
not to mention slide, knockback and similar,
so yeah f*** GetLocationZ()

Besides I like shockwaves, warstomps, earthquakes, vulcanos, and stuff like that.

And I started this thread just to find out if GetUnitFlyHeight() is safe,
not because I needed your smart-ass opinions so piss-off jerk.