npetrovski / l2js-client

JavaScript client for Lineage 2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ValidatePosition

Hindi opened this issue · comments

commented

Hi,

Looking at how you handle movements,it seems that you do not handle the Z coordinate correctly when moving without attacking : when l2creatures move, you update the X and Y coordinates but not Z, so when ValidatePosition is sent, Z is incorrect. Am I right here or did I miss something? Is using geodata the only way to fix that?

Subsidiary question: Have you taken a look at protocol 140? I'm trying to figure out the last int sent by the client in ValidatePosition. It looks a bit random even during a single move (it comes after vehicleId).

commented

Hi.
If you referring L2Creatures -> setMovingTo() I am afraid you are right - I am using a 2D Vector for calculating the position taking into account only X and Y. I guess I can work on this issue very soon and use 3-dimensional Vector in order to calculate X,Y and Z

Thank you

commented

I don't really need it, but I'm wondering how things work out in places where the Z coordinates changes alot (ToI for example). Do you think averaging the Z value will be enough? Beacause using the geodata will be a pain to maintain.