Page 1 of 1
Heading
Posted: Wed May 25, 2016 8:23 pm
by Gangrenous
We do not currently have a way of changing a players location or heading do we?
Re: Heading
Posted: Wed May 25, 2016 8:36 pm
by Jabantiz
SetPosition() will work on a player for location, there currently is no way to change heading though. I will modify both SetPosition() and
SetHeading() to allow changing of the players heading though.
Re: Heading
Posted: Thu May 26, 2016 4:31 am
by Gangrenous
Thank you!!
I will move on to other spells and just notate these are not done.
Re: Heading
Posted: Tue May 31, 2016 5:15 pm
by Gangrenous
I merged the official source with my changes today and noticed the SetPosition is actually putting you at 180 no matter what value you feed it. Could this be the cause?
Code: Select all
if(client){
EQ2Packet* packet = client->GetPlayer()->Move(x, y, z, client->GetVersion());
client->QueuePacket(packet);
}
This check is further down the LuaFunctions.cpp
Re: Heading
Posted: Tue May 31, 2016 5:52 pm
by Jabantiz
That code should actually be
Code: Select all
if(client){
EQ2Packet* packet = client->GetPlayer()->Move(x, y, z, client->GetVersion(), (heading == 0 ? -1.0f : (heading + 180.0f)));
client->QueuePacket(packet);
}
BTW no clue why but just putting in the normal heading and sending the packet it was always off by 180, so if you passed a heading of 190 it would end up putting you at 10, that is why there is the +180.0f in there, just another random weird behavior SoE/Daybreak coded...